[jdk21u-dev] RFR: 8316422: TestIntegerUnsignedDivMod.java triggers "invalid layout" assert in FrameValues::validate

duke duke at openjdk.org
Fri Nov 7 16:01:11 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.

@rm-gh-8 
Your change (at version 7ffbd6c7df04db7476a9fcdbebff42907b978443) is now ready to be sponsored by a Committer.

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

PR Comment: https://git.openjdk.org/jdk21u-dev/pull/2421#issuecomment-3503366458


More information about the jdk-updates-dev mailing list