RFR(s): 8168790: CDS: assert(max_delta <= (0x7FFFFFFF)) failed: range check

Ioi Lam ioi.lam at oracle.com
Mon Nov 14 04:26:19 UTC 2016

Hi Jiangli,

The code change looks good to me.

For the test case, have you tested on 32-bit? Reservation of 1GB of 
address space may fail on 32-bit platforms.

   41        ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
   42             "-XX:SharedMiscCodeSize=1066924031", "-Xshare:dump");

I think it's better to limit the test case to run on only 64-bit platforms.

- Ioi

On 11/10/16 4:00 PM, Jiangli Zhou wrote:
> Hi,
> Please review the following fix for JDK-8168790 <https://bugs.openjdk.java.net/browse/JDK-8168790>.
>    http://cr.openjdk.java.net/~jiangli/8168790/webrev.00/ <http://cr.openjdk.java.net/~jiangli/8168790/webrev.00/>
> 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.
> Thanks,
> Jiangli

More information about the hotspot-runtime-dev mailing list