RFR: 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:29:05 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).

Thanks for reviewing, Vladimir and Tobias!

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

PR Comment: https://git.openjdk.org/jdk/pull/19486#issuecomment-2144465107


More information about the hotspot-compiler-dev mailing list