Quantcast
Channel: Intel® Software - OpenCL*
Viewing all articles
Browse latest Browse all 1182

clBuildProgram segmentation fault when -g build option specified

$
0
0

This demonstrates a segmentation fault experienced upon calling clBuildProgram() when this particular OpenCL program is compiled with the "-g" build option.

My setup:  Ubuntu 13.04, Intel OpenCL intel/opencl-1.2-3.0.67279
Execution is on CPU device: Intel(R) Core(TM) i7-3615QM CPU @ 2.30GHz

Build Command:

g++ -o ./debug_symbols_seg_fault -g debug_symbols_seg_fault.cpp bugDemoSupport.cpp -I $OCL_INC_DIR -L $OCL_LIB_DIR -lOpenCL 

Run Command:

./debug_symbols_seg_fault 

Or, if you need to supply a different OpenCL platform index or device index, see
./debug_symbols_seg_fault -h 

I see a segmentation fault upon call to clBuildProgram().

If you edit debug_symbols_seg_fault.cpp line 51 to remove the "-g" debug symbols flag from the buildOptions string, recompile, then re-run, the segmantion fault does not occur.

I tried a much smaller kernel but it did not reproduce this bug.  The attached full OpenCL program does work correctly in the context of a larger program on AMD and Apple OpenCL implementations.

Any suggestions?  I'd like to resolve this so that I can use the Intel debugging toolset.

Sidenote:  Wow.  Your forum does not accept files with .cl extension?


Viewing all articles
Browse latest Browse all 1182

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>