summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-20 02:09:21 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-20 02:09:21 +0000
commite02e7379dcece9c94e9acafab4ff082a39bda594 (patch)
tree7eb0ed55a519f0be1a6dc519f43898a0b2b1d816 /thread.c
parentc28d3d02c20a88d3d2fff10aadaf062ad8d56cc8 (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_5@62854 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 fad0ce6efc..d7e0d91d7f 100644
--- a/thread.c
+++ b/thread.c
@@ -392,7 +392,7 @@ unblock_function_set(rb_thread_t *th, rb_unblock_function_t *func, void *arg, in
}
native_mutex_lock(&th->interrupt_lock);
- } while (RUBY_VM_INTERRUPTED_ANY(th->ec) &&
+ } while (!th->ec->raised_flag && RUBY_VM_INTERRUPTED_ANY(th->ec) &&
(native_mutex_unlock(&th->interrupt_lock), TRUE));
VM_ASSERT(th->unblock.func == NULL);