已关闭
【缺陷报告】空指针解引用 - 文件aclnn_remainder.cpp - 函数BroadcastTensor - 行号378 #2773
zhangjunkai9创建于 21 天前关闭于 18 天前
陈思
21 天前 评论:
21 天前 评论:
20 天前 将 Nice_try 设为负责人
20 天前 关联了pull request:fix nullptrDeref of aclnn_remainder
18 天前 关闭了 issue
18 天前 添加了label:resolved


缺陷信息
缺陷描述
第374行l0op::ReFormat返回值x可能为nullptr,第375-377行仅打印错误日志但未return。程序继续执行到第378行x->GetViewShape(),对空指针x解引用导致崩溃。缺陷模式明确:null检查后仅日志未return,后续直接解引用。BroadcastTensor被ExecRemainderTensorTensorGetWorkspaceSize在第545/547行调用,路径可达。
事实核查
数据流证据
传播路径:
修复建议
x = l0op::ReFormat(x, op::Format::FORMAT_ND); if (x == nullptr) { OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Before broadcast, Reformat result is nullptr."); return nullptr; }