-
Notifications
You must be signed in to change notification settings - Fork 4k
ARROW-14839: [R] test-fedora-r-clang-sanitizer job failing due to snappy causing a sanitizer error #11875
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
ARROW-14839: [R] test-fedora-r-clang-sanitizer job failing due to snappy causing a sanitizer error #11875
Changes from all commits
4c426a5
e33f7d5
b141103
e1599d3
33eb954
ce99254
197eaab
a9e77fd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| # Licensed to the Apache Software Foundation (ASF) under one | ||
| # or more contributor license agreements. See the NOTICE file | ||
| # distributed with this work for additional information | ||
| # regarding copyright ownership. The ASF licenses this file | ||
| # to you under the Apache License, Version 2.0 (the | ||
| # "License"); you may not use this file except in compliance | ||
| # with the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, | ||
| # software distributed under the License is distributed on an | ||
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| # KIND, either express or implied. See the License for the | ||
| # specific language governing permissions and limitations | ||
| # under the License. | ||
|
|
||
| diff --git a/snappy.cc b/snappy.cc | ||
| index 79dc0e8..2b5e662 100644 | ||
| --- a/snappy.cc | ||
| +++ b/snappy.cc | ||
| @@ -348,7 +348,7 @@ static inline bool Copy64BytesWithPatternExtension(char* dst, size_t offset) { | ||
| if (SNAPPY_PREDICT_TRUE(offset < 16)) { | ||
| if (SNAPPY_PREDICT_FALSE(offset == 0)) return false; | ||
| // Extend the pattern to the first 16 bytes. | ||
| - for (int i = 0; i < 16; i++) dst[i] = dst[i - offset]; | ||
| + for (int i = 0; i < 16; i++) dst[i] = (dst - offset)[i]; | ||
| // Find a multiple of pattern >= 16. | ||
| static std::array<uint8_t, 16> pattern_sizes = []() { | ||
| std::array<uint8_t, 16> res; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -620,6 +620,14 @@ else() | |
| "https://github.com/google/snappy/archive/${ARROW_SNAPPY_BUILD_VERSION}.tar.gz" | ||
| "https://github.com/ursa-labs/thirdparty/releases/download/latest/snappy-${ARROW_SNAPPY_BUILD_VERSION}.tar.gz" | ||
| ) | ||
|
|
||
| # This can be removed when https://github.com/google/snappy/pull/148 is released | ||
| # Some platforms don't have patch, but this is probably ok to skip | ||
| find_program(patch "patch") | ||
| if(patch) | ||
| set(SNAPPY_PATCH_COMMAND "patch" "snappy.cc" | ||
| "${CMAKE_SOURCE_DIR}/build-support/snappy-UBSAN.patch") | ||
| endif() | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Snappy works without the patch, though it has a UBSAN error, so this patches if we can and moves on if not so we don't break. |
||
| endif() | ||
| endif() | ||
|
|
||
|
|
@@ -1039,6 +1047,7 @@ macro(build_snappy) | |
| URL ${SNAPPY_SOURCE_URL} | ||
| URL_HASH "SHA256=${ARROW_SNAPPY_BUILD_SHA256_CHECKSUM}" | ||
| CMAKE_ARGS ${SNAPPY_CMAKE_ARGS} | ||
| PATCH_COMMAND ${SNAPPY_PATCH_COMMAND} | ||
| BUILD_BYPRODUCTS "${SNAPPY_STATIC_LIB}") | ||
|
|
||
| file(MAKE_DIRECTORY "${SNAPPY_PREFIX}/include") | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -81,6 +81,7 @@ ARROW_RAPIDJSON_BUILD_VERSION=1a803826f1197b5e30703afe4b9c0e7dd48074f5 | |
| ARROW_RAPIDJSON_BUILD_SHA256_CHECKSUM=0b6b780b6c534bfb0b23d29910bfe361e486bcfeaf106db8bc8995792072905a | ||
| ARROW_RE2_BUILD_VERSION=2021-02-02 | ||
| ARROW_RE2_BUILD_SHA256_CHECKSUM=1396ab50c06c1a8885fb68bf49a5ecfd989163015fd96699a180d6414937f33f | ||
| # 1.1.9 is patched to implement https://github.com/google/snappy/pull/148 if this is bumped, remove the patch | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've tried to flag this, and if we pursue this path, I'll make a Jira that points to each of these lines that need to be deleted when > 1.1.9 is released |
||
| ARROW_SNAPPY_BUILD_VERSION=1.1.9 | ||
| ARROW_SNAPPY_BUILD_SHA256_CHECKSUM=75c1fbb3d618dd3a0483bff0e26d0a92b495bbe5059c8b4f1c962b478b6e06e7 | ||
| # There is a bug in GCC < 4.9 with Snappy 1.1.9, so revert to 1.1.8 for those (ARROW-14661) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,6 +47,12 @@ else | |
| ARROW_DEFAULT_PARAM="OFF" | ||
| fi | ||
|
|
||
| # Snappy 1.1.9 is patched to implement https://github.com/google/snappy/pull/148 but some platforms don't have | ||
| # patch available, so disable snappy in those cases. If the snappy version is bumped, we should remove this. | ||
| if [ ! $(command -v patch) ]; then | ||
| ARROW_WITH_SNAPPY=OFF | ||
| fi | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For our CI this should not be hit, but is important incase CRAN happens to not have |
||
|
|
||
| mkdir -p "${BUILD_DIR}" | ||
| pushd "${BUILD_DIR}" | ||
| ${CMAKE} -DARROW_BOOST_USE_SHARED=OFF \ | ||
|
|
||
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.
This is not strictly necessary (see below where we disable snappy if we can't find
patch), but it makes sure that we do havepatchavailable so we do exercise this code in the sanitizer in our CI