[lilliput-jdk17u:lilliput] RFR: 8309197: [Lilliput/JDK17] Fix ObjectSampleMarker without Lilliput

Roman Kennke rkennke at openjdk.org
Thu Jun 1 10:45:32 UTC 2023


On Wed, 31 May 2023 11:43:31 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> The change in ObjectSampleMarker, a part of JFR, is incorrect when Lilliput is off. It would reach to `set_narrow_klass` and `narrow_klass` unconditionally, but that is only safe to do when `UseCompactObjectHeader` is on.
> 
> This would be caught by assert in `set_narrow_klass` and `narrow_klass` with `-UCOH`. AFAICS, this has a chance to corrupt the header in release bits, as it would copy only the parts of the mark word, and we might be just lucky those are the same bits. 
> 
> Additional testing:
>  - [x] macos-aarch64-server-fastdebug, `jdk/jfr/event/oldobject` with `-XX:-UseCompactObjectHeaders` (passes now)
>  - [x] macos-aarch64-server-fastdebug, `jdk/jfr/event/oldobject` with `-XX:+UseCompactObjectHeaders` (still fails, with unrelated problems)

Looks good to me!
As noted earlier, #20 is perhaps more comprehensive because it avoids using the mark-word altogether, but what you propose seems less intrusive.

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

Marked as reviewed by rkennke (Reviewer).

PR Review: https://git.openjdk.org/lilliput-jdk17u/pull/30#pullrequestreview-1455156519


More information about the lilliput-dev mailing list