merge revision(s) c1d78a7f0e: [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_5@67764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2019-08-26 15:39:06 +00:00
parent a9a3769530
commit 331512759b
2 changed files with 6 additions and 2 deletions

View file

@ -289,14 +289,18 @@ do_mutex_lock(VALUE self, int interruptible_p)
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);
}
}
}

View file

@ -1,6 +1,6 @@
#define RUBY_VERSION "2.5.6"
#define RUBY_RELEASE_DATE "2019-08-27"
#define RUBY_PATCHLEVEL 182
#define RUBY_PATCHLEVEL 183
#define RUBY_RELEASE_YEAR 2019
#define RUBY_RELEASE_MONTH 8