|
From: Paul F. <pa...@so...> - 2022-05-09 19:29:05
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=35fcf875c6b7ba107e468d7a9d88df1e70058edd commit 35fcf875c6b7ba107e468d7a9d88df1e70058edd Author: Paul Floyd <pj...@wa...> Date: Mon May 9 21:27:36 2022 +0200 FreeBSD shm_open2 also accepts first argument as SHM_ANON Add an extra test to scalar Diff: --- memcheck/tests/freebsd/scalar_13_plus.c | 6 +++++- memcheck/tests/freebsd/scalar_13_plus.stderr.exp | 22 ++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/memcheck/tests/freebsd/scalar_13_plus.c b/memcheck/tests/freebsd/scalar_13_plus.c index 4ba48efa60..b22152ebb2 100644 --- a/memcheck/tests/freebsd/scalar_13_plus.c +++ b/memcheck/tests/freebsd/scalar_13_plus.c @@ -1,4 +1,5 @@ #include "scalar.h" +#include <sys/mman.h> int main(void) { @@ -7,7 +8,10 @@ int main(void) /* SYS_shm_open2 571 */ GO(SYS_shm_open2, " 5s 2m"); - SY(SYS_shm_open2, x0, x0+1, x0+2, x0+3, x0+4); FAIL; + SY(SYS_shm_open2, x0+0xf00c, x0+1, x0+2, x0+3, x0+4); FAIL; + + GO(SYS_shm_open2, " 5s 1m"); + SY(SYS_shm_open2, x0+SHM_ANON, x0+1, x0+2, x0+3, x0+4); FAIL; /* SYS___realpathat 574 */ GO(SYS___realpathat, " 5s 2m"); diff --git a/memcheck/tests/freebsd/scalar_13_plus.stderr.exp b/memcheck/tests/freebsd/scalar_13_plus.stderr.exp index 02447b53ae..489646810b 100644 --- a/memcheck/tests/freebsd/scalar_13_plus.stderr.exp +++ b/memcheck/tests/freebsd/scalar_13_plus.stderr.exp @@ -24,6 +24,28 @@ Syscall param shm_open2(name) points to unaddressable byte(s) ... Address 0x........ is not stack'd, malloc'd or (recently) free'd +--------------------------------------------------------- +571: SYS_shm_open2 5s 1m +--------------------------------------------------------- +Syscall param shm_open2(path) contains uninitialised byte(s) + ... + +Syscall param shm_open2(flags) contains uninitialised byte(s) + ... + +Syscall param shm_open2(mode) contains uninitialised byte(s) + ... + +Syscall param shm_open2(shmflags) contains uninitialised byte(s) + ... + +Syscall param shm_open2(name) contains uninitialised byte(s) + ... + +Syscall param shm_open2(name) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + --------------------------------------------------------- 574: SYS___realpathat 5s 2m --------------------------------------------------------- |