java-17-openjdk/NAA.002.jvmtiClassFileReconstituter.patch
2024-01-21 10:02:37 +03:00

11 lines
609 B
Diff

--- a/src/hotspot/share/prims/jvmtiClassFileReconstituter.cpp 2024-01-15 20:17:22.044947545 +0300
+++ b/src/hotspot/share/prims/jvmtiClassFileReconstituter.cpp 2024-01-15 20:24:39.422251196 +0300
@@ -458,7 +458,7 @@
// }
void JvmtiClassFileReconstituter::write_record_attribute() {
Array<RecordComponent*>* components = ik()->record_components();
- int number_of_components = components->length();
+ int number_of_components = components ? components->length() : 0;
// Each component has a u2 for name, descr, attribute count
int length = sizeof(u2) + (sizeof(u2) * 3 * number_of_components);