8029383: assert(counter_changed) failed: failed dependencies, but counter didn't change
authorroland
Fri, 13 Dec 2013 09:25:44 +0100
changeset 22231 1cca24bb3125
parent 22230 2b4b260229d0
child 22232 26acfad336c0
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
hotspot/src/share/vm/classfile/systemDictionary.cpp
hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp
--- 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();