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

Andrew Haley aph at redhat.com
Wed May 16 08:24:05 UTC 2018


On 05/16/2018 09:10 AM, Aleksey Shipilev wrote:
> On 05/16/2018 10:02 AM, Severin Gehwolf wrote:
>> $ bash imageFile.o.cmdline 
>> /disk/openjdk/upstream-sources/openjdk-hs/src/java.base/share/native/libjimage/imageFile.cpp:60:33: error: macro "assert" passed 2 arguments, but takes just 1
>>      assert(seed > 0, "invariant");
> 
> Oh, WTF! So it is the trick to print the assert message with C asserts.

Yikes!  WTF indeed.  :-)

-- 
Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671


More information about the core-libs-dev mailing list