--- libcoro/coro.c 2010/12/03 19:21:59 1.53 +++ libcoro/coro.c 2011/05/30 02:21:54 1.55 @@ -212,8 +212,8 @@ } /* set the new stack */ - nstk.ss_sp = STACK_ADJUST_PTR (sptr,ssize); /* yes, some platforms (IRIX) get this wrong. */ - nstk.ss_size = STACK_ADJUST_SIZE (sptr,ssize); + nstk.ss_sp = STACK_ADJUST_PTR (sptr, ssize); /* yes, some platforms (IRIX) get this wrong. */ + nstk.ss_size = STACK_ADJUST_SIZE (sptr, ssize); nstk.ss_flags = 0; if (sigaltstack (&nstk, &ostk) < 0) @@ -307,6 +307,7 @@ #endif ctx->sp -= NUM_SAVED; + memset (ctx->sp, 0, sizeof (*ctx->sp) * NUM_SAVED); # elif CORO_UCONTEXT @@ -405,7 +406,8 @@ pthread_attr_init (&attr); #if __UCLIBC__ - pthread_attr_setstacksize (&attr, (size_t)ssize); + /* exists, but is borked */ + /*pthread_attr_setstacksize (&attr, (size_t)ssize);*/ #else pthread_attr_setstack (&attr, sptr, (size_t)ssize); #endif