Skip to content

Commit 8fb054e

Browse files
authored
fix accidental save (and restore) of sigmask when interpreting try (JuliaLang#59878) (#258)
Noticed during bug hunting of ericphanson/LicenseCheck.jl#11 (comment) and may cause performance degradation for interpreter-executed try blocks or scope entry.
1 parent 1e44255 commit 8fb054e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/interpreter.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ static jl_value_t *eval_body(jl_array_t *stmts, interpreter_state *s, size_t ip,
540540
}
541541
// store current top of exception stack for restore in pop_exception.
542542
s->locals[jl_source_nslots(s->src) + ip] = jl_box_ulong(jl_excstack_state());
543-
if (!jl_setjmp(__eh.eh_ctx, 1)) {
543+
if (!jl_setjmp(__eh.eh_ctx, 0)) {
544544
return eval_body(stmts, s, next_ip, toplevel);
545545
}
546546
else if (s->continue_at) { // means we reached a :leave expression

0 commit comments

Comments
 (0)