diff options
author | Gian-Carlo Pascutto <gcp@sjeng.org> | 2016-06-30 23:57:11 +0200 |
---|---|---|
committer | Gian-Carlo Pascutto <gcp@sjeng.org> | 2016-07-02 21:14:36 +0200 |
commit | 7424532859ff91321da56a72ae1e9195a059a351 (patch) | |
tree | 58adc005b95c441f5e0d27f18424de5b93245918 /README.md | |
parent | 5a690f4e36ea50d5401ba37d013ef425a98f2542 (diff) |
Ensure clGetKernelWorkGroupInfo return value fits.
In LocalMemUsage(), there's a first call to clGetKernelWorkGroupInfo
to get the "bytes" amount needed to store the result from
CL_KERNEL_LOCAL_MEM_SIZE. However, the actual value passed is an
"auto result = size_t", which in 32-bit mode is 4 bytes, regardless
of the previous return value. The spec describes that it will actually
be a cl_ulong which is 8 bytes. To prevent stack corruption, make sure
we are in fact passing a cl_ulong.
Also adjust all callers to take the changed type into account.
Diffstat (limited to 'README.md')
0 files changed, 0 insertions, 0 deletions