[jdk21u-dev] RFR: 8320682: [AArch64] C1 compilation fails with "Field too big for insn"
Boris Ulasevich
bulasevich at openjdk.org
Thu Sep 5 17:31:14 UTC 2024
Hi all,
This is a backport of [JDK-8320682](https://github.com/openjdk/jdk/pull/16951) change to fix C1 internal error caused by adr limit being broken by too large NMethodSizeLimit option value.
The backported patch includes a change to the TestC1Globals.java that does not yet exist in the jdk21u codebase. In the mainline the test has four updates:
- [1] https://github.com/openjdk/jdk/commit/7df73a23
- [2] https://github.com/openjdk/jdk/commit/c36ec2ca
- [3] https://github.com/openjdk/jdk/commit/69014cd5 (this change)
- [4] https://github.com/openjdk/jdk/commit/27d5f5c2
With this change I simply copy version [3] of TestC1Globals.java corresponding to this change in jdk-23. Why not backport [1]+[2]+[3] to have a clean incremental patch?
- I do not think [1] fits the backporting rules (not a crash fix, and not very important)
- change [3] is stronger than change [2] (once NMethodSizeLimit is limited, no need to gracefully handle large values)
Testing: jtreg tier1-3.
Without the patch `$ fastdebug/bin/java -XX:NMethodSizeLimit=4M` causes the `guarantee(chk == -1 || chk == 0) failed: Field too big for insn`. With the change the 4M value becomes invalid.
-------------
Commit messages:
- Backport 69014cd55b59a0a63f4918fad575a6887640573e
Changes: https://git.openjdk.org/jdk21u-dev/pull/956/files
Webrev: https://webrevs.openjdk.org/?repo=jdk21u-dev&pr=956&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8320682
Stats: 71 lines in 2 files changed: 69 ins; 0 del; 2 mod
Patch: https://git.openjdk.org/jdk21u-dev/pull/956.diff
Fetch: git fetch https://git.openjdk.org/jdk21u-dev.git pull/956/head:pull/956
PR: https://git.openjdk.org/jdk21u-dev/pull/956
More information about the jdk-updates-dev
mailing list