Integrated: 8358334: C2/Shenandoah: incorrect execution with Unsafe
Roland Westrelin
roland at openjdk.org
Thu Jun 12 15:05:36 UTC 2025
On Tue, 10 Jun 2025 14:13:21 GMT, Roland Westrelin <roland at openjdk.org> wrote:
> When a barrier is expanded, some control is picked as a location for
> the barrier. The control input of data nodes that depend on that
> control are updated so the nodes are after the expanded barrier unless
> the barrier itself depends on some of those nodes.
>
> In this particular failure, a raw memoy `Store` is the input memory to
> the barrier. That `Store` has an anti-dependent `Load`. All 3 nodes
> (barrier, `Load` and `Store`) are at the same control. The `Store` is
> an input to the barrier so it stays before the barrier. The `Load`'s
> control is updated to be after the barrier which breaks the
> anti-dependency. The bug is that the logic that sorts nodes that need
> to be before the barrier and those that can be after ignores
> anti-dependencies. The fix simply extends that logic to take them into
> account.
This pull request has now been integrated.
Changeset: 1fcede05
Author: Roland Westrelin <roland at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/1fcede053cca360c96606c1034b2a365a4fada82
Stats: 153 lines in 3 files changed: 117 ins; 26 del; 10 mod
8358334: C2/Shenandoah: incorrect execution with Unsafe
Reviewed-by: wkemper, shade
-------------
PR: https://git.openjdk.org/jdk/pull/25729
More information about the shenandoah-dev
mailing list