This may not help solve the problem in the end, but it answers part of the question:
As Hot Licks already guessed in his comment, +72 simply a bytecode offset. I checked this with a small program:
(otherwise it was not connected, it was just that he was quickly available here from another question)
class TestNativeArray3D { public static void main(String args[]) { System.loadLibrary("TestNativeArray3D"); int terrain[][][] = genTerrain(123, 8, 6); } private native static int[][][] genTerrain(int seed, int x, int y); }
The native genTerrain function explicitly creates an arbitrary error, causing
jclass errorClass = env->FindClass("XXX"); env->NewObjectArray(10, errorClass, NULL);
calling core dump.
The stack is as follows:
Stack: [0x0000000002500000,0x0000000002600000], sp=0x00000000025ff4e0, free space=1021k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [jvm.dll+0x14ebb6] C [TestNativeArray3D.dll+0x397d] JNIEnv_::NewObjectArray+0x4d C [TestNativeArray3D.dll+0x3ae8] Java_TestNativeArray3D_genTerrain+0x98 C 0x0000000002715534 Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j TestNativeArray3D.genTerrain(III)[[[I+0 j TestNativeArray3D.main([Ljava/lang/String;)V+11 v ~StubRoutines::call_stub
Here is a line similarly containing the (possible) offset,
j TestNativeArray3D.main([Ljava/lang/String;)V +11
When decompiling a class file with
javap -c -l TestNativeArray3D
(pay attention to -l (small "L") to get line numbers!), output
class TestNativeArray3D { TestNativeArray3D(); Code: 0: aload_0 1: invokespecial #1 // Method java/lang/Object."<init>":()V 4: return LineNumberTable: line 3: 0 public static void main(java.lang.String[]); Code: 0: ldc #2 // String TestNativeArray3D 2: invokestatic #3 // Method java/lang/System.loadLibrary:(Ljava/lang/String;)V 5: bipush 123 7: bipush 8 9: bipush 6 11: invokestatic #4 // Method genTerrain:(III)[[[I 14: astore_1 15: return LineNumberTable: line 7: 0 line 8: 5 line 9: 15 }
indeed, the native call occurs at offset 11 . (And yes, I checked this by adding another code before this call: the offset in the kernel dump changes accordingly).
"LineNumberTable" allows you to display bytecode and line offsets. The table in the example means that
- line of source code 7 corresponds to the offset of byte code 0,
- line of source code 8 corresponds to the offset of bytecode 5,
- source code line 9 corresponds to bytecode offset 15
therefore, the critical instruction here is related to code line 8. (This was obvious in this case, because it was an invokestatic call invokestatic . I just wanted to indicate that you can search for LineNumberTable to display the offset of the bytecode to the actual line number in the source code)
Unfortunately, this is unlikely to help you really solve this error, because it obviously caused some levels deeper, in the native libc.so code, for some memcpy - which explicitly received invalid pointers from libzip.so ...