AnsweredAssumed Answered

Invalid arguments accepted in clSetKernelArg()

Question asked by mosix0 on Aug 31, 2012
Latest reply on Sep 4, 2012 by binying

In the latest SDK, "OpenCL 1.2 AMD-APP (938.1)" and "OpenCL 1.2 AMD-APP (938.2)", setting a bad argument in clSetKernelArg() returns CL_SUCCESS instead of fail.


For example, say argument #0 is a memory-object, but instead, erroneously, the kernel itself is given as an argument:


cl_mem bad_memory_object = (cl_mem)kernel;

clSetKernelArg(kernel, 0, sizeof(cl_mem), &bad_memory_object);


Results in CL_SUCCESS, instead of CL_INVALID_MEM_OBJECT as it should.


(naturally, later attempts to run this kernel result in a segmentation-fault).


Please fix!