RFR: 8367002: Missing compiled exception handler for "recursive" exception [v4]
Dean Long
dlong at openjdk.org
Wed Oct 8 23:17:40 UTC 2025
> In some rare cases, such as a catch type that is loadable but inaccessible, a compiled exception handler may be missing, causing exception handling to incorrectly skip that handler. Instead, with this fix, we will deoptimize and let the interpreter handle it. This aligns compiled execution with interpreted. The new test checks this with a somewhat odd construction: an exception handler that is considered not because it is a match, but because the type in the catch is inaccessible. In this case the interpreter rethrows IllegalAccessError, not from the bci of the instruction that caused the original exception, but from the bci of the non-matching exception handler. Whether or not this is the correct behavior for the interpreter is a separate issue. For now the compiler will continue to follow the precedent set by the interpreter.
Dean Long has updated the pull request incrementally with one additional commit since the last revision:
Delete test/hotspot/jtreg/compiler/exceptions/a
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/27683/files
- new: https://git.openjdk.org/jdk/pull/27683/files/5236804b..9f70a47b
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=27683&range=03
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=27683&range=02-03
Stats: 26 lines in 1 file changed: 0 ins; 26 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/27683.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/27683/head:pull/27683
PR: https://git.openjdk.org/jdk/pull/27683
More information about the hotspot-dev
mailing list