Skip to content

Commit

Permalink
Fix segfault while profiling task switching (JuliaLang#42973)
Browse files Browse the repository at this point in the history
(cherry picked from commit 12b9bec)
  • Loading branch information
tkf authored and daviehh committed Nov 16, 2021
1 parent 6f46905 commit 97b4b87
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/signals-unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 97b4b87

Please sign in to comment.