From 40d79e4447acf218836132eabb9d4b0d7bfede77 Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Sat, 24 Feb 2018 17:04:25 -0500 Subject: Turn on ASAN in continuous integration. (#5271) I know this works because I had to squelch a bunch of ASAN errors in multiprocessing. Signed-off-by: Edward Z. Yang --- .jenkins/test.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to '.jenkins/test.sh') diff --git a/.jenkins/test.sh b/.jenkins/test.sh index 9ab4c59242..6614bcc8d7 100755 --- a/.jenkins/test.sh +++ b/.jenkins/test.sh @@ -40,6 +40,12 @@ echo "Testing pytorch" export OMP_NUM_THREADS=4 export MKL_NUM_THREADS=4 +if [[ "$JOB_NAME" == *asan* ]]; then + export PATH="/usr/lib/llvm-5.0/bin:$PATH" + export ASAN_OPTIONS=detect_leaks=0:symbolize=1 + export PYTORCH_TEST_WITH_ASAN=1 +fi + # JIT C++ extensions require ninja. git clone https://github.com/ninja-build/ninja --quiet pushd ninja @@ -47,6 +53,10 @@ python ./configure.py --bootstrap export PATH="$PWD:$PATH" popd +if [[ "$JOB_NAME" == *asan* ]]; then + export LD_PRELOAD=/usr/lib/llvm-5.0/lib/clang/5.0.0/lib/linux/libclang_rt.asan-x86_64.so +fi + time test/run_test.sh -- -v rm -rf ninja -- cgit v1.2.3