Pull Request已成功合入, 合并人@openeuler-ci-bot
(感谢 zhangqin 的贡献)变更摘要
该 PR 主要修复 ASAN(AddressSanitizer)扫描发现的问题,涉及 UBSE 模块的两个文件:在 UbseLcneTopology::IdentifyTopoChange 中为拓扑变化识别流程增加共享锁保护,以避免并发访问导致的数据竞争;并将 SendSingleFaultMemBlockMessage 中释放内存的 SafeDelete 改为 SafeDeleteArray,修正内存释放方式与分配方式不匹配的问题。
主要改动
- 增加共享锁保护拓扑变化识别: 在
UbseLcneTopology::IdentifyTopoChange函数入口新增std::shared_lock<std::shared_mutex> lock(mtx),对该流程涉及的共享数据结构加读锁,防止多线程并发访问引发数据竞争。 - 修正数组内存释放方式: 在
ubse_mem_controller_fault_handle.cpp的SendSingleFaultMemBlockMessage中,将SafeDelete(buffer)改为SafeDeleteArray(buffer),使释放方式与buffer的数组分配方式匹配,消除 ASAN 报告的 invalid free / heap 不匹配问题。


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 .


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


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


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


/lgtm
/approve


当前PR是否有AI参与:
[x] 否
[ ] 是
__1. AI Agent 平台:
__2. AI 模型:
__3. Prompt上下文 :
参考:openEuler社区《生成式AI工具使用与开源贡献政策》
PR功能描述 / 为什么需要这个合入**:
该PR关联的issue
(格式为fixes #<issue号>, 或者resolves #<issue号>): fixes #
希望检视人员了解: