[lworld] RFR: 8257965: [lworld] C2 compilation fails with assert(unc->peek_monitor_obj() == obj) failed: wrong monitor [v2]

Tobias Hartmann thartmann at openjdk.java.net
Wed Dec 9 15:09:02 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

Tobias Hartmann has updated the pull request incrementally with one additional commit since the last revision:

  Removed too strong assert

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

Changes:
  - all: https://git.openjdk.java.net/valhalla/pull/299/files
  - new: https://git.openjdk.java.net/valhalla/pull/299/files/f695337d..677db0ae

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=valhalla&pr=299&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=valhalla&pr=299&range=00-01

  Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 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