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

Aleksey Shipilev shade at openjdk.org
Wed May 31 11:50:50 UTC 2023


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)

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

Commit messages:
 - Fix

Changes: https://git.openjdk.org/lilliput-jdk17u/pull/30/files
 Webrev: https://webrevs.openjdk.org/?repo=lilliput-jdk17u&pr=30&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8309197
  Stats: 9 lines in 1 file changed: 5 ins; 0 del; 4 mod
  Patch: https://git.openjdk.org/lilliput-jdk17u/pull/30.diff
  Fetch: git fetch https://git.openjdk.org/lilliput-jdk17u.git pull/30/head:pull/30

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


More information about the lilliput-dev mailing list