|
From: Tom H. <to...@co...> - 2009-04-01 15:03:38
|
Konstantin Serebryany wrote: > On Wed, Apr 1, 2009 at 6:15 PM, Bart Van Assche > <bar...@gm...> wrote: >> On Wed, Apr 1, 2009 at 11:19 AM, Konstantin Serebryany >> <kon...@gm...> wrote: >>> As you can see, the 3-rd parameter of sys_clone() is a bit different >>> from what VG_(thread_get_stack_max) returns. >>> Why? >> This source code from coregrind/m_syswrap/syswrap-amd64-linux.c >> explains it (VG_(thread_get_stack_max)() returns >> client_stack_highest_word): >> >> /* We don't really know where the client stack is, because its >> allocated by the client. > I am not sure this is entirely true, especially for amd64-linux. > We do have the top of the stack as one of the parameters of clone(). > No? That only tells us where one end of the stack is though - we have to guess where the other end is. Our stack handling is all bollocks anyway - there are two different systems trying to track the stacks and neither of them does a good job at all. It all needs a rewrite basically. Tom -- Tom Hughes (to...@co...) http://www.compton.nu/ |