diff --git a/src/signals-unix.c b/src/signals-unix.c index 84d532575fe62..617b6114da7ee 100644 --- a/src/signals-unix.c +++ b/src/signals-unix.c @@ -448,6 +448,8 @@ void usr2_handler(int sig, siginfo_t *info, void *ctx) if (ct == NULL) return; jl_ptls_t ptls = ct->ptls; + if (ptls == NULL) + return; int errno_save = errno; sig_atomic_t request = jl_atomic_exchange(&ptls->signal_request, 0); #if !defined(JL_DISABLE_LIBUNWIND)