aboutsummaryrefslogtreecommitdiffstats
path: root/community/chromium/musl-v8-fix-deadlock.patch
blob: dff0d88d2c6def9620504c5147d4e83a9e377d6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Release the mutex before mess with the stack guard

Upstream report: https://bugs.chromium.org/p/v8/issues/detail?id=8881

diff --git a/v8/src/compiler-dispatcher/optimizing-compile-dispatcher.cc b/v8/src/compiler-dispatcher/optimizing-compile-dispatcher.cc
index 09226e1..29a1871 100644
--- ./v8/src/compiler-dispatcher/optimizing-compile-dispatcher.cc
+++ ./v8/src/compiler-dispatcher/optimizing-compile-dispatcher.cc
@@ -132,8 +132,10 @@ void OptimizingCompileDispatcher::CompileNext(OptimizedCompilationJob* job) {
   // The function may have already been optimized by OSR.  Simply continue.
   // Use a mutex to make sure that functions marked for install
   // are always also queued.
-  base::MutexGuard access_output_queue_(&output_queue_mutex_);
-  output_queue_.push(job);
+  {
+    base::MutexGuard access_output_queue_(&output_queue_mutex_);
+    output_queue_.push(job);
+  }
   isolate_->stack_guard()->RequestInstallCode();
 }