Eric Pouech : ntdll: Notify valgrind for stack management while in exception.

Alexandre Julliard julliard at winehq.org
Tue Feb 23 11:17:20 CST 2010


Module: wine
Branch: master
Commit: 27fb22637a36ebf05c863da30cfdf2bfd57e6862
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=27fb22637a36ebf05c863da30cfdf2bfd57e6862

Author: Eric Pouech <eric.pouech at orange.fr>
Date:   Mon Feb 22 21:03:35 2010 +0100

ntdll: Notify valgrind for stack management while in exception.

---

 dlls/ntdll/signal_x86_64.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c
index 97a952e..45cdb32 100644
--- a/dlls/ntdll/signal_x86_64.c
+++ b/dlls/ntdll/signal_x86_64.c
@@ -50,6 +50,10 @@
 #include "ntdll_misc.h"
 #include "wine/debug.h"
 
+#ifdef HAVE_VALGRIND_MEMCHECK_H
+#include <valgrind/memcheck.h>
+#endif
+
 WINE_DEFAULT_DEBUG_CHANNEL(seh);
 
 struct _DISPATCHER_CONTEXT;
@@ -1679,6 +1683,11 @@ static EXCEPTION_RECORD *setup_exception( ucontext_t *sigcontext, raise_func fun
     }
 
     stack--;  /* push the stack_layout structure */
+#if defined(VALGRIND_MAKE_MEM_UNDEFINED)
+    VALGRIND_MAKE_MEM_UNDEFINED(stack, sizeof(*stack));
+#elif defined(VALGRIND_MAKE_WRITABLE)
+    VALGRIND_MAKE_WRITABLE(stack, sizeof(*stack));
+#endif
     stack->rec.ExceptionRecord  = NULL;
     stack->rec.ExceptionCode    = exception_code;
     stack->rec.ExceptionFlags   = EXCEPTION_CONTINUABLE;




More information about the wine-cvs mailing list