From 4dd849e4eca28467c92eb523a8d001a8d06ee74e Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sun, 3 Apr 2022 22:28:26 +0200 Subject: [PATCH] Second go at memcheck/tests/freebsd/relapathat Missed adding the argument to the C file Needs more filtering --- memcheck/tests/freebsd/filter_realpathat | 4 +++- memcheck/tests/freebsd/realpathat.c | 2 +- memcheck/tests/freebsd/realpathat.stderr.exp | 16 ++++++++++------ 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/memcheck/tests/freebsd/filter_realpathat b/memcheck/tests/freebsd/filter_realpathat index 82b21841dd..599a35cb38 100755 --- a/memcheck/tests/freebsd/filter_realpathat +++ b/memcheck/tests/freebsd/filter_realpathat @@ -1,6 +1,8 @@ #! /bin/sh -gsed 's/Invalid write of size 8/Invalid write of size .../' | +gsed 's/Invalid write of size 8/Invalid write of size 4/' | +gsed 's/is [4-9][0-9] bytes inside a block of size 100 free/is ... bytes inside a block of size 100 free/' | + ../filter_stderr "$@" diff --git a/memcheck/tests/freebsd/realpathat.c b/memcheck/tests/freebsd/realpathat.c index d7a84240b0..05a20cb924 100644 --- a/memcheck/tests/freebsd/realpathat.c +++ b/memcheck/tests/freebsd/realpathat.c @@ -19,7 +19,7 @@ int main(void) *bad_int1 = AT_FDCWD; *bad_int2 = 0; *bad_sz = PATH_MAX; - syscall(SYS___realpathat, *bad_int1, self_path, buf, *bad_int2); + syscall(SYS___realpathat, *bad_int1, self_path, buf, *bad_sz, *bad_int2); free(bad_int1); free(bad_int2); diff --git a/memcheck/tests/freebsd/realpathat.stderr.exp b/memcheck/tests/freebsd/realpathat.stderr.exp index 3d6647e3ae..e299abcba8 100644 --- a/memcheck/tests/freebsd/realpathat.stderr.exp +++ b/memcheck/tests/freebsd/realpathat.stderr.exp @@ -10,7 +10,7 @@ Invalid write of size 4 at 0x........: malloc (vg_replace_malloc.c:...) by 0x........: main (realpathat.c:17) -Invalid write of size ... +Invalid write of size 4 at 0x........: main (realpathat.c:21) Address 0x........ is 0 bytes inside a block of size 1 alloc'd at 0x........: malloc (vg_replace_malloc.c:...) @@ -24,6 +24,10 @@ Syscall param __realpathat(size) contains uninitialised byte(s) ... by 0x........: main (realpathat.c:22) +Syscall param __realpathat(flags) contains uninitialised byte(s) + ... + by 0x........: main (realpathat.c:22) + Invalid read of size 1 ... by 0x........: main (realpathat.c:32) @@ -116,7 +120,7 @@ Invalid read of size 1 Invalid write of size 2 ... by 0x........: main (realpathat.c:32) - Address 0x........ is 55 bytes inside a block of size 100 free'd + Address 0x........ is ... bytes inside a block of size 100 free'd at 0x........: free (vg_replace_malloc.c:...) by 0x........: main (realpathat.c:29) Block was alloc'd at @@ -127,7 +131,7 @@ Invalid read of size 1 at 0x........: strlcat (vg_replace_strmem.c:...) ... by 0x........: main (realpathat.c:32) - Address 0x........ is 56 bytes inside a block of size 100 free'd + Address 0x........ is ... bytes inside a block of size 100 free'd at 0x........: free (vg_replace_malloc.c:...) by 0x........: main (realpathat.c:29) Block was alloc'd at @@ -138,7 +142,7 @@ Invalid write of size 1 at 0x........: strlcat (vg_replace_strmem.c:...) ... by 0x........: main (realpathat.c:32) - Address 0x........ is 56 bytes inside a block of size 100 free'd + Address 0x........ is ... bytes inside a block of size 100 free'd at 0x........: free (vg_replace_malloc.c:...) by 0x........: main (realpathat.c:29) Block was alloc'd at @@ -149,7 +153,7 @@ Invalid write of size 1 at 0x........: strlcat (vg_replace_strmem.c:...) ... by 0x........: main (realpathat.c:32) - Address 0x........ is 66 bytes inside a block of size 100 free'd + Address 0x........ is ... bytes inside a block of size 100 free'd at 0x........: free (vg_replace_malloc.c:...) by 0x........: main (realpathat.c:29) Block was alloc'd at @@ -159,7 +163,7 @@ Invalid write of size 1 Syscall param fstatat(path) points to unaddressable byte(s) ... by 0x........: main (realpathat.c:32) - Address 0x........ is 56 bytes inside a block of size 100 free'd + Address 0x........ is ... bytes inside a block of size 100 free'd at 0x........: free (vg_replace_malloc.c:...) by 0x........: main (realpathat.c:29) Block was alloc'd at -- 2.47.2