Skip to content

Commit

Permalink
Fix missing JL_GC_POP() in emit_cfunction
Browse files Browse the repository at this point in the history
  • Loading branch information
gbaraldi committed Mar 21, 2024
1 parent 09400e4 commit 5d10370
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7379,6 +7379,7 @@ static jl_cgval_t emit_cfunction(jl_codectx_t &ctx, jl_value_t *output_type, con
if (ctx.emission_context.TargetTriple.isAArch64() || ctx.emission_context.TargetTriple.isARM() || ctx.emission_context.TargetTriple.isPPC64()) {
if (nest) {
emit_error(ctx, "cfunction: closures are not supported on this platform");
JL_GC_POP();
return jl_cgval_t();
}
}
Expand Down
1 change: 1 addition & 0 deletions src/rtutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ JL_DLLEXPORT void jl_eh_restore_state(jl_task_t *ct, jl_handler_t *eh)

JL_DLLEXPORT void jl_eh_restore_state_noexcept(jl_task_t *ct, jl_handler_t *eh)
{
assert(ct->gcstack == eh->gcstack && "Incorrect GC usage under try catch");
ct->eh = eh->prev;
ct->ptls->defer_signal = eh->defer_signal; // optional, but certain try-finally (in stream.jl) may be slightly harder to write without this
}
Expand Down

0 comments on commit 5d10370

Please sign in to comment.