Skip to content

Commit 118344d

Browse files
tkfKristofferC
authored andcommitted
Fix segfault while profiling task switching (#42973)
(cherry picked from commit 12b9bec)
1 parent 52f36b8 commit 118344d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/signals-unix.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,8 @@ void usr2_handler(int sig, siginfo_t *info, void *ctx)
448448
if (ct == NULL)
449449
return;
450450
jl_ptls_t ptls = ct->ptls;
451+
if (ptls == NULL)
452+
return;
451453
int errno_save = errno;
452454
sig_atomic_t request = jl_atomic_exchange(&ptls->signal_request, 0);
453455
#if !defined(JL_DISABLE_LIBUNWIND)

0 commit comments

Comments
 (0)