You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

调用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

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.08 12:52:58