Core: harden puffin reader to malformed input#17253
Open
steveloughran wants to merge 2 commits into
Open
Conversation
Contains content generated by Claude Code Change-Id: I8b6fcdbca42e1c19c322ef97809700e765d847f5
steveloughran
marked this pull request as draft
July 16, 2026 12:57
steveloughran
marked this pull request as ready for review
July 17, 2026 11:21
wombatu-kun
reviewed
Jul 19, 2026
| * | ||
| * @param dv deletion vector. | ||
| */ | ||
| private static void validateDV(DeleteFile dv) { |
Contributor
There was a problem hiding this comment.
validateDV duplicates the first three checks of BaseDeleteLoader.validateDV; consider hoisting the shared shape validation into ContentFileUtil next to dvDesc so the query and merge paths use one copy. Follow-up, not a blocker.
Contributor
Author
There was a problem hiding this comment.
I wasn't sure about this, as I know that making changes to other bits of code don't always go down well, but here I will. I will also improve the error message when the content length is > 2GB to include the full dvdesc() info, (filename, offset, length) rather than just the requested length. Whoever reads the error logs will appreciate this.
+ more test coverage Change-Id: I8bf825553de3271cf9d330ffbf7fa96a129b5d4d
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.
No serious issues found; the roaring bitmap overallocation is the big one in terms of memory consumption from small files. Fix
Fix for #17214