review request 7140866: assert(covered) failed: Card for end of new region not committed

Dean Long dean.long at
Mon Feb 13 14:09:49 PST 2012

The problem happens when trying to use a shared archive.  If for some 
reason mapping the shared file fails,
we call

     _rs->resize_covered_region(MemRegion(shared_bottom, shared_bottom));

to undo the earlier call to

     _rs->resize_covered_region(MemRegion(readonly_bottom, readwrite_end));

Unfortunately the resize code is not prepared to deal with a zero-sized 
region so an assert fails.
Rather than touch the resize code, this fix changes the caller to only 
call resize_covered_region()
once after the shared file is mapped.

Tested fix on a particular linux arm platform where the mmap fails 100% 
of the time due to a different issue.
Ran -Xshare:dump first then a few GC tests.


More information about the hotspot-runtime-dev mailing list