RFR: 8326692: JVMCI Local.endBci is off-by-one [v2]

Gilles Duboscq gdub at openjdk.org
Sat Mar 2 17:58:01 UTC 2024


> In class files, in the local variable table, local variables have a start BCI and a length. The local variable has a value from BCI (inclusive) until BCI + length (exclusive).
> On the other end, JVMCI stores that information in `Local` objects with a start BCI and an end BCI (inclusive).
> Currently the parser just uses BCI+length to compute the end BCI, leading to an off-by-one error.
> 
> A simple test checking that the start and end BCIs are within the method's bytecode is added. It fails without the fix.

Gilles Duboscq has updated the pull request incrementally with one additional commit since the last revision:

  Add note about zero-length locals

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/18087/files
  - new: https://git.openjdk.org/jdk/pull/18087/files/90e96b4e..fe1ee476

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

  Stats: 2 lines in 1 file changed: 2 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/18087.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/18087/head:pull/18087

PR: https://git.openjdk.org/jdk/pull/18087


More information about the hotspot-compiler-dev mailing list