[foreign-jextract] RFR: 8256080: AArch64: fatal error with unexpected intrinsic id _linkToNative
Maurizio Cimadamore
mcimadamore at openjdk.java.net
Tue Nov 10 21:15:14 UTC 2020
On Tue, 10 Nov 2020 10:52:12 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> I'm surprised to hear that this is what's causing the problems. We don't have any handling for _linkToNative in e.g. sharedRuntime_x86_32.cpp in gen_special_dispatch either, but that doesn't seem to be a problem for a 32-bit build (with some additional fixes).
>>
>> I also didn't expect this code to be called before linking a _linkToNative call. I'm curious to know where the calls during startup are coming from.
>>
>> Any ways, thanks for debugging and fixing. The only comment I have is that this should go into the foreign-abi branch, so please change the target branch.
>
> Thanks for this! I'm currently testing the patch. One thing I noted is that this PR has been filed against the `foreign-jextract` branch and not the `foreign-abi` one which would be more appropriate.
The following tests seem to fail:
* java/foreign/TestUpcallHighArity.java
* java/foreign/TestIntrinsics.java
* java/foreign/StdLibTest.java
* java/foreign/stackwalk/TestStackWalk.java
The last three of them fail with a crash:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (doCall.cpp:662), pid=6557, tid=6572
# guarantee(failing()) failed: call failed to generate: calls should work
#
# JRE version: Java(TM) SE Runtime Environment (16.0) (build 16-internal+0-2020-11-10-1203454.maurizio.cimadamore.dev)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (16-internal+0-2020-11-10-1203454.maurizio.cimadamore.dev, mixed mode, tiered, compressed oops, g1 gc, linux-aarch64)
# Problematic frame:
# V [libjvm.so+0x5ee0ec] Parse::do_call()+0x72c
#
`TestHighArity` seems to fail because of a bad method handle adaptation. I believe in all cases the problem is related with the specialization and intrinsifics support.
Let me know what you want to do; I'm ok to approve these changes as is (as they obviously make the world a lot better) and fix the other issues as followup - or wait until we have fixes for these tests as well.
-------------
PR: https://git.openjdk.java.net/panama-foreign/pull/391
More information about the panama-dev
mailing list