RFR: 8355711: Fix incorrect overflow check in RawBytecodeStream::raw_next
Quan Anh Mai
qamai at openjdk.org
Mon Apr 28 14:03:47 UTC 2025
On Mon, 28 Apr 2025 13:18:53 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.
Or you can use `java_add` which may be easier to reason about.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/24920#issuecomment-2835356056
More information about the hotspot-runtime-dev
mailing list