Repository navigation
In TransposeDecoder, do not reserve a large untrusted size before reading the corresponding data. - #65
Merged
Conversation
copybara-service
Bot
force-pushed
the
test_1019357874
branch
3 times, most recently
from
November 17, 2026 14:26
a3eb134 to
328cbeb
Compare
…eading the corresponding data. Replace eagerly sized `absl::FixedArray` allocations (`tags`, `first_buffer_indices`, `bucket_indices`) with `std::vector`, `reserve()`, and `push_back()`. Limit `reserve()` capacities to 64K for schema-sized vectors (`state_machine_size`, `num_buckets`, `num_buffers`) and 1M for record-sized vectors (`num_records`). Defer sizing dependent arrays until the corresponding reading loops complete. Remove redundant `max_size()` checks which were needed only to avoid arithmetic overflow in the argument of `reserve()` or `absl::FixedArray`. PiperOrigin-RevId: 1023692148
copybara-service
Bot
force-pushed
the
test_1019357874
branch
from
November 17, 2026 14:40
328cbeb to
55c1189
Compare
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.
In
TransposeDecoder, do not reserve a large untrusted size before reading the corresponding data.Replace eagerly sized
absl::FixedArrayallocations (tags,first_buffer_indices,bucket_indices) withstd::vector,reserve(), andpush_back().Limit
reserve()capacities to 64K for schema-sized vectors(
state_machine_size,num_buckets,num_buffers) and 1M for record-sizedvectors (
num_records).Defer sizing dependent arrays until the corresponding reading loops complete.
Remove redundant
max_size()checks which were needed only to avoid arithmeticoverflow in the argument of
reserve()orabsl::FixedArray.