57 lines
2.1 KiB
Diff
57 lines
2.1 KiB
Diff
From 1c2cdfd790b3e26f47e709770bdefd456d83a7cb Mon Sep 17 00:00:00 2001
|
|
From: Paul Floyd <pjfloyd@wanadoo.fr>
|
|
Date: Tue, 4 Jun 2024 12:49:33 +0200
|
|
Subject: [PATCH 11/11] Linux regtest: reallocarray needs malloc.h
|
|
|
|
Seen on Rocky 8.9
|
|
|
|
(cherry picked from commit a015ad2e0db40076b4841220c7ab6d6853798936)
|
|
---
|
|
memcheck/tests/amd64-linux/reallocarray.c | 1 +
|
|
memcheck/tests/amd64-linux/reallocarray.stderr.exp | 8 ++++----
|
|
2 files changed, 5 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/memcheck/tests/amd64-linux/reallocarray.c b/memcheck/tests/amd64-linux/reallocarray.c
|
|
index 8765ca4997cb..ce63b80100da 100644
|
|
--- a/memcheck/tests/amd64-linux/reallocarray.c
|
|
+++ b/memcheck/tests/amd64-linux/reallocarray.c
|
|
@@ -2,6 +2,7 @@
|
|
#include <assert.h>
|
|
#include <errno.h>
|
|
#include <stdint.h>
|
|
+#include <malloc.h>
|
|
#include "../../memcheck.h"
|
|
|
|
int main(void)
|
|
diff --git a/memcheck/tests/amd64-linux/reallocarray.stderr.exp b/memcheck/tests/amd64-linux/reallocarray.stderr.exp
|
|
index a1c8439cc9ef..20a1c4e8b4f9 100644
|
|
--- a/memcheck/tests/amd64-linux/reallocarray.stderr.exp
|
|
+++ b/memcheck/tests/amd64-linux/reallocarray.stderr.exp
|
|
@@ -12,19 +12,19 @@ To see them, rerun with: --leak-check=full --show-leak-kinds=all
|
|
|
|
realloc() with size 0
|
|
at 0x........: reallocarray (vg_replace_malloc.c:...)
|
|
- by 0x........: main (reallocarray.c:13)
|
|
+ by 0x........: main (reallocarray.c:14)
|
|
Address 0x........ is 0 bytes inside a block of size 40 alloc'd
|
|
at 0x........: reallocarray (vg_replace_malloc.c:...)
|
|
- by 0x........: main (reallocarray.c:11)
|
|
+ by 0x........: main (reallocarray.c:12)
|
|
|
|
All heap blocks were freed -- no leaks are possible
|
|
|
|
realloc() with size 0
|
|
at 0x........: reallocarray (vg_replace_malloc.c:...)
|
|
- by 0x........: main (reallocarray.c:16)
|
|
+ by 0x........: main (reallocarray.c:17)
|
|
Address 0x........ is 0 bytes inside a block of size 10 alloc'd
|
|
at 0x........: malloc (vg_replace_malloc.c:...)
|
|
- by 0x........: main (reallocarray.c:15)
|
|
+ by 0x........: main (reallocarray.c:16)
|
|
|
|
All heap blocks were freed -- no leaks are possible
|
|
|
|
--
|
|
2.45.2
|
|
|