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

Chad Rakoczy duke at openjdk.org
Fri Oct 18 22:55:55 UTC 2024


On Fri, 11 Oct 2024 16:51:16 GMT, Chad Rakoczy <duke at openjdk.org> wrote:

> [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

This pull request has now been integrated.

Changeset: 401d0d6b
Author:    Chad Rakoczy <chadrako at amazon.com>
Committer: Paul Hohensee <phh at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/401d0d6b09ea422eacecda2900793a416097dc9b
Stats:     105 lines in 2 files changed: 102 ins; 0 del; 3 mod

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

Reviewed-by: thartmann, eastigeevich

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

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


More information about the hotspot-compiler-dev mailing list