RFR(xs) 8232030: HelloDynamic.java fails with latest Graal

Calvin Cheung calvin.cheung at oracle.com
Thu Oct 17 18:49:47 UTC 2019


bug: https://bugs.openjdk.java.net/browse/JDK-8232030

During CDS dynamic dumping and during the loading of a class whose super 
class has default methods, the method_ordering is not set correctly 
after merging in the default methods. A simple fix is in the 
merge_in_new_methods() of defaultMethods.cpp to include the dynamic 
dumping condition when setting up the merged_ordering array.

bash-4.2$ hg diff src/hotspot/share/classfile/defaultMethods.cpp
diff --git a/src/hotspot/share/classfile/defaultMethods.cpp 
b/src/hotspot/share/classfile/defaultMethods.cpp
--- a/src/hotspot/share/classfile/defaultMethods.cpp
+++ b/src/hotspot/share/classfile/defaultMethods.cpp
@@ -1012,7 +1012,7 @@
        klass->class_loader_data(), new_size, NULL, CHECK);

    // original_ordering might be empty if this class has no methods of 
its own
- if (JvmtiExport::can_maintain_original_method_order() || 
DumpSharedSpaces) {
+ if (JvmtiExport::can_maintain_original_method_order() || 
Arguments::is_dumping_archive()) {
      merged_ordering = MetadataFactory::new_array<int>(
          klass->class_loader_data(), new_size, CHECK);
    }

Tested manually with the vmoptions listed in the bug report.

Also ran tier1 - 2 tests.

thanks,

Calvin



More information about the hotspot-runtime-dev mailing list