summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-25 05:54:39 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-25 05:54:39 +0000
commite59be153682d6240b2dd571c2272fb31f905d84c (patch)
tree6d9ea0e6af4d106166595368dfaa5fc348ce6f55 /thread.c
parent9869b65573d5bbaf5af4f20a577b41f95d73b846 (diff)
merge revision(s) 62673: [Backport #14577]
thread.c: deadlock in backtrace * thread.c (unblock_function_set): check interrupts just once during raising exceptions, as they are deferred since r16651. [ruby-core:85939] [Bug #14577] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@62917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/thread.c b/thread.c
index 0597d2ed8f..d74c731a82 100644
--- a/thread.c
+++ b/thread.c
@@ -385,7 +385,7 @@ set_unblock_function(rb_thread_t *th, rb_unblock_function_t *func, void *arg,
}
native_mutex_lock(&th->interrupt_lock);
- } while (RUBY_VM_INTERRUPTED_ANY(th) &&
+ } while (!th->raised_flag && RUBY_VM_INTERRUPTED_ANY(th) &&
(native_mutex_unlock(&th->interrupt_lock), TRUE));
if (old) *old = th->unblock;