RFR: 8370766: JVM crashes when running compiler/exceptions/TestAccessErrorInCatch.java fails with -XX:+VerifyStack [v3]

Dean Long dlong at openjdk.org
Mon Dec 1 22:30:50 UTC 2025


On Mon, 1 Dec 2025 22:26:10 GMT, Dean Long <dlong at openjdk.org> wrote:

>> The problem is C2 is throwing an exception and then deoptimizing, and the -XX:+VerifyStack logic expects the stack to be empty, match the "before" state if the reexecute flag is set, or match the "after" state.  C2 is using the "before" state, so for correctness it also needs to set the reexecute flag.
>> 
>> I played around with other approaches, like:
>> 1. setting the stack to empty
>> 2. adding all the bytecodes that can throw to the list in AbstractInterpreter::bytecode_should_reexecute()
>> 3. always setting the reexecute flag in add_safepoint_edges() if must_throw is set
>> but in the end I decided to go with the minimal localized low-risk change.
>
> Dean Long has updated the pull request incrementally with one additional commit since the last revision:
> 
>   add bugid

I added the bugid to the test, so I'll need a quick re-review.

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

PR Comment: https://git.openjdk.org/jdk/pull/28486#issuecomment-3599232577


More information about the hotspot-compiler-dev mailing list