RFR: 8254314: Shenandoah: null checks in c2 should not skip over native load barrier

Roman Kennke rkennke at openjdk.java.net
Fri Oct 9 14:16:17 UTC 2020


On Fri, 9 Oct 2020 14:03:21 GMT, Roland Westrelin <roland at openjdk.org> wrote:

> C2 optimizes (CmpP (LoadBarrier o) NULL) as (CmpP o NULL). The ative
> load barrier is not guaranteed to return a non null oop when passed a
> non null oop so this optimization could lead to a crash.

It looks good to me! While this doesn't seem to reproduce with normal native-barriers yet, it's been a major headache
in the ongoing work on concurrent weak reference processing, and I don't see why normal native-barriers wouldn't be
affected by it. We've probably been lucky so far.

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

Marked as reviewed by rkennke (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/576


More information about the shenandoah-dev mailing list