Segmentation fault with cl2.hpp

Hi I encountered segmentation fault issue with cl2.hpp.
I cannot fire a bug on Khronos bugzilla so I came here:
1, I forget my bugzilla account password, I use “Forgot Password” link to send a password-reset link( email), tried twice, no email was received.
2, Then I try to register a new account, no sign-up link on was found.

here is the minimum code to reproduce the issue:

#include <cl2.hpp>

//#include <CL/cl.hpp>

#include <vector>
#include <iostream>
std::vector<cl::Device> computeDevices;
cl::Device dev;

int main(int argc, char** argv)
std::vector<cl::Platform> platforms;
try {
catch (cl::Error&) {
return 1;
for (auto& platform : platforms) {
std::vector<cl::Device> devices;
try {
platform.getDevices(CL_DEVICE_TYPE_GPU, &devices);
catch (cl::Error&) {
for (auto& device : devices) {
std::string name = device.getInfo<CL_DEVICE_NAME>();
// dev = device;
std::cout << computeDevices.size() << std::endl;
return 0;

1, switch to cl.hpp, the issue is gone.
2, comment out “computeDevices.push_back(device);” and use the line “dev = device”, segmentation fault occurs in other function when exiting; if “dev = device” only executes once, the issue disappeared.
3, I run the program on Windows 10, both NVIDIA CUDA OpenCL 1.2 driver and AMD APP SDK OpenCL 2.0 driver are installed (two discrete GPU installed).