RFR: 8355711: Fix incorrect overflow check in RawBytecodeStream::raw_next
Johan Sjölen
jsjolen at openjdk.org
Mon Apr 28 13:32:26 UTC 2025
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.
-------------
Commit messages:
- Correct integer overflow test
Changes: https://git.openjdk.org/jdk/pull/24920/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24920&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8355711
Stats: 4 lines in 1 file changed: 2 ins; 1 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/24920.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/24920/head:pull/24920
PR: https://git.openjdk.org/jdk/pull/24920
More information about the hotspot-runtime-dev
mailing list