[master] RFR: 8317812: [Lilliput] Make C2 LoadNKlassCompactHeader more robust [v5]

Roman Kennke rkennke at openjdk.org
Wed Oct 11 16:43:47 UTC 2023


> Lilliput's C2 code for generating LoadNKlass currently assumes that the disp of the incoming address is klass_offset_in_bytes. It then extracts the base register and loads from the mark_offset_in_bytes instead.
> Sometimes (apparently very rarely) it happens that C2 emits code that pre-adds obj+klass_offset into a register, and uses that as base, but with offset 0. In this case we would trip the assert or crash in release builds.
> 
> - [x] specjvm derby (which triggered the bug)
> - [x] tier1 x86_64 +UCOH
> - [x] tier1 aarch64 +UCOH

Roman Kennke has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 18 commits:

 - Merge branch 'master' into JDK-8317812
 - Fix build
 - Merge branch 'JDK-8317352' into JDK-8317812
 - Restore original code
 - Merge branch 'JDK-8317352' into JDK-8317812
 - Revert C2 klass_offset changes
 - Fix whitespace
 - x86 parts
 - Fix offset
 - 8317812: [Lilliput] Make C2 LoadNKlassCompactHeader more robust
 - ... and 8 more: https://git.openjdk.org/lilliput/compare/39f08e70...e2243a18

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

Changes: https://git.openjdk.org/lilliput/pull/111/files
 Webrev: https://webrevs.openjdk.org/?repo=lilliput&pr=111&range=04
  Stats: 37 lines in 6 files changed: 25 ins; 2 del; 10 mod
  Patch: https://git.openjdk.org/lilliput/pull/111.diff
  Fetch: git fetch https://git.openjdk.org/lilliput.git pull/111/head:pull/111

PR: https://git.openjdk.org/lilliput/pull/111


More information about the lilliput-dev mailing list