From 039253f27e24324460407a9e4d9272c8cf36e6db Mon Sep 17 00:00:00 2001 From: jnthn Date: Sun, 6 Oct 2013 22:43:47 +0200 Subject: [PATCH] Missing root of key in slurpy named handling. If the boxing of the object allocates, then key could become out of date. Doesn't fix the issue tripping up bootstrap, sadly. --- src/core/args.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/core/args.c b/src/core/args.c index 58e0ce36ab..ee08ba99fa 100644 --- a/src/core/args.c +++ b/src/core/args.c @@ -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: