fixed ubsan tests with dynamic library

This commit is contained in:
Yann Collet 2020-09-17 16:49:21 -07:00
parent b223f11b21
commit 4f57219a22
2 changed files with 7 additions and 3 deletions

View File

@ -124,8 +124,8 @@ check:
.PHONY: test .PHONY: test
test: test:
CFLAGS="$(CFLAGS)" $(MAKE) -C $(TESTDIR) $@ CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" $(MAKE) -C $(TESTDIR) $@
CFLAGS="$(CFLAGS)" $(MAKE) -C $(EXDIR) $@ CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" $(MAKE) -C $(EXDIR) $@
clangtest: CFLAGS ?= -O3 clangtest: CFLAGS ?= -O3
clangtest: CFLAGS += -Werror -Wconversion -Wno-sign-conversion clangtest: CFLAGS += -Werror -Wconversion -Wno-sign-conversion
@ -142,8 +142,11 @@ clangtest-native: clean
@CFLAGS="-O3 -Werror -Wconversion -Wno-sign-conversion" $(MAKE) -C $(PRGDIR) native CC=clang @CFLAGS="-O3 -Werror -Wconversion -Wno-sign-conversion" $(MAKE) -C $(PRGDIR) native CC=clang
@CFLAGS="-O3 -Werror -Wconversion -Wno-sign-conversion" $(MAKE) -C $(TESTDIR) native CC=clang @CFLAGS="-O3 -Werror -Wconversion -Wno-sign-conversion" $(MAKE) -C $(TESTDIR) native CC=clang
usan: CC = clang
usan: CFLAGS = -O3 -g -fsanitize=undefined -fno-sanitize-recover=undefined -fsanitize-recover=pointer-overflow
usan: LDFLAGS = $(CFLAGS)
usan: clean usan: clean
CC=clang CFLAGS="-O3 -g -fsanitize=undefined -fno-sanitize-recover=undefined -fsanitize-recover=pointer-overflow" $(MAKE) test FUZZER_TIME="-T30s" NB_LOOPS=-i1 CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" $(MAKE) test FUZZER_TIME="-T30s" NB_LOOPS=-i1
usan32: clean usan32: clean
CFLAGS="-m32 -O3 -g -fsanitize=undefined" $(MAKE) test FUZZER_TIME="-T30s" NB_LOOPS=-i1 CFLAGS="-m32 -O3 -g -fsanitize=undefined" $(MAKE) test FUZZER_TIME="-T30s" NB_LOOPS=-i1

1
tests/.gitignore vendored
View File

@ -11,6 +11,7 @@ fasttest
roundTripTest roundTripTest
checkTag checkTag
checkFrame checkFrame
decompress-partial
# test artefacts # test artefacts
tmp* tmp*