From c3216088562e8a0f88c839d49d208322fee65981 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sun, 15 Apr 2012 08:23:10 -0600 Subject: [PATCH] fix a problem with continuation allocation i.e., fix commit 2ad41bb6697f7 Merge to 5.3 --- src/racket/src/fun.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/racket/src/fun.c b/src/racket/src/fun.c index 390bf57276..bbc1d6e6b1 100644 --- a/src/racket/src/fun.c +++ b/src/racket/src/fun.c @@ -5264,9 +5264,15 @@ internal_call_cc (int argc, Scheme_Object *argv[]) /* Only continuation marks can be different. Mostly just re-use sub_cont. */ intptr_t offset; Scheme_Cont_Mark *msaved; + Scheme_Cont_Jmp *buf_ptr; cont = MALLOC_ONE_TAGGED(Scheme_Cont); cont->so.type = scheme_cont_type; + + buf_ptr = MALLOC_ONE_RT(Scheme_Cont_Jmp); + SET_REQUIRED_TAG(buf_ptr->type = scheme_rt_cont_jmp); + cont->buf_ptr = buf_ptr; + cont->buf_ptr->buf.cont = sub_cont; cont->escape_cont = sub_cont->escape_cont;