[jdk21u-dev] RFR: 8316422: TestIntegerUnsignedDivMod.java triggers "invalid layout" assert in FrameValues::validate
Roland Mesde
duke at openjdk.org
Wed Oct 29 22:39:59 UTC 2025
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.
-------------
Commit messages:
- Backport 5e1b771a19962042a0020a9148e94e14d63025ee
Changes: https://git.openjdk.org/jdk21u-dev/pull/2421/files
Webrev: https://webrevs.openjdk.org/?repo=jdk21u-dev&pr=2421&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8316422
Stats: 184 lines in 6 files changed: 139 ins; 18 del; 27 mod
Patch: https://git.openjdk.org/jdk21u-dev/pull/2421.diff
Fetch: git fetch https://git.openjdk.org/jdk21u-dev.git pull/2421/head:pull/2421
PR: https://git.openjdk.org/jdk21u-dev/pull/2421
More information about the jdk-updates-dev
mailing list