RFR: 8324833: Signed integer overflows in ABS [v5]
Dean Long
dlong at openjdk.org
Thu Mar 28 05:59:39 UTC 2024
On Thu, 22 Feb 2024 08:53:24 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> See the details in the bug. I think current `ABS` implementation is beyond repair, and we should just switch to `uabs`.
>>
>> Additional testing:
>> - [x] Linux x86_64 fastdebug, `all` with `-ftrapv` (now fully passes!)
>> - [x] Linux x86_64 fastdebug, `all`
>
> Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision:
>
> Fix a place where we cast to jlong after uabs
Unfortunately, I'm now convinced this is the wrong approach and introduces bugs. I would rather see illegal inputs caught (JDK-8328934) and prevented on a case-by-case basis (see JDK-8329163 for example).
-------------
Changes requested by dlong (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/17617#pullrequestreview-1965226153
More information about the graal-dev
mailing list