BUG: Check paired bin-range capacity in GenerateHistogramAtComponent

未关闭 适合新手
#1,945 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 3 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
82/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
cpp
领域
backend

调研方向

阅读src/simplnx/Utilities/HistogramUtilities.hpp第183行和第195行附近的代码,追踪容量检查和FillBinRanges调用。为三个 bin 配有四个输出槽,以及容量有效且为六个槽的情况添加回归测试。完成标准:容量不足时会在填充前被拒绝,并且两个情况都有覆盖。

由索引模型根据 Issue 内容生成。

描述

Summary

HistogramUtilities::GenerateHistogramAtComponent accepts a bin-range output store with only numBins + 1 slots in src/simplnx/Utilities/HistogramUtilities.hpp:183. Its subsequent FillBinRanges call at line 195 writes 2 * numBins lower/upper values. With three bins and four slots, the check passes and the fill writes beyond the output capacity.

Source inspection confirmed this utility-contract defect at ee5159b0e4f6dd83c46fba6c8dfb4407117fdc75. No current caller was found in src or test, and no runtime crash or corruption was reproduced. This capacity check is separate from C01d modal-bin lookup.

  • CRASH · HistogramUtilities::GenerateHistogramAtComponent · src/simplnx/Utilities/HistogramUtilities.hpp:183,195 — Reject insufficient storage for the paired bin bounds before filling it. Add regression coverage for three bins with four slots and for valid six-slot capacity. No current caller was found. Origin: sweep.
主要语言
C++
星标
18
派生
15
平均合并
3 天 35 分钟
30 天内合并 PR
25

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

BlueQuartzSoftware/simplnx 的其他 Issue

查看 BlueQuartzSoftware/simplnx 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。