From: Paul Floyd Date: Mon, 9 May 2022 19:27:36 +0000 (+0200) Subject: FreeBSD shm_open2 also accepts first argument as SHM_ANON X-Git-Tag: VALGRIND_3_20_0~86 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=35fcf875c6b7ba107e468d7a9d88df1e70058edd;p=thirdparty%2Fvalgrind.git FreeBSD shm_open2 also accepts first argument as SHM_ANON Add an extra test to scalar --- 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 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 ---------------------------------------------------------