RFR: 8275638: GraphKit::combine_exception_states fails with "matching stack sizes" assert
Roland Westrelin
roland at openjdk.java.net
Fri Nov 26 10:17:31 UTC 2021
Root cause is identical to 8273165 AFIU: late inline of a virtual call
can throw from 2 different paths (null check and the call
itself). That breaks because the logic for exceptions expects the
stack for all paths that throw exceptions to have the same stack size.
AFAIU, the stack doesn't matter exception handling: either the
exception is caught by a exception handler and then the stack is
popped and the exception is pushed or, the exception is rethrown to
the caller in which case the current stack is also popped (that is the
jvm state for the current method). As a consequence the fix I propose
is to ignore the stack in GraphKit::combine_exception_states().
AFAIU, the same fix would work for 8273165 but I left the current work
around as is: not sure if we want to be conservative for now or not
-------------
Commit messages:
- more
- fix
Changes: https://git.openjdk.java.net/jdk/pull/6572/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6572&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8275638
Stats: 85 lines in 2 files changed: 81 ins; 2 del; 2 mod
Patch: https://git.openjdk.java.net/jdk/pull/6572.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/6572/head:pull/6572
PR: https://git.openjdk.java.net/jdk/pull/6572
More information about the hotspot-compiler-dev
mailing list