]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
aligned_alloc wrapper: musl seems to be the only one to accept an alignment of zero
authorPaul Floyd <pjfloyd@wanadoo.fr>
Sun, 7 Sep 2025 07:50:33 +0000 (09:50 +0200)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Sun, 7 Sep 2025 07:50:33 +0000 (09:50 +0200)
coregrind/m_replacemalloc/vg_replace_malloc.c

index 1df4419ca47069d8daf467881b5cfbcde4e5b914..d88f55f8bf29e0169fb7c83118419d2cc64a605e 100644 (file)
@@ -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)