Disable alignment check in UBSAN

Summary:
Disable alignment check in UBSAN for now. Now we can't get signals to meaningful failures. We can reenable it after we figure out how we can suppress failures in finer grain manner.
Closes https://github.com/facebook/rocksdb/pull/3473

Differential Revision: D6925971

Pulled By: siying

fbshipit-source-id: a0f1a242cde866abbc5c1eeee9ff8d1d7d582ac4
main
Siying Dong 7 years ago committed by Facebook Github Bot
parent 8feee28020
commit 1336a7742d
  1. 10
      Makefile

@ -232,9 +232,13 @@ endif
# USAN doesn't work well with jemalloc. If we're compiling with USAN, we should use regular malloc. # USAN doesn't work well with jemalloc. If we're compiling with USAN, we should use regular malloc.
ifdef COMPILE_WITH_UBSAN ifdef COMPILE_WITH_UBSAN
DISABLE_JEMALLOC=1 DISABLE_JEMALLOC=1
EXEC_LDFLAGS += -fsanitize=undefined -fno-sanitize-recover # Suppress alignment warning because murmurhash relies on casting unaligned
PLATFORM_CCFLAGS += -fsanitize=undefined -fno-sanitize-recover -DROCKSDB_UBSAN_RUN # memory to integer. Fixing it may cause performance regression. 3-way crc32
PLATFORM_CXXFLAGS += -fsanitize=undefined -fno-sanitize-recover -DROCKSDB_UBSAN_RUN # relies on it too, although it can be rewritten to eliminate with minimal
# performance regression.
EXEC_LDFLAGS += -fsanitize=undefined -fno-sanitize-recover -fno-sanitize=alignment
PLATFORM_CCFLAGS += -fsanitize=undefined -fno-sanitize-recover -fno-sanitize=alignment -DROCKSDB_UBSAN_RUN
PLATFORM_CXXFLAGS += -fsanitize=undefined -fno-sanitize-recover -fno-sanitize=alignment -DROCKSDB_UBSAN_RUN
endif endif
ifdef ROCKSDB_VALGRIND_RUN ifdef ROCKSDB_VALGRIND_RUN

Loading…
Cancel
Save