From 58f70cebb6ee7ad5ddbc798c4dfc77153b08a9da Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Wed, 14 Dec 2022 23:55:20 +0000 Subject: [PATCH] Fix test_aligned_mem for Morello On Arm Morello sizeof(void*) is 16 bytes so we fail the check for `(alignment % sizeof (void *)) != 0))` in gmem.c. --- glib/tests/utils.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/glib/tests/utils.c b/glib/tests/utils.c index d02701c8a..574333a4b 100644 --- a/glib/tests/utils.c +++ b/glib/tests/utils.c @@ -1086,13 +1086,13 @@ test_aligned_mem (void) g_test_summary ("Aligned memory allocator"); - a = g_aligned_alloc (0, sizeof(int), 8); + a = g_aligned_alloc (0, sizeof (int), MAX (sizeof (void *), 8)); g_assert_null (a); - a = g_aligned_alloc0 (0, sizeof(int), 8); + a = g_aligned_alloc0 (0, sizeof (int), MAX (sizeof (void *), 8)); g_assert_null (a); - a = g_aligned_alloc (16, 0, 8); + a = g_aligned_alloc (16, 0, MAX (sizeof (void *), 8)); g_assert_null (a); #define CHECK_SUBPROCESS_FAIL(name,msg) do { \