Current-Users archive

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

Re: Stack alignment with pthreads



On Fri, Aug 29, 2008 at 12:17:23PM +0200, Martin Husemann wrote:
> The thread alignement should happen in makecontext(), look for an example at
> src/lib/libc/arch/sparc64/gen/makecontext.c.

Never mind, it's a bug in lib/libpthread/pthread.c: look for 
pthread__create_tramp and change the alloca call to:

        (void)alloca((((unsigned)self->pt_lid & 7) << 8) - sizeof(retval));

Untested, but that should work.

Martin


Home | Main Index | Thread Index | Old Index