RFR (S) 8016075 - Win32 crash with CDS enabled and small heap size
harold seigel
harold.seigel at oracle.com
Thu Jun 27 06:42:44 PDT 2013
Hi Ioi,
The changes look good.
You can simplify MetaspaceShared::is_in_shared_space(...) to something like:
// Return true if given address is in the mapped shared space.
bool MetaspaceShared::is_in_shared_space(const void* p) {
return UseSharedSpaces &&
FileMapInfo::current_info()->is_in_shared_space(p);
}
Thanks, Harold
On 6/27/2013 12:10 AM, Ioi Lam wrote:
> |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/20130627/70026f29/attachment.html
More information about the hotspot-runtime-dev
mailing list