RFR: 8335664: Parsing jsr broken: assert(bci>= 0 && bci < c->method()->code_size()) failed: index out of bounds
Dean Long
dlong at openjdk.org
Tue Aug 20 17:24:04 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.
What happens if the `jsr` is followed by illegal bytecodes that are unreachable, because the `jsr` has no `ret`? Does GenerateOopMap still try to process the unreachable illegal bytecodes?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/20645#issuecomment-2299369679
More information about the hotspot-dev
mailing list