From af2e5beb4ea71144b2ddebe5add4ae4d9af16b96 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Tue, 26 May 2009 22:15:24 +0000 Subject: [PATCH] fix stack-prep bug in call-in-nested-thread svn: r14992 --- src/mzscheme/src/thread.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mzscheme/src/thread.c b/src/mzscheme/src/thread.c index 3bcc404c19..6d49d40027 100644 --- a/src/mzscheme/src/thread.c +++ b/src/mzscheme/src/thread.c @@ -3265,6 +3265,10 @@ Scheme_Object *scheme_call_as_nested_thread(int argc, Scheme_Object *argv[], voi p->cont_mark_pos = MZ_CONT_MARK_POS; #endif + /* zero out anything we need now, because nestee disables + GC cleaning for this thread: */ + prepare_this_thread_for_GC(p); + if (!p->runstack_owner) { Scheme_Thread **owner; owner = MALLOC_N(Scheme_Thread *, 1); @@ -3323,10 +3327,6 @@ Scheme_Object *scheme_call_as_nested_thread(int argc, Scheme_Object *argv[], voi np->cont_mark_pos = (MZ_MARK_POS_TYPE)1; /* others 0ed already by allocation */ - /* zero out anything we need now, because nestee disables - GC cleaning for this thread: */ - prepare_this_thread_for_GC(p); - check_ready_break(); np->nester = p;