#include "wine/unicode.h"
#include "wine/debug.h"
+#ifdef HAVE_VALGRIND_MEMCHECK_H
+#include <valgrind/memcheck.h>
+#endif
+
WINE_DEFAULT_DEBUG_CHANNEL(process);
WINE_DECLARE_DEBUG_CHANNEL(file);
WINE_DECLARE_DEBUG_CHANNEL(relay);
NtCurrentTeb()->Tib.StackBase = (char *)base + stack_size;
NtCurrentTeb()->Tib.StackLimit = (char *)base + page_size;
+#ifdef VALGRIND_STACK_REGISTER
+ /* no need to de-register the stack as it's the one of the main thread */
+ VALGRIND_STACK_REGISTER(NtCurrentTeb()->Tib.StackLimit, NtCurrentTeb()->Tib.StackBase);
+#endif
+
/* setup guard page */
VirtualProtect( base, page_size, PAGE_NOACCESS, NULL );
return NtCurrentTeb()->Tib.StackBase;
#include "wine/library.h"
#include "ntdll_misc.h"
+#ifdef HAVE_VALGRIND_MEMCHECK_H
+#include <valgrind/memcheck.h>
+#endif
+
/***********************************************************************
* signal context platform-specific definitions
*/
}
stack--; /* push the stack_layout structure */
+#ifdef HAVE_VALGRIND_MEMCHECK_H
+ VALGRIND_MAKE_WRITABLE(stack, sizeof(*stack));
+#endif
stack->ret_addr = (void *)0xdeadbabe; /* raise_func must not return */
stack->rec_ptr = &stack->rec;
stack->context_ptr = &stack->context;