ruby-changes:56824
From: nagachika <ko1@a...>
Date: Mon, 5 Aug 2019 22:53:27 +0900 (JST)
Subject: [ruby-changes:56824] nagachika: 52eb4e661e (ruby_2_6): merge revision(s) c1d78a7f0ece2004822193a0c1f1fd3dc38c2fdf: [Backport #15360]
https://git.ruby-lang.org/ruby.git/commit/?id=52eb4e661e From 52eb4e661ea396382e73cd6a6c1dcf4c4b3ec824 Mon Sep 17 00:00:00 2001 From: nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> Date: Mon, 5 Aug 2019 13:53:03 +0000 Subject: merge revision(s) c1d78a7f0ece2004822193a0c1f1fd3dc38c2fdf: [Backport #15360] do_mutex_lock: release mutex before checking for interrupts (fixes issue 15360) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e diff --git a/thread_sync.c b/thread_sync.c index 4c253f0..077276b 100644 --- a/thread_sync.c +++ b/thread_sync.c @@ -282,14 +282,18 @@ do_mutex_lock(VALUE self, int interruptible_p) https://github.com/ruby/ruby/blob/trunk/thread_sync.c#L282 th->status = prev_status; } th->vm->sleeper--; - if (mutex->th == th) mutex_locked(th, self); if (interruptible_p) { + /* release mutex before checking for interrupts...as interrupt checking + * code might call rb_raise() */ + if (mutex->th == th) mutex->th = 0; RUBY_VM_CHECK_INTS_BLOCKING(th->ec); /* may release mutex */ if (!mutex->th) { mutex->th = th; mutex_locked(th, self); } + } else { + if (mutex->th == th) mutex_locked(th, self); } } } diff --git a/version.h b/version.h index 2f5ba41..4015567 100644 --- a/version.h +++ b/version.h @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/version.h#L1 #define RUBY_VERSION "2.6.3" #define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR -#define RUBY_PATCHLEVEL 78 +#define RUBY_PATCHLEVEL 79 #define RUBY_RELEASE_YEAR 2019 #define RUBY_RELEASE_MONTH 8 -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/