Integrated: 8326692: JVMCI Local.endBci is off-by-one

Gilles Duboscq gdub at openjdk.org
Sun Mar 3 11:08:55 UTC 2024


On Fri, 1 Mar 2024 17:48:51 GMT, Gilles Duboscq <gdub at openjdk.org> wrote:

> 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.

This pull request has now been integrated.

Changeset: 31ac8714
Author:    Gilles Duboscq <gdub at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/31ac8714e0593f2feaa8e9ebaf32bab904ba6d11
Stats:     33 lines in 3 files changed: 29 ins; 1 del; 3 mod

8326692: JVMCI Local.endBci is off-by-one

Reviewed-by: dnsimon, never, gli

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

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


More information about the hotspot-compiler-dev mailing list