RFR: 8355711: Remove incorrect overflow check in RawBytecodeStream::raw_next [v3]

Matias Saavedra Silva matsaave at openjdk.org
Fri May 2 15:17:48 UTC 2025


On Wed, 30 Apr 2025 09:43:25 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:

>> Hi,
>> 
>> This fixes a typical wrong overflow check. `_bci` and `_next_bci` are both `int`, so any overflow is undefined, therefore an optimizing C++ compiler is allowed to remove this check. When looking at the x64 assembly for this, I could not find the check, so I guess that it was actually removed as well.
>
> Johan Sjölen has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Remove

LGTM! I don't see any potential overflow since `_end_bci` and `_next_bci` are bound by u2

-------------

Marked as reviewed by matsaave (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/24920#pullrequestreview-2812269289


More information about the hotspot-runtime-dev mailing list