GH-50292: [C++][Parquet] Avoid int64 overflow in CheckReadRangeOrThrow#50060
Conversation
|
gentle ping |
wgtmac
left a comment
There was a problem hiding this comment.
Thanks for fixing this! Just left some minor comments. BTW, according to our CONTRIBUTING.md, this PR needs a GitHub issue.
|
|
|
Thanks for the review. Opened #50292 for this and updated the PR title to reference it. Pushed both changes: the offset bound now short-circuits first, and the read range end is validated with AddWithOverflow as well. |
|
After merging your PR, Conbench analyzed the 3 benchmarking runs that have been run so far on merge-commit ea3ca57. There were no benchmark performance regressions. 🎉 The full Conbench report has more details. It also includes information about 1 possible false positive for unstable benchmarks that are known to sometimes produce them. |
CheckReadRangeOrThrow adds index_location.offset + length unchecked, so a column-chunk page-index location near INT64_MAX wraps past the bounds check and yields an out-of-range buffer offset at read time; guard it with AddWithOverflow as merge_range already does.