summaryrefslogtreecommitdiff
path: root/src/cl_driver_defs.c
diff options
context:
space:
mode:
authorPan Xiuli <xiuli.pan@intel.com>2015-10-29 13:46:36 +0800
committerYang Rong <rong.r.yang@intel.com>2015-11-06 14:43:06 +0800
commit2b5c3bfce7c5c0ca4d9947dc42b56693be290ef4 (patch)
treee6fedd507369adc3a81272687e9fbc2b1e42cba8 /src/cl_driver_defs.c
parentd85f413acae792012893978c77ad856abec657ca (diff)
utests: fix compiler_fill_image_2d_array random bug
Use safer image write instead of map and memset. When create image without data, we could not set pitch and we don't know the pitch either. So use map and memset the space is too dangerous if pitch is bigger than w*sizeof(bpp), in this case the actually pitch is 512 but memset use pitch as 64*4=256. With only half space set to 0, there will be undefined behavior when we want to check the result for those space that we haven't set to 0. Signed-off-by: Pan Xiuli <xiuli.pan@intel.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
Diffstat (limited to 'src/cl_driver_defs.c')
0 files changed, 0 insertions, 0 deletions