BUG: Check paired bin-range capacity in GenerateHistogramAtComponent

Đang mở Phù hợp với người mới
#1,945 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 3 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
82/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
cpp
Lĩnh vực
backend

Hướng nghiên cứu

Đọc src/simplnx/Utilities/HistogramUtilities.hpp quanh dòng 183 và 195 để lần theo bước kiểm tra sức chứa và lời gọi FillBinRanges. Bổ sung kiểm thử hồi quy cho trường hợp ba bin với bốn ô đầu ra và sức chứa hợp lệ là sáu ô. Hoàn tất khi sức chứa không đủ bị từ chối trước khi điền và cả hai trường hợp đều được kiểm thử.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.
Ngôn ngữ chính
C++
Star
18
Fork
15
Merge trung bình
3 ngày 35 phút
Pull request đã merge (30 ngày)
25

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của BlueQuartzSoftware/simplnx

Tất cả issue của BlueQuartzSoftware/simplnx

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.