RFR: 8344026: Ubsan: prevent potential integer overflow in c1_LIRGenerator_<arch>.cpp file [v8]
Amit Kumar
amitkumar at openjdk.org
Thu Dec 12 07:56:41 UTC 2024
On Wed, 11 Dec 2024 12:05:07 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:
>>> Is this just undefined behaviour, but no compiler so far actually does something unexpected?
>>
>> Exactly. The compilers already seem to generate code which matches the unsigned behavior. Only UBSan checks found the issue. They run into the issue with existing tests which are passing when UBSan is disabled. Overflow doesn't cause errors when using "wrap around" behavior which matches the Java integer arithmetic semantics.
>
> Okay, thanks for the clarification!
> Tests would really be great. Is that possible?
@eme64 I have added one testcase. Can you have a look.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22144#discussion_r1881543473
More information about the hotspot-compiler-dev
mailing list