summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorYann Collet <cyan@fb.com>2020-09-17 22:34:03 (GMT)
committerYann Collet <cyan@fb.com>2020-09-17 22:34:03 (GMT)
commitb223f11b2163a80c30084b14cec8dabe944740f5 (patch)
tree99f736b395ba0d44988b6998085db101722294e2 /Makefile
parent10d2e1c69465ac51d210909ca7a447a1397736a1 (diff)
downloadlz4-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--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index ef1fd2e..6bf952c 100644
--- a/Makefile
+++ b/Makefile
@@ -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