void-packages/srcpkgs/chromium/patches/musl-v8-fix-deadlock.patch
Duncaen 31c3470dc0 chromium: import patches from alpine
The deadlock patch is most likely not limited to musl but its a race
condition and it seems like with the current way how it works its only
triggered with musl and with namespaces enabled.

The other patch just makes pthreads in v8 use CLOCK_MONOTONIC like it
does for glibc.
2019-02-21 18:05:54 +01:00

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