summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-05 14:57:11 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-05 14:57:11 +0000
commiteef4a3cd72a4010b56e8aec2f1fe7c4d14333b5a (patch)
tree07d4bdeb5014787d1082c7b61217eb74f9617836 /ext
parent72d18038d914e7c2e383f09bae5e5bd7b06721a8 (diff)
merge revision(s) 44583: [Backport #9302]
* ext/thread/thread.c (rb_szqueue_push): check GET_SZQUEUE_WAITERS instead of GET_QUEUE_WAITERS to prevent deadlock. Patch by Eric Wong. [Bug #9302] [ruby-core:59324] * test/thread/test_queue.rb: add test git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@44847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/thread/thread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/thread/thread.c b/ext/thread/thread.c
index b8be5d883f..208d1172df 100644
--- a/ext/thread/thread.c
+++ b/ext/thread/thread.c
@@ -459,7 +459,7 @@ static VALUE
rb_szqueue_push(VALUE self, VALUE obj)
{
struct waiting_delete args;
- args.waiting = GET_QUEUE_WAITERS(self);
+ args.waiting = GET_SZQUEUE_WAITERS(self);
args.th = rb_thread_current();
while (queue_length(self) >= GET_SZQUEUE_ULONGMAX(self)) {