Skip to content

Commit e588298

Browse files
vtjnashDilumAluthge
authored andcommitted
fix accidental save (and restore) of sigmask when interpreting try (#59878)
Noticed during bug hunting of ericphanson/LicenseCheck.jl#11 (comment) and may cause performance degradation for interpreter-executed try blocks or scope entry. Co-authored-by: Dilum Aluthge <[email protected]> (cherry picked from commit c1353ac)
1 parent 66062ec commit e588298

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/interpreter.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -545,15 +545,15 @@ static jl_value_t *eval_body(jl_array_t *stmts, interpreter_state *s, size_t ip,
545545
// replaced later
546546
JL_GC_PUSH1(&scope);
547547
ct->scope = scope;
548-
if (!jl_setjmp(__eh.eh_ctx, 1)) {
548+
if (!jl_setjmp(__eh.eh_ctx, 0)) {
549549
ct->eh = &__eh;
550550
eval_body(stmts, s, next_ip, toplevel);
551551
jl_unreachable();
552552
}
553553
JL_GC_POP();
554554
}
555555
else {
556-
if (!jl_setjmp(__eh.eh_ctx, 1)) {
556+
if (!jl_setjmp(__eh.eh_ctx, 0)) {
557557
ct->eh = &__eh;
558558
eval_body(stmts, s, next_ip, toplevel);
559559
jl_unreachable();

0 commit comments

Comments
 (0)