-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ARROW-6214: [R] Add R sanitizer docker image
The PR creates a docker image to replicate R sanitizer errors. One can iterate with arrow local sources without installing CRAN arrow package. A real undefined behaviour was fixed in `array_to_vector.cpp`. The other errors were false positives (to best of my knowledge). Closes #5408 from fsaintjacques/ARROW-6214-r-sanitizer and squashes the following commits: e85c7e3 <François Saint-Jacques> Add docker-r-sanitizer to nightly tasks 7209ca9 <François Saint-Jacques> Fix UBSAN pointer casting error 6b425b4 <François Saint-Jacques> ARROW-6214: Add sanitizer docker image Authored-by: François Saint-Jacques <fsaintjacques@gmail.com> Signed-off-by: Neal Richardson <neal.p.richardson@gmail.com>
- Loading branch information
1 parent
19d1d0a
commit c2e8323
Showing
11 changed files
with
195 additions
and
18 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/usr/bin/env bash | ||
# 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. | ||
|
||
set -e | ||
|
||
: ${R_BIN:=RDsan} | ||
source /arrow/ci/docker_install_r_deps.sh | ||
|
||
# Build arrow | ||
pushd /arrow/r | ||
|
||
install_deps | ||
|
||
make clean | ||
${R_BIN} CMD INSTALL --no-byte-compile . | ||
|
||
pushd tests | ||
|
||
export UBSAN_OPTIONS="print_stacktrace=1,suppressions=/arrow/r/tools/ubsan.supp" | ||
${R_BIN} < testthat.R | ||
|
||
popd | ||
|
||
popd |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
# 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. | ||
|
||
FROM wch1/r-debug:latest | ||
|
||
# Installs C++ toolchain and dependencies | ||
RUN apt-get update -y -q && \ | ||
apt-get install -y -q --no-install-recommends \ | ||
autoconf \ | ||
bison \ | ||
ca-certificates \ | ||
ccache \ | ||
cmake \ | ||
flex \ | ||
g++ \ | ||
gcc \ | ||
git \ | ||
libbenchmark-dev \ | ||
libboost-filesystem-dev \ | ||
libboost-regex-dev \ | ||
libboost-system-dev \ | ||
libbrotli-dev \ | ||
libbz2-dev \ | ||
libdouble-conversion-dev \ | ||
libgflags-dev \ | ||
libgoogle-glog-dev \ | ||
liblz4-dev \ | ||
liblzma-dev \ | ||
libre2-dev \ | ||
libsnappy-dev \ | ||
libssl-dev \ | ||
libzstd-dev \ | ||
ninja-build \ | ||
pkg-config \ | ||
rapidjson-dev \ | ||
thrift-compiler \ | ||
tzdata && \ | ||
apt-get clean && rm -rf /var/lib/apt/lists* | ||
|
||
# The following dependencies will be downloaded due to missing/invalid packages | ||
# provided by the distribution: | ||
# - libc-ares-dev does not install CMake config files | ||
# - flatbuffer is not packaged | ||
# - libgtest-dev only provide sources | ||
# - libprotobuf-dev only provide sources | ||
# - thrift is too old | ||
ENV CMAKE_ARGS="-DThrift_SOURCE=BUNDLED \ | ||
-DFlatbuffers_SOURCE=BUNDLED \ | ||
-DGTest_SOURCE=BUNDLED \ | ||
-Dc-ares_SOURCE=BUNDLED \ | ||
-DgRPC_SOURCE=BUNDLED \ | ||
-DProtobuf_SOURCE=BUNDLED ${CMAKE_ARGS}" | ||
|
||
# Prioritize system packages and local installation | ||
ENV ARROW_DEPENDENCY_SOURCE=SYSTEM \ | ||
ARROW_FLIGHT=OFF \ | ||
ARROW_GANDIVA=OFF \ | ||
ARROW_HDFS=OFF \ | ||
ARROW_ORC=OFF \ | ||
ARROW_PARQUET=ON \ | ||
ARROW_PLASMA=OFF \ | ||
ARROW_USE_ASAN=OFF \ | ||
ARROW_USE_UBSAN=OFF \ | ||
ARROW_NO_DEPRECATED_API=ON \ | ||
ARROW_INSTALL_NAME_RPATH=OFF \ | ||
ARROW_WITH_BZ2=OFF \ | ||
ARROW_WITH_ZSTD=OFF \ | ||
ARROW_R_DEV=TRUE | ||
|
||
# Ensure parallel R package installation | ||
RUN printf "options(Ncpus = parallel::detectCores(), repos = 'https://demo.rstudiopm.com/all/__linux__/bionic/latest')\n" >> /etc/R/Rprofile.site | ||
# Also ensure parallel compilation of each individual package | ||
RUN printf "MAKEFLAGS=-j8\n" >> /usr/lib/R/etc/Makeconf | ||
|
||
CMD ["/bin/bash", "-c", "/arrow/ci/docker_build_cpp.sh && \ | ||
/arrow/ci/docker_build_r_sanitizer.sh"] |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# 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. | ||
|
||
vptr:include/c++/8/bits/shared_ptr_base.h |