RFR (S) 8016075 - Win32 crash with CDS enabled and small heap size
Ioi Lam
ioi.lam at oracle.com
Wed Jun 26 21:10:50 PDT 2013
|Please review a small fix:|
|||
||http://cr.openjdk.java.net/~iklam/8016075/cds_is_shared_crash_003/||
||
||Bug: Win32 crash with CDS enabled and small heap size||
||
||http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8016075||
||https://jbs.oracle.com/bugs/browse/JDK-8016075||
||
||Summary of fix:||
||
|| The function MetaspaceShared::is_in_shared_space() was testing with||
|| incorrect bounds. As a resullt, a dynamically loaded InstanceKlass||
|| was incorrectly identified as an InstanceKlass stored in the CDS||
|| archive. This caused the following code to fail:||
||
|| bool InstanceKlass::link_class_impl(...) {||
|| ...||
|| if (!this_oop()->is_shared()) {||
|| ResourceMark rm(THREAD);||
||this_oop->vtable()->initialize_vtable(true, CHECK_false); //<< failed
to execute||
||this_oop->itable()->initialize_itable(true, CHECK_false);||
|| }||
||
|| Hence, Method::vtable_index() could return an incorrect value for
some||
|| Methods, leading to various mysterious crashes.||
||
|| The fix is for MetaspaceShared::is_in_shared_space() to consider
the actual used||
|| spaces in the CDS archive regions.||
||
||Tests:||
||
|| JPRT||
|| UTE (vm.runtime.testlist, vm.quick.testlist,
vm.parallel_class_loading.testlist)||
||
||Thanks||
||- Ioi||
||
|
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/attachments/20130626/32c49fcf/attachment.html
More information about the hotspot-runtime-dev
mailing list