Current-Users archive

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

Re: libpthread problem when using custom stack



On Tue, Sep 22, 2020 at 12:34:12AM +0200, Thomas Klausner wrote:
> According to the NetBSD man page for pthread_attr_setguardsize(), the
> effect of this function is ignored when pthread_attr_setstack() is
> used. This does not seem to be the case here.

That's not exactly what happens. libpthread computes the initial stack
pointer based on the stack base, stack size and guard size. It doesn't
allocate the stack itself nor does it change any mapping in it. I'm not
sure if it is supposed to assume guardsize == 0 for the pointer
calculation though.

Joerg


Home | Main Index | Thread Index | Old Index