Skip to content

Commit 12b9bec

Browse files
authored
Fix segfault while profiling task switching (#42973)
1 parent d2b5a13 commit 12b9bec

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
@@ -452,6 +452,8 @@ void usr2_handler(int sig, siginfo_t *info, void *ctx)
452452
if (ct == NULL)
453453
return;
454454
jl_ptls_t ptls = ct->ptls;
455+
if (ptls == NULL)
456+
return;
455457
int errno_save = errno;
456458
sig_atomic_t request = jl_atomic_exchange(&ptls->signal_request, 0);
457459
#if !defined(JL_DISABLE_LIBUNWIND)

0 commit comments

Comments
 (0)