tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: stack overflow in getaddrinfo(3) with a small-sized stack in pthreads



On Mon, 29 Nov 2021 00:05:18 +0100
Anthony Mallet <anthony.mallet%laas.fr@localhost> wrote:

> > Why should there be any particular minimum?  It seems to me it
> > depends on what the thread is doing (though one page, whatever that
> > is on the hardware and release in question, is probably a pretty
> > hard minimum).  
> 
> That's why I said my question is stupid :) If the thread returns
> immediately, the minimum is 0 (or PTHREAD_STACK_MIN to account for
> libpthread).

If I remember correctly, the stacks are large by default but only use
VM space, with pages only really allocated as usage grows.  You could
try tests without altering the size and see if it still performs as
expected...

-- 
Matt


Home | Main Index | Thread Index | Old Index