RFR(XS) 8210523 runtime/appcds/cacheObject/DifferentHeapSizes.java crash
Ioi Lam
ioi.lam at oracle.com
Sun Sep 9 23:21:34 UTC 2018
https://bugs.openjdk.java.net/browse/JDK-8210523
http://cr.openjdk.java.net/~iklam/jdk12/8210523-DifferentHeapSizes-crash.v01/
The bug is here:
address relocated_strings_bottom =
start_address_with_archived_oop_encoding_mode(si);
- if (!is_aligned(relocated_strings_bottom + delta,
HeapRegion::GrainBytes)) {
+ if (!is_aligned(relocated_strings_bottom, HeapRegion::GrainBytes)) {
relocated_strings_bottom was already relocated, so you don't need the "+
delta"
here. The bug was hidden because in all of our test runs, delta had been
a multiple of HeapRegion::GrainBytes, so that didn't affect the result
of the
is_align() call.
Then, just by chance (probably due to Address Space Layout Randomization
on MacOS), we have a delta / GrainBytes == (29509025792 / 4194304.0) =
7035.5,
so the bug is uncovered.
Thanks
- Ioi
More information about the hotspot-runtime-dev
mailing list