RFR: 8275638: GraphKit::combine_exception_states fails with "matching stack sizes" assert [v2]
Roland Westrelin
roland at openjdk.java.net
Mon Nov 29 10:11:06 UTC 2021
On Sun, 28 Nov 2021 11:30:02 GMT, Dean Long <dlong at openjdk.org> wrote:
> in GraphKit::make_exception_state() and it seems to work, but I still don't understand why the stack size mismatch only shows up with late inlining.
At parse time, exception throwing goes through Parse::do_exceptions() which either:
- pops the current frame in Parse::throw_to_exit() so there can't be a stack size mismatch anymore if "exception states" are combined later on
or
- push the exception on the stack in Parse::catch_inline_exceptions() which causes the stack to be resized. When that code path is taken there can be 2 "exception states" for a single bci (the null check and the exception from the call in the case of a virtual call) and they are not "combined" (the explicit test in GraphKit::add_exception_state() prevents that).
I agree that this all feels tortuous but not sure if cleaning it up as part of this change is the best thing to do.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6572
More information about the hotspot-compiler-dev
mailing list