From b68bf7603565676f8e7ee2f18f8dc6f84eef1dc7 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sun, 7 Sep 2025 09:50:33 +0200 Subject: [PATCH] aligned_alloc wrapper: musl seems to be the only one to accept an alignment of zero --- coregrind/m_replacemalloc/vg_replace_malloc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/coregrind/m_replacemalloc/vg_replace_malloc.c b/coregrind/m_replacemalloc/vg_replace_malloc.c index 1df4419ca..d88f55f8b 100644 --- a/coregrind/m_replacemalloc/vg_replace_malloc.c +++ b/coregrind/m_replacemalloc/vg_replace_malloc.c @@ -2299,16 +2299,16 @@ extern int * __error(void) __attribute__((weak)); #define VG_ALIGNED_ALLOC_ALIGN_FACTOR_FOUR 0 #endif -#if defined(VGO_freebsd) || defined(VGO_solaris) -#define VG_ALIGNED_ALLOC_NO_ALIGN_ZERO 1 +#if defined(VGO_solaris) +#define VG_ALIGNED_ALLOC_NO_SIZE_ZERO 1 #else -#define VG_ALIGNED_ALLOC_NO_ALIGN_ZERO 0 +#define VG_ALIGNED_ALLOC_NO_SIZE_ZERO 0 #endif -#if defined(VGO_freebsd) || defined(MUSL_LIBC) -#define VG_ALIGNED_ALLOC_NO_SIZE_ZERO 0 +#if defined(MUSL_LIBC) +#define VG_ALIGNED_ALLOC_NO_ALIGN_ZERO 0 #else -#define VG_ALIGNED_ALLOC_NO_SIZE_ZERO 1 +#define VG_ALIGNED_ALLOC_NO_ALIGN_ZERO 1 #endif #if defined (VGO_linux) && !defined(MUSL_LIBC) && !defined(HAVE_GNU_LIBC_C17_ALIGNED_ALLOC) -- 2.47.3