mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] fixup! test: self: malloc: fix false positive when malloc store is registered
@ 2025-10-23  6:59 Ahmad Fatoum
  2025-10-23  7:44 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2025-10-23  6:59 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

test: self: malloc: fix false positive when using libc allocator

The initial memory pool allocated

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 test/self/malloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/self/malloc.c b/test/self/malloc.c
index cf307158fb7e..1ec351c3efe5 100644
--- a/test/self/malloc.c
+++ b/test/self/malloc.c
@@ -110,7 +110,7 @@ static void test_malloc(void)
 
 	if (mem_malloc_size) {
 		tmp = realloc(p, mem_malloc_size);
-		if (!malloc_store_is_registered())
+		if (!malloc_store_is_registered() && !have_overcommit)
 			__expect_cond(tmp, false, "realloc of mem_malloc_size", __func__, __LINE__);
 
 		if (tmp)
-- 
2.47.3




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-10-23  7:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-23  6:59 [PATCH] fixup! test: self: malloc: fix false positive when malloc store is registered Ahmad Fatoum
2025-10-23  7:44 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox