Add ASAN instructions, llvm-symbolizer instructions for fuzzers. Remove Apache Kudu cruft from run-test.sh

Change-Id: Ib97dbdb32e3f4da4919584e29f17db55bfb964a5
This commit is contained in:
Wes McKinney committed 2018-02-26 14:58:42 -05:00
1 parent 53d2c92107
commit 90787ec89f
2 files changed
+24 -7

No files matched your search

+24 -1
View File
@@ -99,7 +99,14 @@ and benchmarks or `make runbenchmark` to run only the benchmark tests.
Benchmark logs will be placed in the build directory under `build/benchmark-logs`.
## Building/Running fuzzers
### Testing with LLVM AddressSanitizer
To use AddressSanitizer (ASAN) to find bad memory accesses or leaks with LLVM,
pass `-DARROW_USE_ASAN=ON` when building. You must use clang to compile with
ASAN, and `ARROW_USE_ASAN` is mutually-exclusive with the valgrind option
`ARROW_TEST_MEMCHECK`.
### Building/Running fuzzers
Fuzzers can help finding unhandled exceptions and problems with untrusted input that
may lead to crashes, security issues and undefined behavior. They do this by
@@ -128,6 +135,22 @@ stack trace as well as the input data. After a problem was found this way, it sh
be reported and fixed. Usually, the fuzzing process cannot be continued until the
fix is applied, since the fuzzer usually converts to the problem again.
If you build fuzzers with ASAN, you need to set the `ASAN_SYMBOLIZER_PATH`
environment variable to the absolute path of `llvm-symbolizer`, which is a tool
that ships with LLVM.
```shell
export ASAN_SYMBOLIZER_PATH=$(type -p llvm-symbolizer)
```
Note that some fuzzer builds currently reject paths with a version qualifier
(like `llvm-sanitizer-5.0`). To overcome this, set an appropriate symlink
(here, when using LLVM 5.0):
```shell
ln -sf /usr/bin/llvm-sanitizer-5.0 /usr/bin/llvm-sanitizer
```
There are some problems that may occur during the compilation process:
- libfuzzer was not distributed with your LLVM: `ld: file not found: .../libLLVMFuzzer.a`
-6
View File
@@ -88,12 +88,6 @@ function setup_sanitizers() {
# Set up suppressions for LeakSanitizer
LSAN_OPTIONS="$LSAN_OPTIONS suppressions=$ROOT/build-support/lsan-suppressions.txt"
export LSAN_OPTIONS
# Suppressions require symbolization. We'll default to using the symbolizer in
# thirdparty.
if [ -z "$ASAN_SYMBOLIZER_PATH" ]; then
export ASAN_SYMBOLIZER_PATH=$(find $NATIVE_TOOLCHAIN/llvm-3.7.0/bin -name llvm-symbolizer)
fi
}
function run_test() {