Skip to content

Commit

Permalink
Fix missing GC root.
Browse files Browse the repository at this point in the history
Probably introduced after #18413. Re-uses the unused 'thunk' root.
  • Loading branch information
maleadt committed Oct 13, 2016
1 parent c9ed6af commit 67aa5bf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/toplevel.c
Original file line number Diff line number Diff line change
Expand Up @@ -584,11 +584,11 @@ jl_value_t *jl_toplevel_eval_flex(jl_value_t *e, int fast, int expanded)
return jl_nothing;
}

jl_value_t *thunk = NULL;
jl_method_instance_t *li = NULL;
jl_value_t *result;
jl_code_info_t *thk = NULL;
int ewc = 0;
JL_GC_PUSH3(&thunk, &thk, &ex);
JL_GC_PUSH3(&li, &thk, &ex);

if (!expanded && ex->head != body_sym && ex->head != thunk_sym && ex->head != return_sym &&
ex->head != method_sym && ex->head != toplevel_sym) {
Expand Down Expand Up @@ -633,7 +633,7 @@ jl_value_t *jl_toplevel_eval_flex(jl_value_t *e, int fast, int expanded)
}

if (ewc) {
jl_method_instance_t *li = jl_new_thunk(thk);
li = jl_new_thunk(thk);
jl_type_infer(li, 0);
jl_value_t *dummy_f_arg = NULL;
result = jl_call_method_internal(li, &dummy_f_arg, 1);
Expand Down

0 comments on commit 67aa5bf

Please sign in to comment.