From: Paul Floyd Date: Wed, 24 Dec 2025 16:15:49 +0000 (+0100) Subject: Darwin syswrap: 1st arg of posix_spawn can be NULL X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d48f6d4ecb7c099aa63c38261ca9bca3c7c16ed;p=thirdparty%2Fvalgrind.git Darwin syswrap: 1st arg of posix_spawn can be NULL --- diff --git a/coregrind/m_syswrap/syswrap-darwin.c b/coregrind/m_syswrap/syswrap-darwin.c index 1fa1de542..9d8ba22a3 100644 --- a/coregrind/m_syswrap/syswrap-darwin.c +++ b/coregrind/m_syswrap/syswrap-darwin.c @@ -3852,7 +3852,9 @@ PRE(posix_spawn) PRE_REG_READ5(int, "posix_spawn", vki_pid_t*, pid, char*, path, void*, file_actions, char**, argv, char**, envp ); - PRE_MEM_WRITE("posix_spawn(pid)", ARG1, sizeof(vki_pid_t) ); + if (ARG1 != 0) { + PRE_MEM_WRITE("posix_spawn(pid)", ARG1, sizeof(vki_pid_t) ); + } PRE_MEM_RASCIIZ("posix_spawn(path)", ARG2); // DDD: check file_actions if (ARG4 != 0)