ruby-changes:18717
From: nagachika <ko1@a...>
Date: Mon, 31 Jan 2011 21:40:25 +0900 (JST)
Subject: [ruby-changes:18717] Ruby:r30743 (trunk): * thread.c (thread_start_func_2): check deadlock condition before
nagachika 2011-01-31 21:40:19 +0900 (Mon, 31 Jan 2011) New Revision: 30743 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=30743 Log: * thread.c (thread_start_func_2): check deadlock condition before release thread stack. fix memory violation when deadlock detected. reported by Max Aller. [Bug #4009] [ruby-core:32982] Modified files: trunk/ChangeLog trunk/thread.c Index: ChangeLog =================================================================== --- ChangeLog (revision 30742) +++ ChangeLog (revision 30743) @@ -1,3 +1,9 @@ +Mon Jan 31 21:32:44 2011 CHIKANAGA Tomoyuki <nagachika00@g...> + + * thread.c (thread_start_func_2): check deadlock condition before + release thread stack. fix memory violation when deadlock detected. + reported by Max Aller. [Bug #4009] [ruby-core:32982] + Mon Jan 31 14:45:47 2011 Yuki Sonoda (Yugui) <yugui@y...> * lib/irb/locale.rb (IRB::Locale::#search_file): Index: thread.c =================================================================== --- thread.c (revision 30742) +++ thread.c (revision 30743) @@ -524,13 +524,14 @@ join_th = join_th->join_list_next; } + thread_unlock_all_locking_mutexes(th); + if (th != main_th) rb_check_deadlock(th->vm); + if (!th->root_fiber) { rb_thread_recycle_stack_release(th->stack); th->stack = 0; } } - thread_unlock_all_locking_mutexes(th); - if (th != main_th) rb_check_deadlock(th->vm); if (th->vm->main_thread == th) { ruby_cleanup(state); } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/