Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix infinite resend lost signals if a thread is restarted by SIGQUIT
PR #633 (bdwgc). When sending restart signal to all threads, there could be a situation when some user signal (e.g. SIGQUIT) has already restarted the thread: in this case we still need to count the thread in n_live_threads, so that to decrement the semaphore's value proper amount of times. * pthread_stop_world.c [!NACL] (in_resend_restart_signals): New static variable. * pthread_stop_world.c [!NACL] (GC_restart_all): If GC_retry_signals and p->last_stop_count matches GC_stop_count but not in_resend_restart_signals then proceed to n_live_threads++; add comment and FIXME. * pthread_stop_world.c [!NACL] (GC_start_world): Add assertion that in_resend_restart_signals is not sent (on entrance); make in_resend_restart_signals set while executing resend_lost_signals_retry(). Co-authored-by: Ivan Maidanski <[email protected]>
- Loading branch information