krrishnarraj / clpeak

A tool which profiles OpenCL devices to find their peak capacities
Apache License 2.0
396 stars 111 forks source link

segfault in getPlatformVersion() #20

Open pieska opened 8 years ago

pieska commented 8 years ago

clpeak crashes on a parallella using coprthr-1.6.2:

gdb clpeak

(gdb) r Starting program: /root/clpeak/build/clpeak coprthr-1.6.2 (Freewill)

Platform: coprthr

Program received signal SIGSEGV, Segmentation fault. 0xb6fcc590 in clGetPlatformInfo () from /usr/lib/arm-linux-gnueabihf/libOpenCL.so.1 (gdb) bt

0 0xb6fcc590 in clGetPlatformInfo () from /usr/lib/arm-linux-gnueabihf/libOpenCL.so.1

1 0x00018770 in cl::detail::getPlatformVersion (platform=0xffffffff)

at /root/clpeak/src/include/override/CL/cl.hpp:1690

2 0x000187d4 in cl::detail::getDevicePlatformVersion (device=0x44388)

at /root/clpeak/src/include/override/CL/cl.hpp:1700

clGetPlatformInfo() is called twice, but the second call with (platform=0xfffffff).

clinfo reports one platform and two devices:

clinfo

[5628] clinfo: report OpenCL platform and device information: 127.0.1.1 coprthr-1.6.2 (Freewill) [5628] nplatforms1 [5628] clinfo: Number of platforms found = 1 [5628] clinfo: platform 0: [5628] clinfo: CL_PLATFORM_PROFILE = [5628] clinfo: CL_PLATFORM_VERSION = coprthr-1.6-CURRENT (Freewill) [5628] clinfo: CL_PLATFORM_NAME = coprthr [5628] clinfo: CL_PLATFORM_VENDOR = Brown Deer Technology, LLC. [5628] clinfo: CL_PLATFORM_EXTENSIONS = cl_khr_icd [5628] clinfo: Number of devices found for this platform = 2