ARROW-2227: [Python] Fix off-by-one error in chunked binary conversions#1740
Closed
wesm wants to merge 2 commits intoapache:masterfrom
Closed
ARROW-2227: [Python] Fix off-by-one error in chunked binary conversions#1740wesm wants to merge 2 commits intoapache:masterfrom
wesm wants to merge 2 commits intoapache:masterfrom
Conversation
Change-Id: Id92f3f41f552b9f0160e0df1b9e8db66fb28678e
pitrou
reviewed
Mar 13, 2018
| using internal::NumPyTypeSize; | ||
|
|
||
| constexpr int64_t kBinaryMemoryLimit = std::numeric_limits<int32_t>::max(); | ||
| constexpr int64_t kBinaryMemoryLimit = std::numeric_limits<int32_t>::max() - 1; |
Member
There was a problem hiding this comment.
Apparently this is already available as BinaryBuilder::kMaximumCapacity (though for some reason it's protected).
Member
Author
There was a problem hiding this comment.
I can move this constexpr to builder.h and use that consistently
Member
There was a problem hiding this comment.
Yes, there are several places in builder.cc that compare against std::numeric_limits<int32_t>::max() (with possible other off-by-one errors).
Change-Id: If38e28bc95319b8e24fe436f95c98e8a3c1f344c
Member
Author
|
Appveyor build: https://ci.appveyor.com/project/wesm/arrow/build/1.0.1770. Merging |
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.
We were already testing the chunked behavior but we did not exercise the off-by-one error edge case