Merge branch 'pw/test-malloc-with-sanitize-address'
Avoid problems from interaction between malloc_check and address sanitizer. * pw/test-malloc-with-sanitize-address: tests: make SANITIZE=address imply TEST_NO_MALLOC_CHECK
This commit is contained in:
commit
cacfd1d018
5
Makefile
5
Makefile
@ -1267,8 +1267,9 @@ PTHREAD_CFLAGS =
|
|||||||
SPARSE_FLAGS ?= -std=gnu99
|
SPARSE_FLAGS ?= -std=gnu99
|
||||||
SP_EXTRA_FLAGS = -Wno-universal-initializer
|
SP_EXTRA_FLAGS = -Wno-universal-initializer
|
||||||
|
|
||||||
# For informing GIT-BUILD-OPTIONS of the SANITIZE=leak target
|
# For informing GIT-BUILD-OPTIONS of the SANITIZE=leak,address targets
|
||||||
SANITIZE_LEAK =
|
SANITIZE_LEAK =
|
||||||
|
SANITIZE_ADDRESS =
|
||||||
|
|
||||||
# For the 'coccicheck' target; setting SPATCH_BATCH_SIZE higher will
|
# For the 'coccicheck' target; setting SPATCH_BATCH_SIZE higher will
|
||||||
# usually result in less CPU usage at the cost of higher peak memory.
|
# usually result in less CPU usage at the cost of higher peak memory.
|
||||||
@ -1314,6 +1315,7 @@ SANITIZE_LEAK = YesCompiledWithIt
|
|||||||
endif
|
endif
|
||||||
ifneq ($(filter address,$(SANITIZERS)),)
|
ifneq ($(filter address,$(SANITIZERS)),)
|
||||||
NO_REGEX = NeededForASAN
|
NO_REGEX = NeededForASAN
|
||||||
|
SANITIZE_ADDRESS = YesCompiledWithIt
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -2862,6 +2864,7 @@ GIT-BUILD-OPTIONS: FORCE
|
|||||||
@echo PAGER_ENV=\''$(subst ','\'',$(subst ','\'',$(PAGER_ENV)))'\' >>$@+
|
@echo PAGER_ENV=\''$(subst ','\'',$(subst ','\'',$(PAGER_ENV)))'\' >>$@+
|
||||||
@echo DC_SHA1=\''$(subst ','\'',$(subst ','\'',$(DC_SHA1)))'\' >>$@+
|
@echo DC_SHA1=\''$(subst ','\'',$(subst ','\'',$(DC_SHA1)))'\' >>$@+
|
||||||
@echo SANITIZE_LEAK=\''$(subst ','\'',$(subst ','\'',$(SANITIZE_LEAK)))'\' >>$@+
|
@echo SANITIZE_LEAK=\''$(subst ','\'',$(subst ','\'',$(SANITIZE_LEAK)))'\' >>$@+
|
||||||
|
@echo SANITIZE_ADDRESS=\''$(subst ','\'',$(subst ','\'',$(SANITIZE_ADDRESS)))'\' >>$@+
|
||||||
@echo X=\'$(X)\' >>$@+
|
@echo X=\'$(X)\' >>$@+
|
||||||
ifdef FSMONITOR_DAEMON_BACKEND
|
ifdef FSMONITOR_DAEMON_BACKEND
|
||||||
@echo FSMONITOR_DAEMON_BACKEND=\''$(subst ','\'',$(subst ','\'',$(FSMONITOR_DAEMON_BACKEND)))'\' >>$@+
|
@echo FSMONITOR_DAEMON_BACKEND=\''$(subst ','\'',$(subst ','\'',$(FSMONITOR_DAEMON_BACKEND)))'\' >>$@+
|
||||||
|
@ -535,9 +535,10 @@ case $GIT_TEST_FSYNC in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Add libc MALLOC and MALLOC_PERTURB test
|
# Add libc MALLOC and MALLOC_PERTURB test only if we are not executing
|
||||||
# only if we are not executing the test with valgrind
|
# the test with valgrind and have not compiled with SANITIZE=address.
|
||||||
if test -n "$valgrind" ||
|
if test -n "$valgrind" ||
|
||||||
|
test -n "$SANITIZE_ADDRESS" ||
|
||||||
test -n "$TEST_NO_MALLOC_CHECK"
|
test -n "$TEST_NO_MALLOC_CHECK"
|
||||||
then
|
then
|
||||||
setup_malloc_check () {
|
setup_malloc_check () {
|
||||||
|
Loading…
Reference in New Issue
Block a user