--- old/src/share/vm/classfile/systemDictionary.cpp 2015-10-30 18:24:03.340762269 -0400 +++ new/src/share/vm/classfile/systemDictionary.cpp 2015-10-30 18:24:02.918928806 -0400 @@ -23,6 +23,7 @@ */ #include "precompiled.hpp" +#include "classfile/backtrace.hpp" #include "classfile/classLoaderData.inline.hpp" #include "classfile/dictionary.hpp" #include "classfile/javaClasses.inline.hpp" @@ -1708,6 +1709,9 @@ VerifySDReachableAndLiveClosure cl(is_alive); dictionary()->oops_do(&cl); #endif + + // Unload deallocated backtraces + BacktraceList::unlink(is_alive); return unloading_occurred; } @@ -1721,6 +1725,11 @@ // Visit extra methods invoke_method_table()->oops_do(strong); + + // BacktraceList are weak roots + if (weak != NULL) { + BacktraceList::oops_do(weak); + } } void SystemDictionary::oops_do(OopClosure* f) { @@ -1733,6 +1742,9 @@ // Visit extra methods invoke_method_table()->oops_do(f); + + // BacktraceList are weak roots + BacktraceList::oops_do(f); } // Extended Class redefinition support.