已合并
【UBSE】修复asan扫描问题 #1450
【UBSE】修复asan扫描问题 #1450
已合并
zhangqin创建于 5 天前
zhangqin
zhangqin
5 天前

当前PR是否有AI参与:

[x] 否

[ ] 是
__1. AI Agent 平台:
__2. AI 模型:
__3. Prompt上下文 :

参考:openEuler社区《生成式AI工具使用与开源贡献政策》

PR功能描述 / 为什么需要这个合入**:

   增加共享锁保护拓扑变化识别,修正数组内存释放方式

该PR关联的issue

(格式为fixes #<issue号>, 或者resolves #<issue号>): fixes #

希望检视人员了解:

likedislike
Pull Request已成功合入, 合并人@openeuler-ci-bot
(感谢 zhangqin 的贡献)
zhangqinzhangqin
5 天前 创建了 pull request,commit 9e6ceb99
atomgit-bot
atomgit-bot
5 天前 评论:

变更摘要

该 PR 主要修复 ASAN(AddressSanitizer)扫描发现的问题,涉及 UBSE 模块的两个文件:在 UbseLcneTopology::IdentifyTopoChange 中为拓扑变化识别流程增加共享锁保护,以避免并发访问导致的数据竞争;并将 SendSingleFaultMemBlockMessage 中释放内存的 SafeDelete 改为 SafeDeleteArray,修正内存释放方式与分配方式不匹配的问题。

主要改动

  • 增加共享锁保护拓扑变化识别: 在 UbseLcneTopology::IdentifyTopoChange 函数入口新增 std::shared_lock<std::shared_mutex> lock(mtx),对该流程涉及的共享数据结构加读锁,防止多线程并发访问引发数据竞争。
  • 修正数组内存释放方式: 在 ubse_mem_controller_fault_handle.cppSendSingleFaultMemBlockMessage 中,将 SafeDelete(buffer) 改为 SafeDeleteArray(buffer),使释放方式与 buffer 的数组分配方式匹配,消除 ASAN 报告的 invalid free / heap 不匹配问题。
likedislike
atomgit-bot
atomgit-bot
5 天前 评论:

代码审查

✅ 未发现问题

likedislike
openeuler-ci-botopeneuler-ci-bot成员
5 天前 将hlinbo,shw030915,Gao_Victor,qmyyxtl,caowaterman设为审查人
openeuler-ci-botopeneuler-ci-bot成员
5 天前 添加了label:sig/sig-UB-ServiceCore
openeuler-ci-bot
openeuler-ci-bot成员
5 天前 评论:

Welcome To openEuler Community

Hey @zhang_qin_5 , thanks for your contribution to the community.

Bot Usage Manual

I'm the Bot here serving you. You can find the instructions on how to interact with me at Here . That means you can comment below every pull request or issue to trigger Bot Commands.

Contact Guide

If you have any questions, please contact the SIG: sig-UB-ServiceCore ,
and any of the maintainers: @Gao_Victor, @caowaterman, @hlinbo, @qmyyxtl, @shw030915 ,
and any of the committers: @HJLi96, @gongwang1, @hlb-source, @hlinbo, @meng_zhaohui, @wangwenlong7, @xuchenfengcleancode, @yezifa .

likedislike
openeuler-ci-botopeneuler-ci-bot成员
5 天前 添加了label:openeuler-cla/yes
openeuler-ci-bot
openeuler-ci-bot成员
5 天前 评论:

CLA Signature Pass

zhang_qin_5, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
openeuler-ci-botopeneuler-ci-bot成员
5 天前 添加了label:ci_processing
openeuler-ci-botopeneuler-ci-bot成员
5 天前 添加了label:docs_ci_running
openeuler-ci-bot
openeuler-ci-bot成员
5 天前 评论:

门禁正在运行, 您可以通过以下链接查看实时门禁检查结果.
若您对门禁结果含义不清晰或者遇到问题不知如何解决,可参考门禁指导手册
门禁入口及编码规范检查: multiarch/openeuler/trigger/ubs-engine/6784/console

likedislike
openeuler-ci-bot
openeuler-ci-bot成员
5 天前 评论:

✅ 跳过 docs ci 检查,没有需要检查的文档文件

likedislike
openeuler-ci-botopeneuler-ci-bot成员
5 天前 删除了label:docs_ci_running
openeuler-ci-botopeneuler-ci-bot成员
5 天前 添加了label:docs_ci_successful
openeuler-ci-botopeneuler-ci-bot成员
5 天前 删除了label:ci_processing
openeuler-ci-bot
openeuler-ci-bot成员
5 天前 评论:
Check Name Build Result 详情 Build Details
check_sca WARNING • SCA检查发现未确认的开源组件问题,请查看报告: https://www.openlibing.com/apps/personalScandTaskInfor/person/eee54f11-4d1d-4aa9-a18b-5ecab9995444?projectId=300024&codeHostingPlatformFlag=gitcode #6784
check_code SUCCESS
check_package_license WARNING • 仓库copyright检查未通过: 缺少项目级Copyright声明文件
x86_64 check_build SUCCESS #6774
aarch64 check_build SUCCESS #6782
pre-commit check_build SUCCESS #6122
DT check_build SUCCESS #6072
check_issue_associate check_build SUCCESS #9520
likedislike
openeuler-ci-botopeneuler-ci-bot成员
5 天前 添加了label:ci_successful
openeuler-ci-bot
openeuler-ci-bot成员
5 天前 评论:
likedislike
zhangqinzhangqin
1 天前 修改了pull request 的描述
hlinbo成员
1 天前 评论:

/lgtm
/approve

likedislike
openeuler-ci-botopeneuler-ci-bot成员
1 天前 添加了label:approvedlgtm-hlinbo
openeuler-ci-bot
openeuler-ci-bot成员
1 天前 评论:

Review Code Feedback

  • The label lgtm-hlinbo, approved was added to this pull request. It means that hlinbo reviewed the code changes. 👋
Tips
  • If this pull request is not merged while all conditions are met, comment /check-pr to try again. 😄
likedislike
wangwenlong7
wangwenlong7成员
1 天前 评论:

/lgtm
/approve

likedislike
openeuler-ci-botopeneuler-ci-bot成员
1 天前 添加了label:lgtm-wangwenlong7
openeuler-ci-bot
openeuler-ci-bot成员
1 天前 评论:

Review Code Feedback

  • The label lgtm-wangwenlong7 was added to this pull request. It means that wangwenlong7 reviewed the code changes. 👋
Tips
  • If this pull request is not merged while all conditions are met, comment /check-pr to try again. 😄
likedislike
openeuler-ci-botopeneuler-ci-bot成员
1 天前 合入了pull request,合并节点 SHA:218494c023d8c3faa169cd67681d6fee02f0bc75