Skip to content

Commit

Permalink
Merge pull request #10738 from JuliaLang/ob/missingroot
Browse files Browse the repository at this point in the history
Missing GC root
  • Loading branch information
JeffBezanson committed Apr 23, 2015
2 parents 5e99f74 + 944fdd4 commit 7e63e6a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2424,6 +2424,7 @@ static Value *emit_call(jl_value_t **args, size_t arglen, jl_codectx_t *ctx, jl_
bool definitely_not_function = false;

jl_function_t *f = (jl_function_t*)static_eval(a0, ctx, true);
JL_GC_PUSH1(&f);
if (f != NULL) {
// function is a compile-time constant
Value *result;
Expand All @@ -2438,7 +2439,10 @@ static Value *emit_call(jl_value_t **args, size_t arglen, jl_codectx_t *ctx, jl_
result = emit_known_call((jl_value_t*)jl_module_call_func(ctx->module),
args-1, nargs+1, ctx, &theFptr, &f, expr);
}
if (result != NULL) return result;
if (result != NULL) {
JL_GC_POP();
return result;
}
}

hdtype = expr_type(a0, ctx);
Expand Down Expand Up @@ -2541,6 +2545,7 @@ static Value *emit_call(jl_value_t **args, size_t arglen, jl_codectx_t *ctx, jl_
}

ctx->argDepth = last_depth;
JL_GC_POP();
return result;
}

Expand Down

0 comments on commit 7e63e6a

Please sign in to comment.