RFR: 8203223: Signed integer overflow in ImageStrings::hash_code (libjimage.so) (original) (raw)

Severin Gehwolf sgehwolf at redhat.com
Tue May 15 16:11:54 UTC 2018


Hi,

Could somebody please review this patch for libjimage.so. It fixes one instance of undefined behavour (signed integer overflow), which prevents JDK 11 to build on Fedora 28 (GCC 8) with a rather strange error:

./build/linux-x86_64-normal-server-fastdebug/support/interim-image/bin/java -version Error occurred during initialization of VM java/lang/NoClassDefFoundError: java/lang/Object

The proposed fix is to perform the calculations on a local variable of unsigned type where overflow is well defined.

Bug: https://bugs.openjdk.java.net/browse/JDK-8203223 webrev: http://cr.openjdk.java.net/~sgehwolf/webrevs/JDK-8203223/webrev.01/

Testing: tools/jlink tests (no new failures), currently running through jdk-submit.

Thanks, Severin



More information about the core-libs-dev mailing list