RFR(s): 8168790: CDS: assert(max_delta <= (0x7FFFFFFF)) failed: range check
jiangli.zhou at Oracle.COM
Fri Nov 11 00:00:53 UTC 2016
Please review the following fix for JDK-8168790 <https://bugs.openjdk.java.net/browse/JDK-8168790>.
The assert(max_delta <= MAX_SHARED_DELTA, "range check”) in CompactSymbolTableWriter::add(unsigned in hash, Symbol *symbol) was not necessary and over restrictive.
Currently only shared symbols use encoding with delta to the shared space base. The shared symbols are allocated in the RO space, which is first space in the shared archive. The RO space cannot be larger than MAX_SHARED_READ_ONLY_SIZE (the check is done as part of the VM argument checks). MAX_SHARED_READ_ONLY_SIZE is (MAX_SHARED_DELTA - RW_size - MC_size - MD_size). I changed the assertion to make sure the currently ‘delta' is encodable (less than MAX_SHARED_DELTA).
Tested with JPRT, RBT runtime and AppCDS tests.
More information about the hotspot-runtime-dev