Index: src/execution.cc |
diff --git a/src/execution.cc b/src/execution.cc |
index 52cff2f7900eabe3b554724f3525f449f850a6ad..ce5022680cb16afc082ce98c49399acb147aa780 100644 |
--- a/src/execution.cc |
+++ b/src/execution.cc |
@@ -413,6 +413,15 @@ void StackGuard::RequestInterrupt(InterruptFlag flag) { |
// Not intercepted. Set as active interrupt flag. |
thread_local_.interrupt_flags_ |= flag; |
set_interrupt_limits(access); |
+ |
+ // If this isolate is waiting in a futex, notify it to wake up. |
+ if (isolate_->futex_wait_list_node()->waiting()) { |
+ // Release the execution lock to prevent potential deadlock due to lock |
+ // order inversion with the futex lock. |
+ ExecutionAccess::Unlock(isolate_); |
+ isolate_->futex_wait_list_node()->NotifyWake(); |
+ ExecutionAccess::Lock(isolate_); |
+ } |
} |