OpenCL-CTS icon indicating copy to clipboard operation
OpenCL-CTS copied to clipboard

Possibly undefined behavior of negative_set_immutable_memory_to_writeable_kernel_arg test due to incorrect memory buffer size

Open shajder opened this issue 5 months ago • 0 comments

https://github.com/KhronosGroup/OpenCL-CTS/blob/08738a6954024dbf276288b4f81be9312ea890f6/test_conformance/api/test_kernels.cpp#L657-L679

    constexpr cl_image_format formats = { CL_RGBA, CL_UNSIGNED_INT8 };
    constexpr size_t size_dim = 128;

above dimensionalities for 2D image expects host pointer size of

size_dim * size_dim * sizeof(cl_uchar) * 4 = 65536

meanwhile the host pointer buffer is created like this:

    std::vector<cl_uchar> mem_data(size_dim * size_dim);

shajder avatar Jul 15 '25 10:07 shajder