Integrated: 8325372: Shenandoah: SIGSEGV crash in unnecessary_acquire due to LoadStore split through phi
Roland Westrelin
roland at openjdk.org
Fri Feb 23 10:12:04 UTC 2024
On Tue, 20 Feb 2024 09:46:31 GMT, Roland Westrelin <roland at openjdk.org> wrote:
> After shenandoah barrier expansion, a shenandoah specific pass looks
> for heap stable checks that are back to back:
>
>
> if (heap_stable) {
> // fast path 1
> } else {
> // slow path 1
> }
> if (heap_stable) {
> // fast path 2
> } else {
> // slow path 2
> }
>
>
> and fuse them:
>
>
> if (heap_stable) {
> // fast path 1
> // fast path 2
> } else {
> // slow path 1
> // slow path 2
> }
>
>
> In the case of the failure, a `GetAndSetP` (or `GetAndSetN`) node is
> between the 2 heap_stable checks. The fusion of the 2 tests is
> implemented by taking advantage of the split if c2 optimization. But
> split if doesn't support having a `GetAndSet` node at the region where
> split if happens (that can only happen with shenandoah late barrier
> expansion). That causes the `GetAndSet` node to lose its `SCMemProj`
> which can then result in the `GetAndSet` being entirely removed.
>
> The fix I propose is to not perform the heap_stable fusion in this
> particular case.
This pull request has now been integrated.
Changeset: 5d414da5
Author: Roland Westrelin <roland at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/5d414da50459b7a1e6f0f537ff3b318854b2c427
Stats: 100 lines in 4 files changed: 99 ins; 0 del; 1 mod
8325372: Shenandoah: SIGSEGV crash in unnecessary_acquire due to LoadStore split through phi
Reviewed-by: shade, rkennke, thartmann
-------------
PR: https://git.openjdk.org/jdk/pull/17926
More information about the shenandoah-dev
mailing list