4 Replies Latest reply on Sep 4, 2012 6:50 PM by binying

    Invalid arguments accepted in clSetKernelArg()

    mosix0

      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!