[lworld] RFR: 8244519: [lworld] C2 compilation fails with 'monitors must always exist for synchronized methods'

Tobias Hartmann thartmann at openjdk.java.net
Thu May 7 08:05:19 UTC 2020


On Wed, 6 May 2020 16:09:23 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

> C2 incorrectly assumes that the receiver of a synchronized method of an abstract class can be an inline type and
> therefore adds a runtime check to the locking code (see 'can_be_value_type' check in
> PhaseMacroExpand::expand_lock_node). While processing the JVMState of an uncommon trap emitted for that runtime check,
> we assert because there is no monitor (yet) although the method is synchronized.   I've modified
> ciInstanceKlass::can_be_value_klass accordingly and added an to catch similar problems earlier. I've also removed some
> dead code.  This fix includes the is_vanilla_constructor() fix from JDK-8243204.

Thanks Roland!

This pull request has now been integrated.

Changeset: 171da6aa
Author:    Tobias Hartmann <thartmann at openjdk.org>
URL:       https://git.openjdk.java.net/valhalla/commit/171da6aa
Stats:     45 lines in 4 files changed: 11 ins; 32 del; 2 mod

8244519: [lworld] C2 compilation fails with 'monitors must always exist for synchronized methods'

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

PR: https://git.openjdk.java.net/valhalla/pull/36



More information about the valhalla-dev mailing list