Skip to content

Commit 147db98

Browse files
yuyichaotkelman
authored andcommittedJan 9, 2016
Root the function object in jlcall
(cherry picked from commit c1005bf) ref #14301
1 parent f12b49c commit 147db98

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

‎src/codegen.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -2656,6 +2656,7 @@ static Value *emit_call(jl_value_t **args, size_t arglen, jl_codectx_t *ctx, jl_
26562656
}
26572657
else {
26582658
theF = literal_pointer_val((jl_value_t*)f);
2659+
jl_add_linfo_root(ctx->linfo, (jl_value_t*)f);
26592660
result = emit_call_function_object(f, theF, theFptr, true, args-1, nargs+1, ctx);
26602661
}
26612662
}
@@ -2683,6 +2684,7 @@ static Value *emit_call(jl_value_t **args, size_t arglen, jl_codectx_t *ctx, jl_
26832684
}
26842685
else {
26852686
theF = literal_pointer_val((jl_value_t*)f);
2687+
jl_add_linfo_root(ctx->linfo, (jl_value_t*)f);
26862688
}
26872689
result = emit_call_function_object(f, theF, theFptr, specialized, args, nargs, ctx);
26882690
}

0 commit comments

Comments
 (0)
Please sign in to comment.