From 17e4aff277a350fa6afea31bc521c9a3f4f47353 Mon Sep 17 00:00:00 2001 From: normal Date: Mon, 20 Aug 2018 21:34:39 +0000 Subject: thread_pthread.c: reinitialize ubf_list at fork It's possible for the ubf_list_head to be populated with dead threads at fork or the ubf_list_lock to be held, so reinitialize both at startup. And while we're at it, use a static initializer at startup to save a library call and kill some ifdef. [ruby-core:88578] [Bug #15013] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- thread_win32.c | 1 + 1 file changed, 1 insertion(+) (limited to 'thread_win32.c') diff --git a/thread_win32.c b/thread_win32.c index 6e9f18f458..af9d3517fa 100644 --- a/thread_win32.c +++ b/thread_win32.c @@ -23,6 +23,7 @@ #define ubf_wakeup_all_threads() do {} while (0) #define ubf_threads_empty() (1) #define ubf_timer_disarm() do {} while (0) +#define ubf_list_atfork() do {} while (0) static volatile DWORD ruby_native_thread_key = TLS_OUT_OF_INDEXES; -- cgit v1.2.3