[libFuzzer] Set default sanitizer options in fuzzer tests
authorJulian Lettner <jlettner@apple.com>
Thu, 31 Jan 2019 01:24:01 +0000 (01:24 +0000)
committerJulian Lettner <jlettner@apple.com>
Thu, 31 Jan 2019 01:24:01 +0000 (01:24 +0000)
commit15df273eb45dc53669739bb33388a12c1dfce962
treea5b70c3815b4d1f07763e37580bf461e19ccae70
parent46138cdb0d9cef9aef3573914c8ec35ea39d28f8
[libFuzzer] Set default sanitizer options in fuzzer tests

Summary:
Set default `ASAN_OPTIONS` when running libFuzzer tests. This allows us
to remove special casing in code for Darwin where we usually pass
`abort_on_error=0` to override platform defaults for tests.

A previous commit changed the code to make the tests pass:
https://github.com/llvm/llvm-project/commit/7764a04af007eca68eafcf5caaea560ed05e35a9

Adapted a few tests to use `%env_asan_opts=` instead of directly setting
the environment variable.

rdar://problem/47515276

Reviewers: kcc, george.karpenkov

Differential Revision: https://reviews.llvm.org/D57465

llvm-svn: 352711
compiler-rt/lib/fuzzer/FuzzerLoop.cpp
compiler-rt/test/fuzzer/fuzzer-segv.test
compiler-rt/test/fuzzer/large.test
compiler-rt/test/fuzzer/lit.cfg
compiler-rt/test/fuzzer/minimize_two_crashes.test
compiler-rt/test/fuzzer/strncmp-oob.test