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

Johan Sjölen jsjolen at openjdk.org
Wed Apr 30 09:43:25 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.

Johan Sjölen has updated the pull request incrementally with one additional commit since the last revision:

  Remove

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/24920/files
  - new: https://git.openjdk.org/jdk/pull/24920/files/3bba6a54..c9c706a0

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=24920&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24920&range=01-02

  Stats: 5 lines in 1 file changed: 0 ins; 4 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