Bug 963

Summary: com.jogamp.opencl.CLProgramTest:programBinariesTest causes SIGSEGV
Product: [JogAmp] Jocl Reporter: Wade Walker <wwalker3>
Component: openclAssignee: Wade Walker <wwalker3>
Status: RESOLVED FIXED    
Severity: normal CC: sgothel
Priority: ---    
Version: 1   
Hardware: pc_x86_64   
OS: macosx   
Type: --- SCM Refs:
0874fa955c0401dba9f54816a9654bb4380abed8
Workaround: ---
Attachments: HotSpot error log

Description Wade Walker 2014-02-07 21:40:25 CET
Created attachment 587 [details]
HotSpot error log

Here's the top of the call stack:

C  [libsystem_c.dylib+0x1812]  strlen+0x12
C  [OpenCL+0x12c60]  clGetProgramInfo+0x271
C  [libjocl.jnilib+0x9d26]  Java_com_jogamp_opencl_llb_impl_CLAbstractImpl_dispatch_1clGetProgramInfo0__JIJLjava_lang_Object_2ILjava_lang_Object_2IJ+0x126
j  com.jogamp.opencl.llb.impl.CLAbstractImpl.dispatch_clGetProgramInfo0(JIJLjava/lang/Object;ILjava/lang/Object;IJ)I+0
j  com.jogamp.opencl.llb.impl.CLAbstractImpl.clGetProgramInfo(JIJLjava/nio/Buffer;Lcom/jogamp/common/nio/PointerBuffer;)I+106
j  com.jogamp.opencl.CLProgram.getProgramInfoString(I)Ljava/lang/String;+27
j  com.jogamp.opencl.CLProgram.getSource()Ljava/lang/String;+4
j  com.jogamp.opencl.CLProgramTest.programBinariesTest()V+308


Working on this now.
Comment 1 Wade Walker 2014-02-07 23:14:36 CET
Solved. It turns out that asking the driver for the source of a program created from binary causes it to SIGSEGV. I added a flag at program creation time that allows us to avoid this call.

All the tests work on my Mac at this point, so I'll try them on PC and Linux first, then submit a patch for all the test fixes.
Comment 2 Wade Walker 2014-02-08 21:11:29 CET
Fixes are available now in https://github.com/WadeWalker/jocl/compare/fix_jocl_bugs_959_960_963_964. I still need to test them on Windows and Linux though, so not ready to merge yet.