Integrated: 8356989: Unexpected null in C2 compiled code

Roland Westrelin roland at openjdk.org
Mon May 26 08:36:31 UTC 2025


On Thu, 22 May 2025 09:22:08 GMT, Roland Westrelin <roland at openjdk.org> wrote:

> In the test case, a non escaping array is initialized by an
> `arraycopy` that uses this array as source and destination. Following
> the `arraycopy`, one of the element of the array is tested for
> `null`. That null check is constant folded to always `null` by escape
> analysis. As I understand, the `Allocate` for the array should be
> marked by EA as destination of an array copy. That state should then
> be propagated by EA to uses and all destinations of an array copy
> should be marked as unknown value. But EA has logic that explicitly
> skips the case where an `ArrayCopy` has same source and
> destination. Removing that logic fixes the failure.

This pull request has now been integrated.

Changeset: ed4cd2ac
Author:    Roland Westrelin <roland at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/ed4cd2acd2d8bb92c296c5a860c76cffaff53add
Stats:     68 lines in 2 files changed: 60 ins; 4 del; 4 mod

8356989: Unexpected null in C2 compiled code

Reviewed-by: chagedorn, kvn, thartmann

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

PR: https://git.openjdk.org/jdk/pull/25389


More information about the hotspot-compiler-dev mailing list