From 0aa12f83777dfa392fdf6442689699a21aa696e6 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Wed, 1 Apr 2015 22:04:41 +0200 Subject: [PATCH] build: enable glibc's malloc checks for the test suite Setting MALLOC_CHECK_=3 causes additional checks in glibc for malloc() usage errors, abort()ing the test if those trigger. MALLOC_PERTURB_=69 causes free()'d memory to be poisoned with 0x45, leading to crashes in case of use-after-free. Together, both are useful for spotting more errors during "make check" --- Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile.am b/Makefile.am index 2255ce82c..b6beb42a8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -413,6 +413,7 @@ noinst_PROGRAMS += $(unit_tests) endif TESTS = $(unit_tests) +AM_TESTS_ENVIRONMENT = MALLOC_CHECK_=3 MALLOC_PERTURB_=69 pkgconfigdir = $(libdir)/pkgconfig -- 2.47.3