|
From: <sv...@va...> - 2012-09-02 14:21:22
|
sewardj 2012-09-02 15:21:13 +0100 (Sun, 02 Sep 2012)
New Revision: 12934
Log:
Merge from trunk, revs 12879, 12882, 12883
(#301281: valgrind hangs on OS X when the process calls system())
Modified directories:
branches/VALGRIND_3_8_BRANCH/
branches/VALGRIND_3_8_BRANCH/coregrind/m_syswrap/
Modified files:
branches/VALGRIND_3_8_BRANCH/coregrind/m_syswrap/syswrap-darwin.c
branches/VALGRIND_3_8_BRANCH/coregrind/m_syswrap/syswrap-generic.c
Modified: branches/VALGRIND_3_8_BRANCH/
Modified: branches/VALGRIND_3_8_BRANCH/coregrind/m_syswrap/
Property changed: branches/VALGRIND_3_8_BRANCH/coregrind/m_syswrap/syswrap-generic.c (+0 -0)
___________________________________________________________________
Name: svn:mergeinfo
- /branches/TCHAIN/coregrind/m_syswrap/syswrap-generic.c:12477-12516
/trunk/coregrind/m_syswrap/syswrap-generic.c:12874,12878
+ /branches/TCHAIN/coregrind/m_syswrap/syswrap-generic.c:12477-12516
/trunk/coregrind/m_syswrap/syswrap-generic.c:12874,12878-12879,12882-12883
Modified: branches/VALGRIND_3_8_BRANCH/coregrind/m_syswrap/syswrap-darwin.c (+8 -10)
===================================================================
--- branches/VALGRIND_3_8_BRANCH/coregrind/m_syswrap/syswrap-darwin.c 2012-09-02 15:14:12 +01:00 (rev 12933)
+++ branches/VALGRIND_3_8_BRANCH/coregrind/m_syswrap/syswrap-darwin.c 2012-09-02 15:21:13 +01:00 (rev 12934)
@@ -41,7 +41,6 @@
#include "pub_core_debuglog.h"
#include "pub_core_debuginfo.h" // VG_(di_notify_*)
#include "pub_core_transtab.h" // VG_(discard_translations)
-#include "pub_tool_gdbserver.h" // VG_(gdbserver)
#include "pub_core_libcbase.h"
#include "pub_core_libcassert.h"
#include "pub_core_libcfile.h"
@@ -2834,14 +2833,11 @@
/* Ok. So let's give it a try. */
VG_(debugLog)(1, "syswrap", "Posix_spawn of %s\n", (Char*)ARG2);
- // Terminate gdbserver if it is active.
- if (VG_(clo_vgdb) != Vg_VgdbNo) {
- // If the child will not be traced, we need to terminate gdbserver
- // to cleanup the gdbserver resources (e.g. the FIFO files).
- // If child will be traced, we also terminate gdbserver: the new
- // Valgrind will start a fresh gdbserver after exec.
- VG_(gdbserver) (tid);
- }
+ /* posix_spawn on Darwin is combining the fork and exec in one syscall.
+ So, we should not terminate gdbserver : this is still the parent
+ running, which will terminate its gdbserver when exiting.
+ If the child process is traced, it will start a fresh gdbserver
+ after posix_spawn. */
// Set up the child's exe path.
//
@@ -2959,7 +2955,9 @@
POST(posix_spawn)
{
vg_assert(SUCCESS);
- //POST_MEM_WRITE( ARG1, sizeof(vki_pid_t) );
+ if (ARG1 != 0) {
+ POST_MEM_WRITE( ARG1, sizeof(vki_pid_t) );
+ }
}
Property changed: branches/VALGRIND_3_8_BRANCH (+0 -0)
___________________________________________________________________
Name: svn:mergeinfo
- /branches/TCHAIN:12477-12516
/trunk:12873,12878
+ /branches/TCHAIN:12477-12516
/trunk:12873,12878-12879
Property changed: branches/VALGRIND_3_8_BRANCH/coregrind/m_syswrap (+0 -0)
___________________________________________________________________
Name: svn:mergeinfo
+ /branches/TCHAIN/coregrind/m_syswrap:12477-12516
/trunk/coregrind/m_syswrap:12873,12882-12883
|