You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "sfc-gh-ebrossard (via GitHub)" <gi...@apache.org> on 2023/07/27 16:08:43 UTC
[GitHub] [arrow] sfc-gh-ebrossard opened a new pull request, #36914: GH-36913: [C++] Skip empty buffer concatenation to fix UBSan error
sfc-gh-ebrossard opened a new pull request, #36914:
URL: https://github.com/apache/arrow/pull/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?
Please let me know if you'd like a test; I can add one to `buffer_test.cc`. I'm not sure if there are automated UBSan runs for Arrow unit tests.
### Are there any user-facing changes?
No
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] github-actions[bot] commented on pull request #36914: GH-36913: [C++] Skip empty buffer concatenation to fix UBSan error
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #36914:
URL: https://github.com/apache/arrow/pull/36914#issuecomment-1653923665
:warning: GitHub issue #36913 **has been automatically assigned in GitHub** to PR creator.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] pitrou commented on a diff in pull request #36914: GH-36913: [C++] Skip empty buffer concatenation to fix UBSan error
Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on code in PR #36914:
URL: https://github.com/apache/arrow/pull/36914#discussion_r1276561301
##########
cpp/src/arrow/buffer_test.cc:
##########
@@ -1014,4 +1014,12 @@ TYPED_TEST(TypedTestBuffer, ResizeOOM) {
#endif
}
+TEST(TestBufferConcatenation, EmptyBuffer) {
+ const std::string contents = "hello, world";
Review Comment:
Add a comment explaining the test motivation here
```suggestion
// GH-36913: UB shouldn't be triggered by copying from a null pointer
const std::string contents = "hello, world";
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] pitrou commented on pull request #36914: GH-36913: [C++] Skip empty buffer concatenation to fix UBSan error
Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on PR #36914:
URL: https://github.com/apache/arrow/pull/36914#issuecomment-1653956093
Hi @sfc-gh-ebrossard and thank you for your contribution.
> Please let me know if you'd like a test; I can add one to `buffer_test.cc`. I'm not sure if there are automated UBSan runs for Arrow unit tests.
Yes and yes. You'll find a "AMD64 Ubuntu 22.04 C++ ASAN UBSAN" CI job below.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] pitrou commented on pull request #36914: GH-36913: [C++] Skip empty buffer concatenation to fix UBSan error
Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on PR #36914:
URL: https://github.com/apache/arrow/pull/36914#issuecomment-1654019048
The Windows 2019 build failure is unrelated and appears on other PRs.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] conbench-apache-arrow[bot] commented on pull request #36914: GH-36913: [C++] Skip empty buffer concatenation to fix UBSan error
Posted by "conbench-apache-arrow[bot] (via GitHub)" <gi...@apache.org>.
conbench-apache-arrow[bot] commented on PR #36914:
URL: https://github.com/apache/arrow/pull/36914#issuecomment-1668816233
After merging your PR, Conbench analyzed the 6 benchmarking runs that have been run so far on merge-commit bedc1e7cbb5d07469dd976350763ab4e93ed64ad.
There were no benchmark performance regressions. 🎉
The [full Conbench report](https://github.com/apache/arrow/runs/15697810927) has more details. It also includes information about possible false positives for unstable benchmarks that are known to sometimes produce them.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] pitrou merged pull request #36914: GH-36913: [C++] Skip empty buffer concatenation to fix UBSan error
Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou merged PR #36914:
URL: https://github.com/apache/arrow/pull/36914
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org