This patch adds missing argument validation to copyOfSpecialArray() and copyOfRangeSpecialArray(). The implementation in JVM_CopyOfSpecialArray is also updated to address a number of issues (inconsistencies, code duplication, buggy index computation). Those changes should solve JDK-8387251.
Tested with Mach5, tier1-4. --------- - [X] I confirm that I make this contribution in accordance with the [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). ------------- Commit messages: - Various fixes to copyOfSpecialArray Changes: https://git.openjdk.org/valhalla/pull/2586/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=2586&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8386719 Stats: 174 lines in 4 files changed: 140 ins; 24 del; 10 mod Patch: https://git.openjdk.org/valhalla/pull/2586.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/2586/head:pull/2586 PR: https://git.openjdk.org/valhalla/pull/2586
