Skip to content

Commit b5b097f

Browse files
gbaraldiRAI CI (GitHub Action Automation)
authored andcommitted
Fix dyld lock not getting unlocked on invalid threads. (JuliaLang#49446)
1 parent 448b4fc commit b5b097f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/signals-mach.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -625,8 +625,7 @@ void *mach_profile_listener(void *arg)
625625
if (_dyld_atfork_prepare != NULL && _dyld_atfork_parent != NULL)
626626
_dyld_atfork_prepare(); // briefly acquire the dlsym lock
627627
host_thread_state_t state;
628-
if (!jl_thread_suspend_and_get_state2(i, &state))
629-
continue;
628+
int valid_thread = jl_thread_suspend_and_get_state2(i, &state);
630629
unw_context_t *uc = (unw_context_t*)&state;
631630
if (_dyld_atfork_prepare != NULL && _dyld_atfork_parent != NULL)
632631
_dyld_atfork_parent(); // quickly release the dlsym lock

0 commit comments

Comments
 (0)