]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Linux regtest: reallocarray needs malloc.h
authorPaul Floyd <pjfloyd@wanadoo.fr>
Tue, 4 Jun 2024 10:49:33 +0000 (12:49 +0200)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Tue, 4 Jun 2024 10:49:33 +0000 (12:49 +0200)
Seen on Rocky 8.9

memcheck/tests/amd64-linux/reallocarray.c
memcheck/tests/amd64-linux/reallocarray.stderr.exp

index 8765ca4997cbcedf43a08e1c6f6c36c2b64b182f..ce63b80100da41b446a00c3d43f13ff4e48d6967 100644 (file)
@@ -2,6 +2,7 @@
 #include <assert.h>
 #include <errno.h>
 #include <stdint.h>
+#include <malloc.h>
 #include "../../memcheck.h"
 
 int main(void)
index a1c8439cc9ef53a96033381be774bea06e750e11..20a1c4e8b4f962c16ed928afd3d113495b563829 100644 (file)
@@ -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