RFR: 8335664: Parsing jsr broken: assert(bci>= 0 && bci < c->method()->code_size()) failed: index out of bounds
Matias Saavedra Silva
matsaave at openjdk.org
Tue Aug 20 14:23:14 UTC 2024
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.
-------------
Commit messages:
- Merge branch 'master' into jsr_8335664
- 8335664: Parsing jsr broken: assert(bci>= 0 && bci < c->method()->code_size()) failed: index out of bounds
Changes: https://git.openjdk.org/jdk/pull/20645/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20645&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8335664
Stats: 14 lines in 1 file changed: 6 ins; 6 del; 2 mod
Patch: https://git.openjdk.org/jdk/pull/20645.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/20645/head:pull/20645
PR: https://git.openjdk.org/jdk/pull/20645
More information about the hotspot-dev
mailing list