Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
diff --git src/disp/program.c src/disp/program.c
index a411ed168..2f2584c5a 100644
--- src/disp/program.c
+++ src/disp/program.c
@@ -1967,7 +1967,7 @@ static void emit_args_ops(MVMThreadContext *tc, MVMCallStackDispatchRecord *reco
Action action;
MVMuint32 index;
} ArgProduction;
- ArgProduction arg_prod[num_to_produce];
+ ArgProduction *arg_prod = MVM_malloc(num_to_produce * sizeof(ArgProduction));
for (i = 0; i < num_to_produce; i++) {
/* Work out the source of this arg in the capture. For the rationale
* for this algorithm, see MVM_disp_program_record_track_arg. */
@@ -2038,6 +2038,8 @@ static void emit_args_ops(MVMThreadContext *tc, MVMCallStackDispatchRecord *reco
MVM_VECTOR_PUSH(cs->ops, op);
}
+ MVM_free(arg_prod);
+
/* Finally, the instruction to copy what we can from the args tail. */
MVMDispProgramOp op;
op.code = MVMDispOpcodeCopyArgsTail;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment