|
From: Tom H. <to...@co...> - 2005-08-01 23:15:36
|
In message <200...@ac...>
Julian Seward <js...@ac...> wrote:
>
> > Only the main stack is ever automatically extended. I believe that
> > is true for both linuxthreads and NPTL threads.
> >
> > You should be looking at the SF_STACK flag I think.
>
> Alas .. only the main stack is marked SF_STACK, afaics. In order
> that V could know that the thread stacks are really stacks, it
> would have to be able to differentiate the mmap that creates
> them from arbitrary other anonymous mmaps that happen, and I don't
> think those stack-creating mmaps have any special flags that would
> distinguish them. So I don't think this _could_ work. It does
> however beg the question of what SF_STACK is really for.
Hmm. You're right... I could have sworn they all had SF_STACK set. In
fact in 2.2.0 they did, but it got lost with the threading changes.
The problem is that it is libpthread that allocates the stack now. We
could set SF_STACK on the segment if do_clone manages to find it.
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|