From: Paul Floyd Date: Tue, 4 Jun 2024 10:49:33 +0000 (+0200) Subject: Linux regtest: reallocarray needs malloc.h X-Git-Tag: VALGRIND_3_24_0~123 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a015ad2e0db40076b4841220c7ab6d6853798936;p=thirdparty%2Fvalgrind.git Linux regtest: reallocarray needs malloc.h Seen on Rocky 8.9 --- diff --git a/memcheck/tests/amd64-linux/reallocarray.c b/memcheck/tests/amd64-linux/reallocarray.c index 8765ca4997..ce63b80100 100644 --- a/memcheck/tests/amd64-linux/reallocarray.c +++ b/memcheck/tests/amd64-linux/reallocarray.c @@ -2,6 +2,7 @@ #include #include #include +#include #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 a1c8439cc9..20a1c4e8b4 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