RFR: 8357250: assert(shift >= 0 && shift < 4) failed: unexpected compressd klass shift!

Tobias Hartmann thartmann at openjdk.org
Tue May 20 14:54:52 UTC 2025


On Tue, 20 May 2025 14:34:20 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

> Several fixes for AOT code generation:
>   - Use `CompressedKlassPointers::max_shift()` in asserts to take into account  Compact Object Headers (the asserts are present only in aarch64 code)
>   - Increase table stub size on aarch64 when AOT specialized code is used for klass decoding (hit assert there otherwise)
>   - Fix "copy-paste" typo in `RelocIterator()` which incorrectly overwrite the start address of instruction section (restored relocations in AOTed exception blob was wrong and AOT tests failed when deoptimization happened)
>   - Removed `vm.flagless` from AOT code tests to increase testing coverage (otherwise they were run only in tier1)
>   - Add additions `@requires` to tests for expected execution configuration
> 
> Tested hs-tier1-10, Xcomp, stress

Changes requested by thartmann (Reviewer).

src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp line 5352:

> 5350:   // not the shift because it is not allowed to change
> 5351:   int shift = CompressedKlassPointers::shift();
> 5352:   assert(shift >= 0 && shift <= CompressedKlassPointers::max_shift(), "unexpected compressd klass shift!");

Suggestion:

  assert(shift >= 0 && shift <= CompressedKlassPointers::max_shift(), "unexpected compressed klass shift!");

src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp line 5418:

> 5416:   // not the shift because it is not allowed to change
> 5417:   int shift = CompressedKlassPointers::shift();
> 5418:   assert(shift >= 0 && shift <= CompressedKlassPointers::max_shift(), "unexpected compressd klass shift!");

Suggestion:

  assert(shift >= 0 && shift <= CompressedKlassPointers::max_shift(), "unexpected compressed klass shift!");

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

PR Review: https://git.openjdk.org/jdk/pull/25330#pullrequestreview-2854545412
PR Review Comment: https://git.openjdk.org/jdk/pull/25330#discussion_r2098191379
PR Review Comment: https://git.openjdk.org/jdk/pull/25330#discussion_r2098191589


More information about the hotspot-compiler-dev mailing list