Integrated: 8367002: Missing compiled exception handler for "recursive" exception
Dean Long
dlong at openjdk.org
Wed Oct 22 22:05:07 UTC 2025
On Wed, 8 Oct 2025 02:09:47 GMT, Dean Long <dlong at openjdk.org> wrote:
> 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.
This pull request has now been integrated.
Changeset: 0744db83
Author: Dean Long <dlong at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/0744db8366183a0fd07f42ee1ce6ef677bf4136e
Stats: 166 lines in 6 files changed: 155 ins; 7 del; 4 mod
8367002: Missing compiled exception handler for "recursive" exception
Reviewed-by: thartmann, kvn
-------------
PR: https://git.openjdk.org/jdk/pull/27683
More information about the hotspot-dev
mailing list