]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
FreeBSD shm_open2 also accepts first argument as SHM_ANON
authorPaul Floyd <pjfloyd@wanadoo.fr>
Mon, 9 May 2022 19:27:36 +0000 (21:27 +0200)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Mon, 9 May 2022 19:27:36 +0000 (21:27 +0200)
Add an extra test to scalar

memcheck/tests/freebsd/scalar_13_plus.c
memcheck/tests/freebsd/scalar_13_plus.stderr.exp

index 4ba48efa6046191ae4b35c24c1481c6dd89865e2..b22152ebb213a3af9fca56da689a3aea9585cfbe 100644 (file)
@@ -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");
index 02447b53aec17583ad18ff430dee62571cea9e81..489646810bcfc372080e268e3fe6cf24c3252768 100644 (file)
@@ -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
 ---------------------------------------------------------