RFR(XXS): 8188109 JVM should print a warning message that -Xshare:on may cause VM to abort start-up
Ioi Lam
ioi.lam at oracle.com
Wed May 30 23:39:57 UTC 2018
https://bugs.openjdk.java.net/browse/JDK-8188109
http://cr.openjdk.java.net/~iklam/jdk11/8188109-xshare-on-print-warning.v01/
Hi,
Please review this one-liner patch.
-Xshare:on may cause infrequent/intermittent start-up failure due to the
presence of Address Space Layout Randomization (ASLR). This option is
intended for testing (the internals of CDS) only and should not be used
in production environments.
With this patch, the following warning message is printed when
-Xshare:on is specified:
$ java -Xshare:on -version
Java HotSpot(TM) 64-Bit Server VM warning: -Xshare:on is for testing
purpose only and may cause JVM start-up failure. Use -Xshare:auto instead.
java version "11-internal" 2018-09-25
Java(TM) SE Runtime Environment 18.9 (fastdebug build
11-internal+0-adhoc.iklam.open)
Java HotSpot(TM) 64-Bit Server VM 18.9 (fastdebug build
11-internal+0-adhoc.iklam.open, mixed mode, sharing)
--- vs ---
$ java-Xshare:auto -version
java version "11-internal" 2018-09-25
Java(TM) SE Runtime Environment 18.9 (fastdebug build
11-internal+0-adhoc.iklam.open)
Java HotSpot(TM) 64-Bit Server VM 18.9 (fastdebug build
11-internal+0-adhoc.iklam.open, mixed mode, sharing)
I am testing with HotSpot tiers 1-3 to make sure the tests don't get
tripped by this new warning message.
Thanks
- Ioi
More information about the hotspot-runtime-dev
mailing list