RFR: 8367002: Missing compiled exception handler for "recursive" exception [v4]

David Holmes dholmes at openjdk.org
Thu Oct 9 02:34:08 UTC 2025


On Wed, 8 Oct 2025 23:17:40 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.
>
> Dean Long has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Delete test/hotspot/jtreg/compiler/exceptions/a

Thanks for the test adjustments. Sorry I can't review the main fix though.

-------------

PR Review: https://git.openjdk.org/jdk/pull/27683#pullrequestreview-3317023660


More information about the hotspot-dev mailing list