diff --git a/pthread_stop_world.c b/pthread_stop_world.c index fbccc29ab..64013e12a 100644 --- a/pthread_stop_world.c +++ b/pthread_stop_world.c @@ -862,9 +862,12 @@ GC_INNER void GC_push_all_stacks(void) if (0 == lo) ABORT("GC_push_all_stacks: sp not set!"); if (p->altstack != NULL && (word)p->altstack <= (word)lo && (word)lo <= (word)p->altstack + p->altstack_size) { - hi = p->altstack + p->altstack_size; +# ifdef STACK_GROWS_UP + hi = p->altstack; +# else + hi = p->altstack + p->altstack_size; +# endif /* FIXME: Need to scan the normal stack too, but how ? */ - /* FIXME: Assume stack grows down */ } GC_push_all_stack_sections(lo, hi, traced_stack_sect); # ifdef STACK_GROWS_UP