From a790fe7ce43d0c7070132c4f3fce73c6f9a6c8d4 Mon Sep 17 00:00:00 2001 From: stefank Date: Tue, 9 Oct 2012 22:12:25 +0200 Subject: [PATCH] 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 --- src/share/vm/classfile/systemDictionary.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/share/vm/classfile/systemDictionary.cpp b/src/share/vm/classfile/systemDictionary.cpp index 081007c4e..5c0d99258 100644 --- a/src/share/vm/classfile/systemDictionary.cpp +++ b/src/share/vm/classfile/systemDictionary.cpp @@ -1749,6 +1749,9 @@ void SystemDictionary::always_strong_oops_do(OopClosure* blk) { 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) { -- GitLab