From 5eccf0b9d5ed574f28ec4c837e1d03942592d909 Mon Sep 17 00:00:00 2001 From: Zhongyi Xie Date: Wed, 31 Jan 2018 12:07:52 -0800 Subject: [PATCH] add -fno-sanitize-recover option to force exit on errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: By default if ubsan detects any problem, it outputs a “runtime error:” message, and in most cases continues executing the program. In order to make test abort on errors, option `-fno-sanitize-recover` is needed. [link](https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html) Closes https://github.com/facebook/rocksdb/pull/3447 Differential Revision: D6854654 Pulled By: miasantreble fbshipit-source-id: c48e892b0b38307029df38a67adda0e24257e481 --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index ec55abcea..a0ec59413 100644 --- a/Makefile +++ b/Makefile @@ -232,9 +232,9 @@ endif # USAN doesn't work well with jemalloc. If we're compiling with USAN, we should use regular malloc. ifdef COMPILE_WITH_UBSAN DISABLE_JEMALLOC=1 - EXEC_LDFLAGS += -fsanitize=undefined - PLATFORM_CCFLAGS += -fsanitize=undefined -DROCKSDB_UBSAN_RUN - PLATFORM_CXXFLAGS += -fsanitize=undefined -DROCKSDB_UBSAN_RUN + EXEC_LDFLAGS += -fsanitize=undefined -fno-sanitize-recover + PLATFORM_CCFLAGS += -fsanitize=undefined -fno-sanitize-recover -DROCKSDB_UBSAN_RUN + PLATFORM_CXXFLAGS += -fsanitize=undefined -fno-sanitize-recover -DROCKSDB_UBSAN_RUN endif ifdef ROCKSDB_VALGRIND_RUN