fix problem with continuations

A tail call to a continuation could trigger a GC at a bad time
while checking whether an escape variant of the contination
is valid.
This commit is contained in:
Matthew Flatt 2012-02-28 14:30:25 -07:00
parent 70ab6d482a
commit 829820e458

View File

@ -1482,6 +1482,10 @@ Scheme_Object *scheme_jump_to_continuation(Scheme_Object *obj, int num_rands, Sc
Scheme_Prompt *prompt, *barrier_prompt;
int common_depth;
/* Since scheme_escape_continuation_ok() may allocate... */
if (rands == p->tail_buffer)
make_tail_buffer_safe();
c = (Scheme_Cont *)obj;
if (can_ec
@ -1493,9 +1497,6 @@ Scheme_Object *scheme_jump_to_continuation(Scheme_Object *obj, int num_rands, Sc
GC_CAN_IGNORE Scheme_Object **vals;
int i;
if (rands == p->tail_buffer)
make_tail_buffer_safe();
vals = MALLOC_N(Scheme_Object *, num_rands);
for (i = num_rands; i--; ) {
vals[i] = rands[i];