diff --git a/src/julia-syntax.scm b/src/julia-syntax.scm index 617f93859ff3ae..0521cf9357eb27 100644 --- a/src/julia-syntax.scm +++ b/src/julia-syntax.scm @@ -3709,14 +3709,14 @@ f(x) = yt(x) (m (or m (let ((l (make-label))) (put! label-map (cadr e) l) l)))) - (emit `(null)) ;; save space for `leave` and `pop_exc` that might be needed + (emit `(null)) ;; save space for `leave` that might be needed (emit `(goto ,m)) (set! handler-goto-fixups (cons (list code handler-level catch-token-stack (cadr e)) handler-goto-fixups)) #f)) ;; exception handlers are lowered using - ;; (= tok (enter L)) - push handler with catch block at label L + ;; (= tok (enter L)) - push handler with catch block at label L, yielding token ;; (leave n) - pop N exception handlers ;; (pop_exc tok) - pop exception stack back to state of associated enter ((trycatch tryfinally) diff --git a/src/task.c b/src/task.c index 18c171b547ae65..f92c63a5fa3e45 100644 --- a/src/task.c +++ b/src/task.c @@ -267,8 +267,7 @@ static void NOINLINE JL_NORETURN JL_USED_FUNC start_task(void) res = jl_apply(&t->start, 1); } JL_CATCH { - // FIXME: Persist exception stack into `exception`? - // Refactor with jl_push_exc_stack above? + // TODO: Persist exception stack as above? res = jl_current_exception(); t->exception = res; jl_gc_wb(t, res); diff --git a/src/threading.c b/src/threading.c index d8aa471f104c72..36cf96f91e70e7 100644 --- a/src/threading.c +++ b/src/threading.c @@ -283,7 +283,7 @@ static void ti_initthread(int16_t tid) } memset(bt_data, 0, sizeof(uintptr_t) * (JL_MAX_BT_SIZE + 1)); ptls->bt_data = (uintptr_t*)bt_data; - ptls->exc_stack = 0; + ptls->exc_stack = NULL; jl_reserve_exc_stack(&ptls->exc_stack, JL_MAX_BT_SIZE + 2); ptls->sig_exception = NULL; #ifdef _OS_WINDOWS_