Hello!
So I've been writhing my OpenCL project until I run into a strange problem: a call to clBuildProgram results in a segmentation fault.
I'm providing a sample code here (see attached archive) that gives a SIGSEGV every single time you try to build it.
In advance: please don't try to understand what this code does, as the sample is not meaningful. It's a cut-down kernel of a meaningful program, with just enough code left to crash the compiler. The goal here is only to demonstrate the bug.
If that matters, I tested under Windows 7 and using OCL SDK Light.
Hope this gets fixed ASAP!
Cheers,
Adding a very useful piece of information.
Replacing line 59 of main.cpp from my archive with
ret = clBuildProgram(program, 1, &device_id, "-cl-std=CL2.0 -cl-opt-disable", NULL, NULL);
makes the example compile.
That essentially means that the optimization logic in the compiler is flawed.
I've also found two interesting details:
Thank you for reporting the compilation issue. I was able to reproduce it with CodeXL on Win10. I'll report it to the appropriate team.
Thanks.
Thank You!
Hope this gets fixed ASAP!
A bug ticket has been created against the issue. Once I've any update about it, I'll let you know.
Thanks.