# HG changeset patch # User roland # Date 1386923144 -3600 # Node ID 22c88c127fa46ef84d310fbfc1a8adc32c23d663 # Parent ddcb2ac2900dc6ec7c80e4d8b61938515b17c197 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 diff -r ddcb2ac2900d -r 22c88c127fa4 src/share/vm/classfile/systemDictionary.cpp --- a/src/share/vm/classfile/systemDictionary.cpp Thu Dec 12 20:55:36 2013 -0500 +++ b/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. diff -r ddcb2ac2900d -r 22c88c127fa4 src/share/vm/prims/jvmtiRedefineClasses.cpp --- a/src/share/vm/prims/jvmtiRedefineClasses.cpp Thu Dec 12 20:55:36 2013 -0500 +++ b/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();