This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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