RFR: 8324833: Signed integer overflows in ABS [v3]
Aleksey Shipilev
shade at openjdk.org
Fri Feb 2 09:47:28 UTC 2024
On Thu, 1 Feb 2024 20:23:04 GMT, Dean Long <dlong at openjdk.org> wrote:
>> Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Touchups
>
> src/hotspot/share/jvmci/jvmciCompilerToVM.cpp line 1063:
>
>> 1061: int64_t off_low = (int64_t)target_addr - ((int64_t)CodeCache::low_bound() + sizeof(int));
>> 1062: int64_t off_high = (int64_t)target_addr - ((int64_t)CodeCache::high_bound() + sizeof(int));
>> 1063: return MAX2(ABS(off_low), ABS(off_high));
>
> Wouldn't this trigger a warning with -Wsign-conversion enabled?
Maybe? I added `checked_cast` in this place in new commit.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17617#discussion_r1475807979
More information about the hotspot-dev
mailing list