OpenCL* for CPU
Ask questions and share information on Intel® SDK for OpenCL™ Applications and OpenCL™ implementations for Intel® CPU
Announcements
This forum covers OpenCL* for CPU only. OpenCL* for GPU questions can be asked in the GPU Compute Software forum. Intel® FPGA SDK for OpenCL™ questions can be ask in the FPGA Intel® High Level Design forum.
1663 Discussions

clBuildProgram segmentation fault when -g build option specified

Noah_R_
Beginner
255 Views

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:
[bash]g++ -o ./debug_symbols_seg_fault -g debug_symbols_seg_fault.cpp bugDemoSupport.cpp -I $OCL_INC_DIR -L $OCL_LIB_DIR -lOpenCL [/bash]

Run Command:
[bash]./debug_symbols_seg_fault [/bash]
Or, if you need to supply a different OpenCL platform index or device index, see [bash]./debug_symbols_seg_fault -h [/bash]

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?

0 Kudos
5 Replies
Raghupathi_M_Intel
255 Views

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

Raghu

Noah_R_
Beginner
255 Views

Were you able to reproduce this bug?

Yuri_K_Intel
Employee
255 Views
Hi, Yes, the bug is reproducible on our side. I will notify you about availability of the fix. Thanks, Yuri
Noah_R_
Beginner
255 Views

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.

Yuri_K_Intel
Employee
255 Views
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
Reply