]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
FreeBSD shm_open2 arg5 seems to be optional
authorPaul Floyd <pjfloyd@wanadoo.fr>
Mon, 9 May 2022 09:58:45 +0000 (11:58 +0200)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Mon, 9 May 2022 09:58:45 +0000 (11:58 +0200)
This syscall doesn't have a libc interface and manpage so
the documentation is skimpy.

coregrind/m_syswrap/syswrap-freebsd.c
memcheck/tests/freebsd/scalar_13_plus.c

index eed1b5a6da377c4cc4bde5946b8469f0ecafc46b..0f2c2681d3ec23188e620cac70e12f44ce9ef143 100644 (file)
@@ -6241,7 +6241,9 @@ PRE(sys_shm_open2)
       PRE_MEM_RASCIIZ( "shm_open2(path)", ARG1 );
    }
 
-    PRE_MEM_RASCIIZ( "shm_open2(name)", ARG5 );
+   if (ARG5) {
+      PRE_MEM_RASCIIZ( "shm_open2(name)", ARG5 );
+   }
    *flags |= SfMayBlock;
 }
 
index a0f5dfe363fd8a038ad9a388ee57a3926eef2c68..4ba48efa6046191ae4b35c24c1481c6dd89865e2 100644 (file)
@@ -7,7 +7,7 @@ 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); FAIL;
+   SY(SYS_shm_open2, x0, x0+1, x0+2, x0+3, x0+4); FAIL;
 
    /* SYS___realpathat                   574 */
    GO(SYS___realpathat, " 5s 2m");