RFR: 8259339: AllocateUninitializedArray C2 intrinsic fails with void.class input
Tobias Hartmann
thartmann at openjdk.java.net
Wed Jan 6 17:43:04 UTC 2021
Since [JDK-8150465](https://bugs.openjdk.java.net/browse/JDK-8150465), `LibraryCallKit::inline_unsafe_newArray` is also used by the `_allocateUninitializedArray` intrinsic. To handle a `void.class` input, a runtime (slow) call to the intrinsified method is emitted. We hit a guarantee in `generate_method_call_static` because a wrong intrinsic id is passed. Also, the call to `Unsafe.allocateUninitializedArray0` should be virtual.
I found this when running Valhalla stress testing with `-XX:PerMethodTrapLimit=0` but it easily reproduces without (see modified test).
Thanks,
Tobias
-------------
Commit messages:
- Updated copyright date
- 8259339: AllocateUninitializedArray C2 intrinsic fails with void.class input
Changes: https://git.openjdk.java.net/jdk/pull/1965/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1965&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8259339
Stats: 20 lines in 2 files changed: 16 ins; 0 del; 4 mod
Patch: https://git.openjdk.java.net/jdk/pull/1965.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/1965/head:pull/1965
PR: https://git.openjdk.java.net/jdk/pull/1965
More information about the hotspot-compiler-dev
mailing list