RFR (S): 8060147: SIGSEGV in Metadata::mark_on_stack() while marking metadata in ciEnv
vladimir.x.ivanov at oracle.com
Thu Oct 30 10:14:56 UTC 2014
Thanks for the feedback.
>> ciObjectFactory doesn't keep cached Metadata* alive. ciMetadata is different from ciObject - it doesn't store JNI handle, but a raw Metadata* pointer.
> What kind of ciMetadata do you observe being unloaded?
I saw that ciMethod for a method from VM anonymous class went away. But
that's what my stress test does - unloads VM anonymous classes a lot.
> For instance, if I remember correctly ciInstanceKlass is kept alive by storing a handle to the loader object of the instance klass.
Thanks for the pointer! I missed that.
It should work for ciInstanceKlass & ciMethod with regular classes.
VM anonymous classes have loader == NULL, so class holder
(java_mirror()) should be used instead. Also, I don't see how
ciMethodData keeps relevant MethodData from unloading.
Regarding the fix, I can add special cases for VM anonymous classes &
MethodData or keep it as is (more explicit). What do people think?
More information about the hotspot-compiler-dev