KhronosGroup / OpenCL-CTS

The OpenCL Conformance Tests
Apache License 2.0
185 stars 198 forks source link

imgptr allocated twice. #562

Open ian37 opened 4 years ago

ian37 commented 4 years ago

https://github.com/KhronosGroup/OpenCL-CTS/blob/6a64c5a0c74b9e4a83025628f2cdb746647cdfb1/test_conformance/basic/test_imagearraycopy.c#L56 This line should be deleted. The memory is allocated twice.

  imgptr = (cl_uchar*)malloc(buffer_size);

  d = init_genrand( gRandomSeed );
  imgptr = (cl_uchar*)malloc(buffer_size);
  for (i=0; i<(int)buffer_size; i++) {
     imgptr[i] = (cl_uchar)genrand_int32(d);
  }
kpet commented 4 years ago

Could you propose a PR please?