Integrated: 8332959: C2: ZGC fails with 'Incorrect load shift' when invoking Object.clone() reflectively on an array

Roberto Castañeda Lozano rcastanedalo at openjdk.org
Mon Jun 3 07:40:07 UTC 2024


On Thu, 30 May 2024 16:50:22 GMT, Roberto Castañeda Lozano <rcastanedalo at openjdk.org> wrote:

> This changeset enforces cloned arrays to be initialized at allocation time when their type is unknown, as expected by ZGC in this scenario (see the [JBS issue](https://bugs.openjdk.org/projects/JDK/issues/JDK-8332959) for further details). Array clones with unknown type may arise from compiling the array-guarded branch of a reflective `Object.clone()` invocation, as illustrated by the included test.
> 
> #### Testing
> - tier1-5, stress test (windows-x64, linux-x64, linux-aarch64, macosx-x64, macosx-aarch64; release and debug mode).
> - tier6-7 (windows-x64, linux-x64, linux-aarch64, macosx-x64, macosx-aarch64; release and debug mode; ZGC tests only).

This pull request has now been integrated.

Changeset: e0ac8249
Author:    Roberto Castañeda Lozano <rcastanedalo at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/e0ac8249f54222cc5efe49d5ed1068fed3073ba0
Stats:     41 lines in 2 files changed: 37 ins; 0 del; 4 mod

8332959: C2: ZGC fails with 'Incorrect load shift' when invoking Object.clone() reflectively on an array

Co-authored-by: Axel Boldt-Christmas <aboldtch at openjdk.org>
Reviewed-by: kvn, thartmann, aboldtch

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

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


More information about the hotspot-compiler-dev mailing list