RFR: 8259339: AllocateUninitializedArray C2 intrinsic fails with void.class input

Tobias Hartmann thartmann at openjdk.java.net
Thu Jan 7 12:19:02 UTC 2021


On Thu, 7 Jan 2021 12:14:14 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:

>> 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
>
> Looks good!

Thanks Christian!

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

PR: https://git.openjdk.java.net/jdk/pull/1965


More information about the hotspot-compiler-dev mailing list