RFR: 8344026: Ubsan: prevent potential integer overflow in c1_LIRGenerator_<arch>.cpp file [v8]
Emanuel Peter
epeter at openjdk.org
Wed Dec 4 10:14:42 UTC 2024
On Wed, 4 Dec 2024 10:10:06 GMT, Andrew Haley <aph at openjdk.org> wrote:
>>>And do you have some sort of tests for this, to make sure we check with all possible c values?
>>
>> No, as of now I only ran tier1 test cases with c1 compiler. Nothing else.
>
> All that `java_add` does is cast to unsigned and then add. That's equivalent to what we're doing here, but explicit casts make the arithmetic clearer, IMO.
Ok, I forgot that unsigned has properly defined overflow semantics.
> No, as of now I only ran tier1 test cases with c1 compiler. Nothing else.
Tests would really be great. Is that possible?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22144#discussion_r1869132100
More information about the hotspot-compiler-dev
mailing list