RFR: 8275638: GraphKit::combine_exception_states fails with "matching stack sizes" assert [v2]
Dean Long
dlong at openjdk.java.net
Tue Nov 30 18:52:07 UTC 2021
On Tue, 30 Nov 2021 08:42:21 GMT, Roland Westrelin <roland at openjdk.org> wrote:
> If we're missing something, wouldn't testing catch it? Wouldn't running that patch through extensive testing help then?
Normally, I would say yes, but my impression is that we don't have great test coverage for this issue, and I'm concerned that this close to the RDP1 date we should go with the most conservative fix.
Out of curiosity, I checked when the "Keep its stack, for now" comment was added, and it was for JDK-4432078. The comment in the bug says:
"Missing stack contents in graphkit-based exceptions make it impossible
to re-run the trapping bytecode in the interpreter. Fix is to retain
stack information a little longer."
which again brings up my concern that this exception information may be used for deoptimization. Prior to JDK-4432078, it appears that we did truncate the stack size before pushing the exception object, and that apparently led to problems. Given this new information, this change makes me especially nervous:
- // Skip everything in the JVMS after tos. (The ex_oop follows.)
- if (i == tos) i = ex_jvms->monoff();
+ // Skip everything in the JVMS after the stack (included). (The ex_oop follows.)
+ if (i == ex_jvms->stkoff()) i = ex_jvms->monoff();
-------------
PR: https://git.openjdk.java.net/jdk/pull/6572
More information about the hotspot-compiler-dev
mailing list