RFR: 8335662: [AArch64] C1: guarantee(val < (1ULL << nbits)) failed: Field too big for insn [v3]

Chad Rakoczy duke at openjdk.org
Thu Oct 17 21:12:35 UTC 2024


> [JDK-8335662](https://bugs.openjdk.org/browse/JDK-8335662)
> 
> Crash occurs in C1 during OSR when copying locks from interpreter frame to compiled frame. All loads used immediate offset regardless of offset size causing crash when it is over the max size for the instruction (32760). Fix is to check the size before preforming the load and storing the offset in a register if needed.
> 
> I believe the risk is low because there will be no change to the instruction if the immediate offset fits in the load instruction. The instruction is only updated when the `offset_ok_for_immed` check fails which would cause the crash anyways
> 
> Confirmed that added test fails before patch and passes after

Chad Rakoczy has updated the pull request incrementally with two additional commits since the last revision:

 - Remove jasm file
 - Update test

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/21473/files
  - new: https://git.openjdk.org/jdk/pull/21473/files/51298397..dfbe03de

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=21473&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=21473&range=01-02

  Stats: 337 lines in 3 files changed: 102 ins; 235 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/21473.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/21473/head:pull/21473

PR: https://git.openjdk.org/jdk/pull/21473


More information about the hotspot-compiler-dev mailing list