clBuildProgram segmentation fault when -g build option specified

clBuildProgram segmentation fault when -g build option specified

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?

AttachmentSize
Downloadapplication/octet-stream intel-bug-report-2013-01.tar.gz11.64 KB
6 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Thanks for the reproducer. We'll take a look and get back to you.

Raghu

Were you able to reproduce this bug?

Hi,

Yes, the bug is reproducible on our side. I will notify you about availability of the fix.

Thanks,
Yuri

Has there been any progress on fixing this bug? The effect for me is I can't develop on the Intel OpenCL platform, because I can't troubleshoot my complex kernels using gdb.

Hi,

We have the fix in our development branch. Unfortunately, I can't say anything regarding when this fix will be available in a public release. I will update here once this is done.

Thanks,
Yuri

Leave a Comment

Please sign in to add a comment. Not a member? Join today