[lworld] RFR: 8377576: [lworld] JVM_CopyOfSpecialArray does not handle all inputs correctly

Chen Liang liach at openjdk.org
Tue Feb 17 05:16:37 UTC 2026


On Mon, 16 Feb 2026 15:38:40 GMT, Paul Hübner <phubner at openjdk.org> wrote:

> Hi all,
> 
> `Arrays.copyOf` and `Arrays.copyOfRange` internally use the same function, `JVM_CopyOfSpecialArray`. While they both copy arrays, there are some semantic differences in parameter checking and exception throwing between the two that `JVM_CopyOfSpecialArray` is unable to differentiate. This patch includes:
> * Separate error condition checking and exception throwing per method.
> * New test cases for each method.
> 
> Testing: tier 1.

Marked as reviewed by liach (Committer).

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

PR Review: https://git.openjdk.org/valhalla/pull/2115#pullrequestreview-3811727167


More information about the valhalla-dev mailing list