已合并
fix(machine): Initialize HostMachine curTask to nullptr #5886
chaizhengtong创建于 9月3日
fix(machine): Initialize HostMachine curTask to nullptr #5886
已合并
chaizhengtong成员
9月3日
9月3日


Pull Request已成功合入, 合并人@CANN-robot
(感谢 chaizhengtong 的贡献)9月3日 创建了 pull request,commit 1dd9ece9
atomgit-bot
9月3日 评论:
9月3日 评论:
变更摘要
本 PR 针对 HostMachine 的成员指针 curTask 进行初始化修复:将原本未赋初值的裸指针声明改为使用空指针初始化 MachineTask* curTask{nullptr},使 curTask 在尚未通过 new MachineTask(...) 真正赋值前明确为空指针,避免因未初始化而持有不确定值。
主要改动
- 初始化
curTask成员指针: 在framework/src/interface/machine/host/host_machine.h中将MachineTask* curTask;改为MachineTask* curTask{nullptr};,保证对象构造后curTask即为明确的空指针 - 明确赋值时机语义: 与 PR 背景说明一致,
curTask只有在后续执行new MachineTask(...)时才完成真正赋值,本次改动消除了此前"未赋值"状态下的不确定性


不准确?
atomgit-bot
9月3日 评论:
9月3日 评论:
9月3日 添加了label:cann-cla/yes
9月3日 关联了issue:【缺陷报告】访问未初始化的指针 - 文件host_machine.cpp - 函数SubTask - 行号206
CANN-robot
9月3日 评论:
9月3日 评论:
Thanks for your pull-request.
The full list of commands accepted by me can be found at here.
You can get sig-info at here.
You can self-configure the PR merge rules for this repository. For more details, please refer to Here.
For more, you also can visit HICANN.
PR Approval Progress
✅ Congratulations! All modules have met the lgtm and approve requirements.
Module Approval Details
| module | lgtm status | approve status |
|---|---|---|
| framework/src/interface/machine | ✅ jason_yuan_ye, gaoxingwang (2/2) | ✅ jason_yuan_ye (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
chai-hw, thanks for your pull request. All authors of the commits have signed the CLA. 👍


9月3日 将xinweiliu,cam_bxh,dai-zhentao,lululu40888,shi-dingkun,gguuaanngg,codehjp423,gaoxiang618,wangzheng97,DCGDDD,syfeng,jason_yuan_ye,foundea,ym-HW,hw_zhangzhiqi,yinjie27_,congqiannan,zhangyuebing,tsungl4,gaoxingwang,zhiweiyuan,caodongdong,make_pto,zhoubotcam,linjiashu,wangbing110,WenboCodes设为评审人
9月3日 将xinweiliu,cam_bxh,dai-zhentao,lululu40888,shi-dingkun,gguuaanngg,codehjp423,gaoxiang618,wangzheng97,DCGDDD,syfeng,jason_yuan_ye,foundea,ym-HW,hw_zhangzhiqi,yinjie27_,congqiannan,zhangyuebing,tsungl4,gaoxingwang,zhiweiyuan,caodongdong,make_pto,zhoubotcam,linjiashu,wangbing110,WenboCodes设为评审人
9月3日 将jason_yuan_ye,yinjie27_,tsungl4,gaoxingwang,linjiashu设为审查人
chaizhengtong
9月3日 评论:
9月3日 评论:
compile


9月3日 预合并成功(commit_id: 2c531ebc94b1fd9260ec06dc5d22dabd225e0905)
CANN-robot
9月3日 评论:
9月3日 评论:
| 🚀 CI 流水线已启动 |
|---|
| 📋 执行详情: 点击查看流水线 |


9月3日 添加了label:ci-pipeline-running
9月3日 删除了label:ci-pipeline-running
9月3日 添加了label:ci-pipeline-passed
9月3日 修改了pull request 的描述
袁野
9月4日 评论:
9月4日 评论:
/approve


9月4日 添加了label:approved
gaoxingwang
9月4日 评论:
9月4日 评论:
/lgtm


9月4日 添加了label:lgtm
9月4日 合入了pull request