[lilliput-jdk17u:lilliput] RFR: 8317957: [Lilliput/JDK17] Make C2 LoadNKlassCompactHeader more robust [v5]
Roman Kennke
rkennke at openjdk.org
Thu Oct 12 14:51:40 UTC 2023
> Backport of https://github.com/openjdk/lilliput/pull/111. I needed to extract the body into helper methods in order to match mainline version. Other than that, the changes are identical.
>
> 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 incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision:
- Merge branch 'lilliput' into JDK-8317957
- Accept indexed address
- Merge remote-tracking branch 'origin/JDK-8317957' into JDK-8317957
- Add missing includes
- Fix scale decoding
- 8317957: [Lilliput/JDK17] Make C2 LoadNKlassCompactHeader more robust
-------------
Changes:
- all: https://git.openjdk.org/lilliput-jdk17u/pull/57/files
- new: https://git.openjdk.org/lilliput-jdk17u/pull/57/files/6aa35299..9591ebbf
Webrevs:
- full: https://webrevs.openjdk.org/?repo=lilliput-jdk17u&pr=57&range=04
- incr: https://webrevs.openjdk.org/?repo=lilliput-jdk17u&pr=57&range=03-04
Stats: 315700 lines in 2856 files changed: 198947 ins; 93422 del; 23331 mod
Patch: https://git.openjdk.org/lilliput-jdk17u/pull/57.diff
Fetch: git fetch https://git.openjdk.org/lilliput-jdk17u.git pull/57/head:pull/57
PR: https://git.openjdk.org/lilliput-jdk17u/pull/57
More information about the lilliput-dev
mailing list