summaryrefslogtreecommitdiffstats
path: root/tools/wine_valgrind/valgrind_skip_python.patch
blob: e5bafd781df5cf9d66bdcbbe24369cd1f000c93a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
This patch prevents valgrind from tracing into python.exe.
TODO(thestig) generalize this and submit upstream for
https://bugs.kde.org/show_bug.cgi?id=218689
Index: coregrind/m_syswrap/syswrap-generic.c
===================================================================
--- coregrind/m_syswrap/syswrap-generic.c	(revision 10880)
+++ coregrind/m_syswrap/syswrap-generic.c	(working copy)
@@ -2544,6 +2544,19 @@
    VG_(nuke_all_threads_except)( tid, VgSrc_ExitThread );
    VG_(reap_threads)(tid);
 
+   if (VG_(clo_trace_children)) {
+      Char** program_args = (Char**)ARG2;
+      if (program_args && program_args[0]) {
+         Int k = 1;
+         for (; program_args[k]; k++) {
+            if (VG_(strstr)(program_args[k], "python.exe") != NULL) {
+              VG_(clo_trace_children) = False;
+              break;
+            }
+         }
+      }
+   }
+
    // Set up the child's exe path.
    //
    if (VG_(clo_trace_children)) {