From: Christopher Obbard Date: Fri, 14 Aug 2026 20:40:57 +0100 Subject: Disable the dlsym-based memory fault-injection tests The upstream test suite interposes malloc(), memcpy(), memset() and realloc() via dlsym(RTLD_NEXT, ...) in tests/vhdi_test_memory.c and counts the calls made by the function under test, so that it can inject a failure at the n-th call. Upstream itself notes in that file that this "might fail if compiled with optimation and as a shared libary": when the library is built optimised, fixed-size memory_copy() calls are expanded inline as compiler builtins and never reach the interposer, so the accounting drifts and the injected failure lands on an unrelated memcpy() whose result nobody checks. The test then sees success where it expects -1 and fails. This has been worked around per-architecture since #978528, most recently disabling the tests on alpha, arm64, powerpc, ppc64, ppc64el, riscv64 and s390x. With the current toolchain in unstable amd64 fails the same way: vhdi_test_dynamic_disk_header.c:561 result (1) != -1 Unable to run test: libvhdi_dynamic_disk_header_read_data Testing: dynamic_disk_header (FAIL) Since the architecture blocklist has to be extended on every toolchain change and these tests only exercise upstream's own out-of-memory error paths rather than anything about the shipped library, disable them everywhere instead. Original patch by Aurelien Jarno . Author: Christopher Obbard Bug-Debian: https://bugs.debian.org/978528 Bug-Debian: https://bugs.debian.org/1143760 Forwarded: not-needed Last-Update: 2026-08-14 Signed-off-by: Christopher Obbard --- tests/vhdi_test_memory.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/vhdi_test_memory.h b/tests/vhdi_test_memory.h index 529f1c1..c2734f6 100644 --- a/tests/vhdi_test_memory.h +++ b/tests/vhdi_test_memory.h @@ -28,7 +28,7 @@ extern "C" { #endif -#if defined( HAVE_GNU_DL_DLSYM ) && defined( __GNUC__ ) && !defined( LIBVHDI_DLL_IMPORT ) && !defined( __arm__ ) && !defined( __clang__ ) && !defined( __CYGWIN__ ) && !defined( __hppa__ ) && !defined( __loongarch__ ) && !defined( __mips__ ) && !defined( __riscv ) && !defined( __sparc__ ) && !defined( HAVE_ASAN ) +#if 0 #define HAVE_VHDI_TEST_MEMORY 1 #endif