]> git.ipfire.org Git - thirdparty/git.git/commit
test-lib: have SANITIZE=leak imply TEST_NO_MALLOC_CHECK
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Wed, 28 Sep 2022 10:01:54 +0000 (12:01 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 29 Sep 2022 15:37:45 +0000 (08:37 -0700)
commit5e7c8b75e7ea25fb8473ac97890364184501fba7
tree37d73f18f542619f09255b71d255850db407899c
parenta0feb8611d4c0b2b5d954efe4e98207f62223436
test-lib: have SANITIZE=leak imply TEST_NO_MALLOC_CHECK

Since 131b94a10a7 (test-lib.sh: Use GLIBC_TUNABLES instead of
MALLOC_CHECK_ on glibc >= 2.34, 2022-03-04) compiling with
SANITIZE=leak has missed reporting some leaks. The old MALLOC_CHECK
method used before glibc 2.34 seems to have been (mostly?) compatible
with it, but after 131b94a10a7 e.g. running:

TEST_NO_MALLOC_CHECK=1 make SANITIZE=leak test T=t6437-submodule-merge.sh

Would report a leak in builtin/commit.c, but this would not:

TEST_NO_MALLOC_CHECK= make SANITIZE=leak test T=t6437-submodule-merge.sh

Since the interaction is clearly breaking the SANITIZE=leak mode,
let's mark them as explicitly incompatible.

A related regression for SANITIZE=address was fixed in
067109a5e7d (tests: make SANITIZE=address imply TEST_NO_MALLOC_CHECK,
2022-04-09).

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Acked-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/test-lib.sh