Skip to content

Commit

Permalink
Fix dyld lock not getting unlocked on invalid threads. (JuliaLang#49446)
Browse files Browse the repository at this point in the history
  • Loading branch information
gbaraldi authored and kpamnany committed Oct 19, 2023
1 parent d854e6e commit 952f026
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/signals-mach.c
Original file line number Diff line number Diff line change
Expand Up @@ -625,8 +625,7 @@ void *mach_profile_listener(void *arg)
if (_dyld_atfork_prepare != NULL && _dyld_atfork_parent != NULL)
_dyld_atfork_prepare(); // briefly acquire the dlsym lock
host_thread_state_t state;
if (!jl_thread_suspend_and_get_state2(i, &state))
continue;
int valid_thread = jl_thread_suspend_and_get_state2(i, &state);
unw_context_t *uc = (unw_context_t*)&state;
if (_dyld_atfork_prepare != NULL && _dyld_atfork_parent != NULL)
_dyld_atfork_parent(); // quickly release the dlsym lock
Expand Down

0 comments on commit 952f026

Please sign in to comment.