Valgrind: r16454 - /trunk/coregrind/m_gdbserver/m_gdbserver.c

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Valgrind: r16454 - /trunk/coregrind/m_gdbserver/m_gdbserver.c

svn-2
Author: philippe
Date: Sun Jun 25 21:25:50 2017
New Revision: 16454

Log:
After fork, vgdb activity is polled according to the nr of bbs done :
once the nr of bbs done reaches the next vgdb poll, a check for vgdb
activity is done.
This might lead to the activation of gdbserver after fork.
Such poll is however not expected, unless the children is
to be trace.
This spurious poll in the forked child can cause failures
depending on the nr of bbs done before the fork, and the
nr of bbs done between the fork and the exec.

=> disable vgdb poll in the child in the cleanup after fork
in the child, unless the children have to be traced.


Modified:
    trunk/coregrind/m_gdbserver/m_gdbserver.c

Modified: trunk/coregrind/m_gdbserver/m_gdbserver.c
==============================================================================
--- trunk/coregrind/m_gdbserver/m_gdbserver.c (original)
+++ trunk/coregrind/m_gdbserver/m_gdbserver.c Sun Jun 25 21:25:50 2017
@@ -646,6 +646,10 @@
   
    if (VG_(clo_trace_children)) {
       VG_(gdbserver_prerun_action) (me);
+   } else {
+      /* After fork, if we do not trace the children, disable vgdb
+         poll to avoid gdbserver being called unexpectedly. */
+      VG_(disable_vgdb_poll) ();
    }
 }
 


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Valgrind-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-developers