RFR: 8316422: TestIntegerUnsignedDivMod.java triggers "invalid layout" assert in FrameValues::validate
Dean Long
dlong at openjdk.org
Fri Oct 20 22:07:28 UTC 2023
On Fri, 20 Oct 2023 21:58:06 GMT, Dean Long <dlong at openjdk.org> wrote:
> Don't truncate caller exception state stack in c1, even if no handlers are found. This makes c1 follow the example of c2. See bug for details.
Some details. When throwing an exception, the top frame pops everything from the stack before pushing the exception object, so the exception state recorded for deoptimization does the same. However, c1 was incorrectly emptying the stack for caller frames as well. Now, instead of emptying the stack for the caller, we mark those slots invalid.
For locals, c1 front-end was also removing all the locals, then adding them back before generating the deopt info. Now locals are invalidated like the stack if there is not exception handler.
Finally, local values need to be retained instead of invalidated when JVMTI is enabled. I refactored the code to simplify this logic.
Some iterators needed to be changed to support nullptr values in the stack state. This was already supported for locals, so now stack/local treatment is more uniform.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/16297#issuecomment-1773450606
More information about the hotspot-compiler-dev
mailing list