8029383: assert(counter_changed) failed: failed dependencies, but counter didn't change
Summary: no call to SystemDictionary::notice_modification() when class is defined through Unsafe.defineAnonymousClass() can caused missed dependency change.
Reviewed-by: kvn, twisti
--- a/hotspot/src/share/vm/classfile/systemDictionary.cpp Thu Dec 12 15:11:35 2013 -0500
+++ b/hotspot/src/share/vm/classfile/systemDictionary.cpp Fri Dec 13 09:25:44 2013 +0100
@@ -1049,6 +1049,9 @@
add_to_hierarchy(k, CHECK_NULL); // No exception, but can block
// But, do not add to system dictionary.
+
+ // compiled code dependencies need to be validated anyway
+ notice_modification();
}
// Rewrite and patch constant pool here.
--- a/hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp Thu Dec 12 15:11:35 2013 -0500
+++ b/hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp Fri Dec 13 09:25:44 2013 +0100
@@ -147,9 +147,6 @@
_scratch_classes[i] = NULL;
}
- // Disable any dependent concurrent compilations
- SystemDictionary::notice_modification();
-
// Set flag indicating that some invariants are no longer true.
// See jvmtiExport.hpp for detailed explanation.
JvmtiExport::set_has_redefined_a_class();