调用clGetPlatformIDs时触发SIGV(含致命SIGSEGV)问题求助
调用clGetPlatformIDs时触发SIGV(含致命SIGSEGV)问题求助
大伙好!我最近在调用OpenCL的clGetPlatformIDs函数时,老是碰到SIGV错误,严重的时候直接触发致命的SIGSEGV崩溃。折腾了好一阵,终于写出了能稳定复现这个问题的最简示例代码,有没有大佬帮忙看看问题出在哪呀?
复现问题的最简代码
#include <stdio.h> #include <stdlib.h> #include "CL/cl.h" int main() { printf("Programme successfully opened!\n"); cl_uint num; int ret = clGetPlatformIDs(0, nullptr, &num); printf("Num platforms: %d \n", num); return 0; }
AddressSanitizer输出的报错信息如下:
(原报错内容未完整提供,若有具体报错日志可补充在此处)
内容来源于stack exchange
相关产品推荐
相关产品推荐

