[lworld] RFR: 8257965: [lworld] C2 compilation fails with assert(unc->peek_monitor_obj() == obj) failed: wrong monitor
Tobias Hartmann
thartmann at openjdk.java.net
Wed Dec 9 14:28:57 UTC 2020
The assert is too strong because when locking on an object that became known to be an inline type only after parsing, C2 might have scalarized `peek_monitor_obj()` in the debug info of the uncommon trap. I've adjusted the assert but found another problem while writing tests: C2 can eliminate a lock even if the type is not statically known (and therefore could be an inline type) as long as Escape Analysis is able to prove that he object is non-escaping (see `TestLWorld::test133`). We need to add an inline type check to `PhaseMacroExpand::eliminate_locking_node` as well.
Thanks,
Tobias
-------------
Commit messages:
- 8257965: [lworld] C2 compilation fails with assert(unc->peek_monitor_obj() == obj) failed: wrong monitor
Changes: https://git.openjdk.java.net/valhalla/pull/299/files
Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=299&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8257965
Stats: 202 lines in 7 files changed: 144 ins; 42 del; 16 mod
Patch: https://git.openjdk.java.net/valhalla/pull/299.diff
Fetch: git fetch https://git.openjdk.java.net/valhalla pull/299/head:pull/299
PR: https://git.openjdk.java.net/valhalla/pull/299
More information about the valhalla-dev
mailing list