[lworld] RFR: 8323781: [lworld] Synchronization on inline type does not throw IllegalMonitorStateException with lightweight locking
Christian Hagedorn
chagedorn at openjdk.org
Thu Jan 18 09:09:00 UTC 2024
[JDK-8315880](https://bugs.openjdk.org/browse/JDK-8315880) sets `LM_LIGHTWEIGHT` as new default locking mode which revealed an existing bug after the merge of jdk-22+16 (triggers already before the merge by explicitly setting `-XX:LockingMode=2`). JDK-8315880 was backed out again in jdk-22+24 ([JDK-8319253](https://bugs.openjdk.org/browse/JDK-8319253)). But the backout is not yet merged in. The REDO [JDK-8319251](https://bugs.openjdk.org/browse/JDK-8319251) is still open. Maybe we need to add some runs in the CI in the future which test all three locking modes.
This patch fixes a problem in the newly added lightweight locking code ([JDK-8291555](https://bugs.openjdk.org/browse/8291555)) where we forgot to mask the inline type bit in the mark word. This patch fixes that and unlists the problemlisted tests.
Thanks,
Christian
-------------
Commit messages:
- 8323781: [lworld] Synchronization on inline type does not throw IllegalMonitorStateException with lightweight locking
Changes: https://git.openjdk.org/valhalla/pull/972/files
Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=972&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8323781
Stats: 12 lines in 3 files changed: 9 ins; 3 del; 0 mod
Patch: https://git.openjdk.org/valhalla/pull/972.diff
Fetch: git fetch https://git.openjdk.org/valhalla.git pull/972/head:pull/972
PR: https://git.openjdk.org/valhalla/pull/972
More information about the valhalla-dev
mailing list