-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GH-36913: [C++] Skip empty buffer concatenation to fix UBSan error #36914
Conversation
|
Hi @sfc-gh-ebrossard and thank you for your contribution.
Yes and yes. You'll find a "AMD64 Ubuntu 22.04 C++ ASAN UBSAN" CI job below. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot. LGTM except for one suggestion, see below.
Co-authored-by: Antoine Pitrou <[email protected]>
The Windows 2019 build failure is unrelated and appears on other PRs. |
…36914) ### Rationale for this change This is a trivial fix for a UBSan error in calls to `ConcatenateBuffers` with an empty buffer that has a null data pointer. ### What changes are included in this PR? Conditional call to `std::memcpy` based on whether the buffer's length is 0. ### Are these changes tested? Test added in buffer_test.cc. ### Are there any user-facing changes? No * Closes: #36913 Lead-authored-by: Elliott Brossard <[email protected]> Co-authored-by: Elliott Brossard <[email protected]> Co-authored-by: Antoine Pitrou <[email protected]> Signed-off-by: Antoine Pitrou <[email protected]>
After merging your PR, Conbench analyzed the 6 benchmarking runs that have been run so far on merge-commit bedc1e7. There were no benchmark performance regressions. 🎉 The full Conbench report has more details. It also includes information about possible false positives for unstable benchmarks that are known to sometimes produce them. |
…ror (apache#36914) ### Rationale for this change This is a trivial fix for a UBSan error in calls to `ConcatenateBuffers` with an empty buffer that has a null data pointer. ### What changes are included in this PR? Conditional call to `std::memcpy` based on whether the buffer's length is 0. ### Are these changes tested? Test added in buffer_test.cc. ### Are there any user-facing changes? No * Closes: apache#36913 Lead-authored-by: Elliott Brossard <[email protected]> Co-authored-by: Elliott Brossard <[email protected]> Co-authored-by: Antoine Pitrou <[email protected]> Signed-off-by: Antoine Pitrou <[email protected]>
…ror (apache#36914) ### Rationale for this change This is a trivial fix for a UBSan error in calls to `ConcatenateBuffers` with an empty buffer that has a null data pointer. ### What changes are included in this PR? Conditional call to `std::memcpy` based on whether the buffer's length is 0. ### Are these changes tested? Test added in buffer_test.cc. ### Are there any user-facing changes? No * Closes: apache#36913 Lead-authored-by: Elliott Brossard <[email protected]> Co-authored-by: Elliott Brossard <[email protected]> Co-authored-by: Antoine Pitrou <[email protected]> Signed-off-by: Antoine Pitrou <[email protected]>
Rationale for this change
This is a trivial fix for a UBSan error in calls to
ConcatenateBuffers
with an empty buffer that has a null data pointer.What changes are included in this PR?
Conditional call to
std::memcpy
based on whether the buffer's length is 0.Are these changes tested?
Test added in buffer_test.cc.
Are there any user-facing changes?
No