[Pkg-opencl-devel] Bug#848169: clinfo: assumes that buffer size returned from get*Info is valid even on error

Simon Richter sjr at debian.org
Wed Dec 14 20:16:01 UTC 2016


Package: clinfo
Version: 2.1.16.01.12-1
Severity: normal

Hi,

I have weird crashes on PowerPC, because a required info element is not
there in my platform. The clGetDeviceInfo() function correctly returns
an error code to indicate that the item is not understood, however
clinfo still assumes that the returned size is valid and goes on to
reallocate the buffer. These functions return CL_SUCCESS if no output
buffer is given to indicate that the output size has been updated.

I've found the same bug in

 - platform_info_str
 - device_info_str_get
 - icdl_info_str

   Simon

-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 4.8.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages clinfo depends on:
ii  libc6                            2.24-7
ii  ocl-icd-libopencl1 [libopencl1]  2.2.9-2

clinfo recommends no packages.

clinfo suggests no packages.

-- no debconf information



More information about the Pkg-opencl-devel mailing list