Integrated: 8335664: Parsing jsr broken: assert(bci>= 0 && bci < c->method()->code_size()) failed: index out of bounds
Matias Saavedra Silva
matsaave at openjdk.org
Thu Aug 22 15:58:11 UTC 2024
On Tue, 20 Aug 2024 14:12:55 GMT, Matias Saavedra Silva <matsaave at openjdk.org> wrote:
> Although JSR bytecodes cannot be generated by javac anymore, a classfile generated with a tool like JASM can still contain this bytecode. Should a program end with a JSR, there will be undefined behavior since the bytecode reads the address of the next instruction. In the case of Hotspot, this leads to a crash when generating oop maps. This fixes the calculation of basic blocks.
>
> The early exploration of this issue was done by @eme64 who also generated a reproducer.
This pull request has now been integrated.
Changeset: 6041c936
Author: Matias Saavedra Silva <matsaave at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/6041c936d6dd39c5b3a89ed2823b25a8aef42b9f
Stats: 127 lines in 4 files changed: 118 ins; 6 del; 3 mod
8335664: Parsing jsr broken: assert(bci>= 0 && bci < c->method()->code_size()) failed: index out of bounds
Co-authored-by: Emanuel Peter <epeter at openjdk.org>
Reviewed-by: dlong, thartmann
-------------
PR: https://git.openjdk.org/jdk/pull/20645
More information about the hotspot-dev
mailing list