diff --git a/.circleci/config.yml b/.circleci/config.yml index 5a7748f125..d7e23312a6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -306,7 +306,7 @@ jobs: - pre-steps - install-gflags - install-clang-10 - - run: COMPILE_WITH_ASAN=1 CC=clang-10 CXX=clang++-10 ROCKSDB_DISABLE_ALIGNED_NEW=1 USE_CLANG=1 make V=1 -j32 check # aligned new doesn't work for reason we haven't figured out + - run: ASAN_OPTIONS=detect_stack_use_after_return=1 COMPILE_WITH_ASAN=1 CC=clang-10 CXX=clang++-10 ROCKSDB_DISABLE_ALIGNED_NEW=1 USE_CLANG=1 make V=1 -j32 check # aligned new doesn't work for reason we haven't figured out - post-steps build-linux-clang10-mini-tsan: diff --git a/Makefile b/Makefile index b0d07fcba3..a1d0a3303e 100644 --- a/Makefile +++ b/Makefile @@ -1032,31 +1032,31 @@ ldb_tests: ldb include crash_test.mk asan_check: clean - COMPILE_WITH_ASAN=1 $(MAKE) check -j32 + ASAN_OPTIONS=detect_stack_use_after_return=1 COMPILE_WITH_ASAN=1 $(MAKE) check -j32 $(MAKE) clean asan_crash_test: clean - COMPILE_WITH_ASAN=1 $(MAKE) crash_test + ASAN_OPTIONS=detect_stack_use_after_return=1 COMPILE_WITH_ASAN=1 $(MAKE) crash_test $(MAKE) clean whitebox_asan_crash_test: clean - COMPILE_WITH_ASAN=1 $(MAKE) whitebox_crash_test + ASAN_OPTIONS=detect_stack_use_after_return=1 COMPILE_WITH_ASAN=1 $(MAKE) whitebox_crash_test $(MAKE) clean blackbox_asan_crash_test: clean - COMPILE_WITH_ASAN=1 $(MAKE) blackbox_crash_test + ASAN_OPTIONS=detect_stack_use_after_return=1 COMPILE_WITH_ASAN=1 $(MAKE) blackbox_crash_test $(MAKE) clean asan_crash_test_with_atomic_flush: clean - COMPILE_WITH_ASAN=1 $(MAKE) crash_test_with_atomic_flush + ASAN_OPTIONS=detect_stack_use_after_return=1 COMPILE_WITH_ASAN=1 $(MAKE) crash_test_with_atomic_flush $(MAKE) clean asan_crash_test_with_txn: clean - COMPILE_WITH_ASAN=1 $(MAKE) crash_test_with_txn + ASAN_OPTIONS=detect_stack_use_after_return=1 COMPILE_WITH_ASAN=1 $(MAKE) crash_test_with_txn $(MAKE) clean asan_crash_test_with_best_efforts_recovery: clean - COMPILE_WITH_ASAN=1 $(MAKE) crash_test_with_best_efforts_recovery + ASAN_OPTIONS=detect_stack_use_after_return=1 COMPILE_WITH_ASAN=1 $(MAKE) crash_test_with_best_efforts_recovery $(MAKE) clean ubsan_check: clean diff --git a/build_tools/rocksdb-lego-determinator b/build_tools/rocksdb-lego-determinator index 3344f7de04..c2b653cd87 100755 --- a/build_tools/rocksdb-lego-determinator +++ b/build_tools/rocksdb-lego-determinator @@ -106,10 +106,11 @@ SHM="TEST_TMPDIR=/dev/shm/rocksdb" NON_SHM="TMPD=/tmp/rocksdb_test_tmp" GCC_481="ROCKSDB_FBCODE_BUILD_WITH_481=1" ASAN="COMPILE_WITH_ASAN=1" +ASAN_TEST_OPTIONS="ASAN_OPTIONS=detect_stack_use_after_return=1" CLANG="USE_CLANG=1" TSAN="COMPILE_WITH_TSAN=1" UBSAN="COMPILE_WITH_UBSAN=1" -ASAN_CRASH="ASAN_OPTIONS=disable_coredump=0" +ASAN_CRASH="ASAN_OPTIONS=disable_coredump=0:detect_stack_use_after_return=1" TSAN_CRASH="TSAN_OPTIONS=disable_coredump=0 CRASH_TEST_EXT_ARGS=\\\"--compression_type=zstd --log2_keys_per_lock=22\\\"" NON_TSAN_CRASH="CRASH_TEST_EXT_ARGS=--compression_type=zstd" UBSAN_CRASH="UBSAN_OPTIONS=disable_coredump=0" @@ -597,7 +598,7 @@ ASAN_TEST_COMMANDS="[ $CLEANUP_ENV, { \"name\":\"Test RocksDB debug under ASAN\", -\"shell\":\"cd $WORKING_DIR; set -o pipefail && $SHM $ASAN $DEBUG $SKIP_FORMAT_CHECKS make $PARALLELISM asan_check || $CONTRUN_NAME=asan_check $TASK_CREATION_TOOL\", +\"shell\":\"cd $WORKING_DIR; set -o pipefail && $SHM $ASAN $ASAN_TEST_OPTIONS $DEBUG $SKIP_FORMAT_CHECKS make $PARALLELISM asan_check || $CONTRUN_NAME=asan_check $TASK_CREATION_TOOL\", \"user\":\"root\", $PARSER }