|
From: Paul F. <pa...@so...> - 2022-05-09 10:00:25
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=d99b369c094145fd0203fbde59bd6d173b8bc5d0 commit d99b369c094145fd0203fbde59bd6d173b8bc5d0 Author: Paul Floyd <pj...@wa...> Date: Mon May 9 11:58:45 2022 +0200 FreeBSD shm_open2 arg5 seems to be optional This syscall doesn't have a libc interface and manpage so the documentation is skimpy. Diff: --- coregrind/m_syswrap/syswrap-freebsd.c | 4 +++- memcheck/tests/freebsd/scalar_13_plus.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/coregrind/m_syswrap/syswrap-freebsd.c b/coregrind/m_syswrap/syswrap-freebsd.c index eed1b5a6da..0f2c2681d3 100644 --- a/coregrind/m_syswrap/syswrap-freebsd.c +++ b/coregrind/m_syswrap/syswrap-freebsd.c @@ -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; } diff --git a/memcheck/tests/freebsd/scalar_13_plus.c b/memcheck/tests/freebsd/scalar_13_plus.c index a0f5dfe363..4ba48efa60 100644 --- a/memcheck/tests/freebsd/scalar_13_plus.c +++ b/memcheck/tests/freebsd/scalar_13_plus.c @@ -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"); |