RFR: 8275638: GraphKit::combine_exception_states fails with "matching stack sizes" assert [v2]

Roland Westrelin roland at openjdk.java.net
Mon Nov 29 09:34:14 UTC 2021


On Sun, 28 Nov 2021 11:30:02 GMT, Dean Long <dlong at openjdk.org> wrote:

>> Roland Westrelin has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   make test runnable with release build
>
> I tried calling
> 
>   set_sp(0);
>   clean_stack(0);
> 
> 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.

Thanks for looking at this @dean-long 

> The existing code is confusing to me. Are these exception states only used when we are actually throwing an exception, or can do they affect the state when deoptimizing?

They are only for throwing exceptions

> Why does GraphKit::add_exception_state() have a comment about arguments and compares stacks?

That makes little sense to me too.

> Why doesn't GraphKit::make_exception_state() just reset the stack using push_ex_oop() instead of preserving the stack wtih set_saved_ex_oop()?

I'm not sure about that either.

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

PR: https://git.openjdk.java.net/jdk/pull/6572


More information about the hotspot-compiler-dev mailing list