diff options
author | Yann Collet <cyan@fb.com> | 2020-09-17 22:34:03 (GMT) |
---|---|---|
committer | Yann Collet <cyan@fb.com> | 2020-09-17 22:34:03 (GMT) |
commit | b223f11b2163a80c30084b14cec8dabe944740f5 (patch) | |
tree | 99f736b395ba0d44988b6998085db101722294e2 /Makefile | |
parent | 10d2e1c69465ac51d210909ca7a447a1397736a1 (diff) | |
download | lz4-b223f11b2163a80c30084b14cec8dabe944740f5.zip lz4-b223f11b2163a80c30084b14cec8dabe944740f5.tar.gz lz4-b223f11b2163a80c30084b14cec8dabe944740f5.tar.bz2 |
ubsan: make pointer overflow recoverable
the way `base` is used must allow 2-complement address overflow.
`base` is effectively a virtual pointer, never dereferenced directly.
What matters is `base + index`.
This is the address that will be dereference and must be valid (it is properly validated).
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -143,7 +143,7 @@ clangtest-native: clean @CFLAGS="-O3 -Werror -Wconversion -Wno-sign-conversion" $(MAKE) -C $(TESTDIR) native CC=clang usan: clean - CC=clang CFLAGS="-O3 -g -fsanitize=undefined -fno-sanitize-recover=undefined" $(MAKE) test FUZZER_TIME="-T30s" NB_LOOPS=-i1 + CC=clang CFLAGS="-O3 -g -fsanitize=undefined -fno-sanitize-recover=undefined -fsanitize-recover=pointer-overflow" $(MAKE) test FUZZER_TIME="-T30s" NB_LOOPS=-i1 usan32: clean CFLAGS="-m32 -O3 -g -fsanitize=undefined" $(MAKE) test FUZZER_TIME="-T30s" NB_LOOPS=-i1 |