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

Roland Mesde duke at openjdk.org
Fri Nov 7 16:17:13 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.

This pull request has now been integrated.

Changeset: a04888ab
Author:    Roland Mesde <mesde at amazon.com>
Committer: Paul Hohensee <phh at openjdk.org>
URL:       https://git.openjdk.org/jdk21u-dev/commit/a04888abdae5b4ac7fe636b177f10ac1afa4ea5d
Stats:     184 lines in 6 files changed: 139 ins; 18 del; 27 mod

8316422: TestIntegerUnsignedDivMod.java triggers "invalid layout" assert in FrameValues::validate

Backport-of: 5e1b771a19962042a0020a9148e94e14d63025ee

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

PR: https://git.openjdk.org/jdk21u-dev/pull/2421


More information about the jdk-updates-dev mailing list