Problem happens only when used with binary kernel image compiled for the same device. Building from kernel sources works fine.
My program uses the FFT_Kernels.cl from your samples. Binary image was saved and loaded using your code in CLUtils.cpp,
however, converted to C.
Running it through the debugger, gdb, shows:
.
.
.
setupCL () at dsp.c:252
252 fft_kernel = clCreateKernel(prog, "fft", &err);
(gdb)
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff3bc71fc in ?? () from /opt/AMDAPPSDK-2.9-1/lib/x86_64/libamdocl64.so
(gdb) where
#0 0x00007ffff3bc71fc in ?? ()
from /opt/AMDAPPSDK-2.9-1/lib/x86_64/libamdocl64.so
#1 0x00007ffff3baa8de in clCreateKernel ()
from /opt/AMDAPPSDK-2.9-1/lib/x86_64/libamdocl64.so
#2 0x000000000040e0da in setupCL () at dsp.c:252
#3 0x000000000040a29f in main (argc=1, argv=0x7fffffffdd30) at sdmp.l:2097
(gdb) p prog
$6 = (cl_program) 0xdeacd0
Using fglrx-14.501.1003 in Ubuntu 14.04 x64, with SDK 2.9.1 (opencl 1.2)
Video card R9 200 Saphire, codename Pitcairn. CPU AMD FX(tm)-8320 Eight-Core Processor