Repository navigation
Conversation
pitrou
force-pushed
the
gh55648-valgrind-protobuf
branch
from
November 17, 2026 11:02
c47e809 to
568dbb2
Compare
Member
Author
|
@github-actions crossbow submit -g cpp |
Member
Author
|
@taepper Would you like to take a quick look at this? |
|
Revision: 568dbb2 Submitted crossbow builds: ursacomputing/crossbow @ actions-6e04c8309f |
taepper
approved these changes
Nov 17, 2026
taepper
left a comment
Contributor
There was a problem hiding this comment.
Zeroing the padding of the buffer makes sense for avoiding these exact types of valgrind errors.
I cannot judge the change of
fun:*google*protobuf*AddDescriptorsRunner*
to
fun:*google*protobuf*AddDescriptors*
We may need to initialize these bytes as well in parser.cc:810:
if (json->capacity() - json->size() >=
static_cast<int64_t>(simdjson::SIMDJSON_PADDING)) {
const auto padded_json = simdjson::padded_string_view(
reinterpret_cast<const char*>(json->data()), json->size(), json->capacity());
return parse(padded_json);
}
An arrow::Buffer exposes the method ZeroPadding() which we might use here? But you are definitely more familiar with the factories for these buffers, and maybe all sources already zero it?
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
Silence Valgrind failures due to eternal memory allocation in Protobuf initialization routines.
Also fix Valgrind failures due to processing uninitialized padding when chunking JSON input.
Are these changes tested?
Yes, by existing CI job.
Are there any user-facing changes?
No.
Was AI used for this PR?
In accordance to the AI generation guidelines, please disclose below whether and how AI was used in this PR.
PR code and description written by:
Reviewed before submission by: