]> git.ipfire.org Git - thirdparty/mlmmj.git/commitdiff
tests: enable glibc malloc corruption detection 78/head
authorMichael S. Tsirkin <mst@redhat.com>
Fri, 9 Jan 2026 08:49:17 +0000 (03:49 -0500)
committerMichael S. Tsirkin <mst@redhat.com>
Fri, 9 Jan 2026 12:16:16 +0000 (07:16 -0500)
Set MALLOC_CHECK_=3 in test environment to detect memory corruption
issues like double-free and buffer overflows. When detected, glibc
will print a diagnostic and abort the program.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
tests/test_env.sh.in

index 240ba8e8bdfdccb20ce26692d1d35bfe113f3aec..e0e326dca6fcc3aac1b2d16d4bf20b4031ae6e7a 100644 (file)
@@ -3,6 +3,9 @@ top_builddir="@abs_top_builddir@"
 
 export PATH="${top_builddir}/src:${PATH}"
 
+# Detect memory corruption (double-free, buffer overflow) in glibc malloc
+export MALLOC_CHECK_=3
+
 prefix="@prefix@"
 exec_prefix="@exec_prefix@"
 datarootdir="@datarootdir@"