8000659: NPG: ClassCastExceptions are unexpectedly thrown when testing nashorn
authorstefank
Tue, 09 Oct 2012 22:12:25 +0200
changeset 14075 53f86368a6a6
parent 14074 8cafb11da0cd
child 14076 84643cfaeaa8
8000659: NPG: ClassCastExceptions are unexpectedly thrown when testing nashorn Summary: Treat the oops in invoke_method_table() as strong roots when ClassUnloading is enabled. Reviewed-by: kamg, coleenp
hotspot/src/share/vm/classfile/systemDictionary.cpp
--- a/hotspot/src/share/vm/classfile/systemDictionary.cpp	Mon Oct 08 09:12:31 2012 -0700
+++ b/hotspot/src/share/vm/classfile/systemDictionary.cpp	Tue Oct 09 22:12:25 2012 +0200
@@ -1749,6 +1749,9 @@
   blk->do_oop(&_system_loader_lock_obj);
 
   dictionary()->always_strong_oops_do(blk);
+
+  // Visit extra methods
+  invoke_method_table()->oops_do(blk);
 }
 
 void SystemDictionary::always_strong_classes_do(KlassClosure* closure) {