So I am trying to get JavaCall.jl working with JDK8. It is currently 
supported only on JDK7. Theoretically, everything should be backward 
compatible and work out of the box, but of course, the gap between theory 
and practice ... etc.. 

While everything works with 1.7, I get a seg fault with 1.8, but strangely 
the process does not exit. The call looks like this: 

res = ccall(create, Cint, (Ptr{Ptr{JavaVM}}, Ptr{Ptr{JNIEnv}}, 
Ptr{J.JavaVMInitArgs}), ppjvm, ppenv, &vm_args)

This call is of course deeply entertwined with the specifics of the JVM, so 
I'm really looking for help with some ideas to debug this. 

So when I make this call in 1.8, I see the following message printed on 
screen: 

signal (11): Segmentation fault: 11
unknown function (ip: 311308980)

However, strangely,  the call still returns a value indicating success. And 
(most) subsequent calls to the JVM also return successfully. In fact, the 
entire JavaCall.jl testsuite runs successfully.  The "unknown function" 
message seems to come out of task.c, but I don't understand where the 
segfault is trapped. 

When I run julia within lldb, I don't seem to get much information: 

signal (11): Segmentation fault: 11
unknown function (ip: 314786484)
Process 86657 stopped
* thread #1: tid = 0xe2de0, 0x0000000112c342b4, queue = 
'com.apple.main-thread', stop reason = signal SIGSEGV
    frame #0: 0x0000000112c342b4
-> 0x112c342b4:  movl   (%rsi), %eax
   0x112c342b6:  leaq   0xf8(%rbp), %rsi
   0x112c342bd:  vmovdqu %ymm0, (%rsi)
   0x112c342c1:  vmovdqu %ymm7, 0x20(%rsi)
(lldb) bt
* thread #1: tid = 0xe2de0, 0x0000000112c342b4, queue = 
'com.apple.main-thread', stop reason = signal SIGSEGV
  * frame #0: 0x0000000112c342b4

So what can I do to debug this further? 

Thanks
-
Avik

Reply via email to