[lilliput-jdk17u:lilliput] Integrated: 8317957: [Lilliput/JDK17] Make C2 LoadNKlassCompactHeader more robust

Roman Kennke rkennke at openjdk.org
Thu Oct 12 14:54:24 UTC 2023


On Wed, 11 Oct 2023 13:28:20 GMT, Roman Kennke <rkennke at openjdk.org> wrote:

> 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

This pull request has now been integrated.

Changeset: ad69ec55
Author:    Roman Kennke <rkennke at openjdk.org>
URL:       https://git.openjdk.org/lilliput-jdk17u/commit/ad69ec552761e5991ec2ebe6ec2f5a4479b9e21e
Stats:     82 lines in 6 files changed: 56 ins; 20 del; 6 mod

8317957: [Lilliput/JDK17] Make C2 LoadNKlassCompactHeader more robust

Reviewed-by: shade

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

PR: https://git.openjdk.org/lilliput-jdk17u/pull/57


More information about the lilliput-dev mailing list