Skip to content

Commit

Permalink
Missing root of key in slurpy named handling.
Browse files Browse the repository at this point in the history
If the boxing of the object allocates, then key could become out of
date. Doesn't fix the issue tripping up bootstrap, sadly.
  • Loading branch information
jnthn committed Oct 6, 2013
1 parent 13c75ec commit 039253f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/core/args.c
Expand Up @@ -476,15 +476,21 @@ MVMObject * MVM_args_slurpy_named(MVMThreadContext *tc, MVMArgProcContext *ctx)
break;
}
case MVM_CALLSITE_ARG_INT: {
MVM_gc_root_temp_push(tc, (MVMCollectable **)&key);
box_slurpy(tc, ctx, pos, type, result, box, arg_info, reg, int_box_type, "int", set_int, i64, "", ass_funcs, bind_key_boxed, (MVMObject *)key, box);
MVM_gc_root_temp_pop(tc);
break;
}
case MVM_CALLSITE_ARG_NUM: {
MVM_gc_root_temp_push(tc, (MVMCollectable **)&key);
box_slurpy(tc, ctx, pos, type, result, box, arg_info, reg, num_box_type, "num", set_num, n64, "", ass_funcs, bind_key_boxed, (MVMObject *)key, box);
MVM_gc_root_temp_pop(tc);
break;
}
case MVM_CALLSITE_ARG_STR: {
MVM_gc_root_temp_push(tc, (MVMCollectable **)&key);
box_slurpy(tc, ctx, pos, type, result, box, arg_info, reg, str_box_type, "str", set_str, s, "", ass_funcs, bind_key_boxed, (MVMObject *)key, box);
MVM_gc_root_temp_pop(tc);
break;
}
default:
Expand Down

0 comments on commit 039253f

Please sign in to comment.