On 2/5/19 5:55 PM, Nick Gasson (Arm Technology China) wrote:
> The stack trace you sent below is incomplete, it's missing the frame for
> Spinner.run (i.e. the AARCH64Frame object corresponding to the native wrapper
> frame). Did you try on x86 or with the patch I posted? I'm not able to test
> at the moment but I think you will get one exra frame in the output. I don't
> know why you don't get the NPE, I guess it depends on what's in that stack
> slot.
Never mind, found it. A more complex test is needed.
--
Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
#include <jni.h>
#include <stdio.h>
/*
* Class: Spinner
* Method: run
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_Spinner_run
(JNIEnv *env, jclass k) {
printf("Spinning...\n");
for(;;);
}
public class Spinner {
static native void run();
static {
System.loadLibrary("Spinner");
}
public static void main(String[] args) {
run();
}
}