KhronosGroup / KhronosGroup/OpenCL-SDK
Segmentation fault on clGetPlatformIds
- Dominant language
- C++
- Stars
- 777
- Forks
- 163
- Avg merge
- 6d 17h
- Merged PRs (30d)
- 2
Description
The code:
cl_int ret = clGetPlatformIDs(0, nullptr, &ret_num_platforms);
AddressSanitizer:DEADLYSIGNAL
=================================================================
==5083==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000008 (pc 0x7dbd45d0aa7f bp 0x7ffca79b71b0 sp 0x7ffca79b5140 T0)
==5083==The signal is caused by a READ memory access.
==5083==Hint: address points to the zero page.
#0 0x7dbd45d0aa7f in Intel::OpenCL::Framework::PlatformModule::GetPlatformInfo(_cl_platform_id*, unsigned int, unsigned long, void*, unsigned long*) /netbatch/donb41412_00/runDir/93/20180921_000000/llvm/projects/opencl/utils/cl_sys_utils/export/cl_shared_ptr.h:361
#1 0x7dbd45c6239d in clGetPlatformInfo /netbatch/donb41412_00/runDir/93/20180921_000000/llvm/projects/opencl/framework/cl_framework.cpp:330
#2 0x7dbd4a805cda (/usr/lib/libOpenCL.so.1+0xbcda) (BuildId: 8236fcb4223c046c8dd27fd62d9398c0a5b5beb4)
#3 0x7dbd4a80727c (/usr/lib/libOpenCL.so.1+0xd27c) (BuildId: 8236fcb4223c046c8dd27fd62d9398c0a5b5beb4)
#4 0x7dbd4a809354 in clGetPlatformIDs (/usr/lib/libOpenCL.so.1+0xf354) (BuildId: 8236fcb4223c046c8dd27fd62d9398c0a5b5beb4)
#5 0x575a8dc54f21 in Setup() /home/usr/Documents/Chess/OpenCL/GPU.cpp:114
#6 0x575a8dc54b57 in GPU() /home/usr/Documents/Chess/OpenCL/GPU.cpp:12
#7 0x575a8dc7f86a in __static_initialization_and_destruction_0 /home/usr/Documents/Physics/player.h:52
#8 0x575a8dc7f992 in _GLOBAL__sub_I__Z13Signals_Setupv /home/usr/Documents/Physics/Signals.cpp:28
#9 0x7dbd49034f43 in __libc_start_main (/usr/lib/libc.so.6+0x25f43) (BuildId: 98b3d8e0b8c534c769cb871c438b4f8f3a8e4bf3)
#10 0x575a8dc54a44 in _start (/home/usr/Documents/Physics/main+0x4ea44) (BuildId: ddc9e1e8133d801b815c1a6de299a4a1418f75f3)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /netbatch/donb41412_00/runDir/93/20180921_000000/llvm/projects/opencl/utils/cl_sys_utils/export/cl_shared_ptr.h:361 in Intel::OpenCL::Framework::PlatformModule::GetPlatformInfo(_cl_platform_id*, unsigned int, unsigned long, vo
Code is built from this repo for arch linux
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the report on Arch Linux with the call at GPU.cpp:114 under AddressSanitizer. Inspect Setup() and the static initialization path through GPU(), player.h:52, and Signals.cpp:28, then compare the OpenCL stack trace with the expected clGetPlatformIDs behavior. Done means the reported segmentation fault is resolved or its external cause is documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- arch-linux, cpp
- Domain
- hpc
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100