mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Fix uninitialised memory use. (#1909)
CL_DEVICE_MAX_WORK_GROUP_SIZE is specified to fill in a size_t. By asking it to fill in an uninitialised cl_long, on platforms where size_t is smaller than cl_long, the high bits of the cl_long remain uninitialised.
This commit is contained in:
@@ -141,7 +141,7 @@ int test_copy2D(const cl_device_id deviceID, const cl_context context,
|
||||
test_error(error,
|
||||
"clGetDeviceInfo for CL_DEVICE_MAX_MEM_ALLOC_SIZE failed.");
|
||||
|
||||
cl_long max_work_group_size;
|
||||
size_t max_work_group_size;
|
||||
error = clGetDeviceInfo(deviceID, CL_DEVICE_MAX_WORK_GROUP_SIZE,
|
||||
sizeof(max_work_group_size), &max_work_group_size,
|
||||
NULL);
|
||||
|
||||
Reference in New Issue
Block a user