void-packages/srcpkgs/chromium/patches/musl-v8-fix-deadlock.patch

22 lines
944 B
Diff

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();
}