[9] RFR (S): 8060147: SIGSEGV in Metadata::mark_on_stack() while marking metadata in ciEnv
Roland Westrelin
roland.westrelin at oracle.com
Thu Oct 30 12:24:28 UTC 2014
> Or does a compilation reference MethodData objects for other methods, for example when inlining? In that case you need to be sure that we create a ciInstanceKlass for the method holder of the inlined method.
We create a ciMethod for every method we inline and every ciMethod has a ciInstanceKlass reference to its holder. So we should be good.
Problem is, ciMethod::ciMethod() is:
…
if (env->jvmti_can_hotswap_or_post_breakpoint() && can_be_compiled()) {
// 6328518 check hotswap conditions under the right lock.
MutexLocker locker(Compile_lock);
if (Dependencies::check_evol_method(h_m()) != NULL) {
_is_c1_compilable = false;
_is_c2_compilable = false;
}
} else {
CHECK_UNHANDLED_OOPS_ONLY(Thread::current()->clear_unhandled_oops());
}
…
_holder = env->get_instance_klass(h_m()->method_holder());
So if jvmti is enabled, we could safepoint before we set the holder field and the method could be unloaded?
Roland.
More information about the hotspot-runtime-dev
mailing list