[jdk21u-dev] RFR: 8316422: TestIntegerUnsignedDivMod.java triggers "invalid layout" assert in FrameValues::validate
Goetz Lindenmaier
goetz at openjdk.org
Thu Oct 30 13:01:02 UTC 2025
On Tue, 28 Oct 2025 19:16:31 GMT, Roland Mesde <duke at openjdk.org> wrote:
> Backporting JDK-8316422: TestIntegerUnsignedDivMod.java triggers "invalid layout" assert in FrameValues::validate. 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.
>
> Ran GHA Sanity Checks (passed) and adjusted tests (passed). Patch is clean.
Hi @rm-gh-8
this is a change to C1, a rather fragile but very important component of openJDK. Just running GHA is not sufficient to make sure this does not introduce a regression. Please run some larger tests, best on some different platforms, and then label again. Thanks.
-------------
PR Comment: https://git.openjdk.org/jdk21u-dev/pull/2421#issuecomment-3467862127
More information about the jdk-updates-dev
mailing list