RFR: 8042243: Map shared archive to preallocated static address

Yumin Qi yumin.qi at oracle.com
Mon May 5 23:15:29 UTC 2014


Hi, Please have codereview for

8042243: Map shared archive to preallocated static address

webrev: http://cr.openjdk.java.net/~minqi/8042243/webrev00/
bug: https://bugs.openjdk.java.net/browse/JDK-8042243

Summary: Mapping shared archive (jsa) some time fail due to ASLR 
(Address space layout randomization) on 32bit Linux platforms. To solve 
we come up with mapping shared archive to preallocated static space 
since with Linux and the GCC compiler, the BSS section in the main 
executable is not randomized, instead, the variable address in the BSS 
section is fixed at build time. The tests also showed the extra 32M 
space will NOT affect java memory setting though it seems 32M virtual 
address space always allocated no matter it is used or not (If 
-XX:ShareBaseAddress supply alternative address for dumping, the static 
address will be ignored.) Note the changes is for 32 bit Linux only.

Tests: JPRT, manual test for archive sharing.

Thanks
Yumin



More information about the core-libs-dev mailing list