Make the clone system call wrappers call VG_(register_stack) to record
the new thread's stack, then make the stack unwinder use that information
to make a better guess at the stack bounds.

This helps avoid crashes trying to unwind the stack under wine when
the starting point is a routine without a proper stack frame.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7383 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/m_syswrap/syswrap-ppc32-linux.c b/coregrind/m_syswrap/syswrap-ppc32-linux.c
index 41c3612..a166f15 100644
--- a/coregrind/m_syswrap/syswrap-ppc32-linux.c
+++ b/coregrind/m_syswrap/syswrap-ppc32-linux.c
@@ -304,6 +304,8 @@
       ctst->client_stack_highest_word = (Addr)VG_PGROUNDUP(sp);
       ctst->client_stack_szB = ctst->client_stack_highest_word - seg->start;
 
+      VG_(register_stack)(seg->start, ctst->client_stack_highest_word);
+
       if (debug)
 	 VG_(printf)("\ntid %d: guessed client stack range %p-%p\n",
 		     ctid, seg->start, VG_PGROUNDUP(sp));