已开启
fix: 校验 NUMA id 防止位移越界 #58
gcw_Nt0RibX4创建于 1 天前
1 天前 将 hlinbo、shw030915、Gao_Victor、qmyyxtl、caowaterman、gcw_Nt0RibX4 设为负责人
1 天前 添加了label:sig/sig-UB-ServiceCore
openeuler-ci-bot
1 天前 评论:
1 天前 评论:
Welcome To openEuler Community
Hey @gcw_Nt0RibX4 , 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. You can self-configure the PR merge rules for this repository. For more details, please refer to Here.
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: @deepsleep_mem, @liu1103xwxw .


1 天前 关联了pull request:fix: guard invalid numa id for nodemask shift
在 RackMem.cpp 的 MemoryIDUsedByNuma() 中仅校验了 numaId < 0,未校验上界,直接执行 1UL << numaId 可能造成位移越界(未定义行为)。建议在位移前加上 if (numaId >= static_cast<int64_t>(8 * sizeof(unsigned long))) { DBG_LOGERROR(...); return nullptr; }。