From: Julian Seward Date: Tue, 4 Jan 2011 14:18:35 +0000 (+0000) Subject: Un-break the trunk build on OSX (broken by r11483 on 6 Dec '10). X-Git-Tag: svn/VALGRIND_3_7_0~713 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=30dcecc9c99483602c14d22944ab3b0cac74aae0;p=thirdparty%2Fvalgrind.git Un-break the trunk build on OSX (broken by r11483 on 6 Dec '10). Fixes #261654. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11489 --- diff --git a/coregrind/m_syswrap/syswrap-darwin.c b/coregrind/m_syswrap/syswrap-darwin.c index 76ad8674d5..02fca387ba 100644 --- a/coregrind/m_syswrap/syswrap-darwin.c +++ b/coregrind/m_syswrap/syswrap-darwin.c @@ -2749,7 +2749,13 @@ PRE(posix_spawn) } // Decide whether or not we want to follow along - trace_this_child = VG_(should_we_trace_this_child)( (HChar*)ARG2 ); + { // Make 'child_argv' be a pointer to the child's arg vector + // (skipping the exe name) + HChar** child_argv = (HChar**)ARG4; + if (child_argv && child_argv[0] == NULL) + child_argv = NULL; + trace_this_child = VG_(should_we_trace_this_child)( (HChar*)ARG2, child_argv ); + } // Do the important checks: it is a file, is executable, permissions are // ok, etc. We allow setuid executables to run only in the case when