GH-49559: [C++][Parquet] Fix uncontrolled recursion in WKBGeometryBounder::MergeGeometryInternal#49558
Merged
wgtmac merged 2 commits intoMar 23, 2026
Conversation
Co-authored-by: wgtmac <4684607+wgtmac@users.noreply.github.com>
This comment was marked as resolved.
This comment was marked as resolved.
|
|
Member
Author
|
What do you think of this fix? @paleolimbot @pitrou Disclaimer: this PR is created automatically by Jules from wgtmac#3 |
Member
|
Jules ? 🤨 |
paleolimbot
approved these changes
Mar 19, 2026
paleolimbot
left a comment
Member
There was a problem hiding this comment.
This was an oversight on my part 😬 ...thank you!
Member
Author
@pitrou Jules is Google's AI-powered asynchronous coding agent: https://jules.google.com :) |
Co-authored-by: wgtmac <4684607+wgtmac@users.noreply.github.com>
|
After merging your PR, Conbench analyzed the 2 benchmarking runs that have been run so far on merge-commit 1ffcb4e. There were no benchmark performance regressions. 🎉 The full Conbench report has more details. It also includes information about 3 possible false positives for unstable benchmarks that are known to sometimes produce them. |
thisisnic
pushed a commit
to thisisnic/arrow
that referenced
this pull request
Apr 6, 2026
…tryBounder::MergeGeometryInternal (apache#49558) ### Rationale for this change Fix `MergeGeometryInternal` stack overflow from deeply nested WKB GeometryCollection inputs. ### What changes are included in this PR? Added a depth limit (128) to `MergeGeometryInternal` to prevent stack overflow when parsing deeply nested WKB GeometryCollection inputs. ### Are these changes tested? A unit test `TestWKBBounderErrorForDeepNesting` has been included to ensure proper exception throwing upon exceeding the limit. ### Are there any user-facing changes? No. * GitHub Issue: apache#49559 Lead-authored-by: Gang Wu <ustcwg@gmail.com> Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: wgtmac <4684607+wgtmac@users.noreply.github.com> Signed-off-by: Gang Wu <ustcwg@gmail.com>
Mottl
pushed a commit
to Mottl/arrow
that referenced
this pull request
May 26, 2026
…tryBounder::MergeGeometryInternal (apache#49558) ### Rationale for this change Fix `MergeGeometryInternal` stack overflow from deeply nested WKB GeometryCollection inputs. ### What changes are included in this PR? Added a depth limit (128) to `MergeGeometryInternal` to prevent stack overflow when parsing deeply nested WKB GeometryCollection inputs. ### Are these changes tested? A unit test `TestWKBBounderErrorForDeepNesting` has been included to ensure proper exception throwing upon exceeding the limit. ### Are there any user-facing changes? No. * GitHub Issue: apache#49559 Lead-authored-by: Gang Wu <ustcwg@gmail.com> Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: wgtmac <4684607+wgtmac@users.noreply.github.com> Signed-off-by: Gang Wu <ustcwg@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale for this change
Fix
MergeGeometryInternalstack overflow from deeply nested WKB GeometryCollection inputs.What changes are included in this PR?
Added a depth limit (128) to
MergeGeometryInternalto prevent stack overflow when parsing deeply nested WKB GeometryCollection inputs.Are these changes tested?
A unit test
TestWKBBounderErrorForDeepNestinghas been included to ensure proper exception throwing upon exceeding the limit.Are there any user-facing changes?
No.