deps: V8: cherry-pick 5f025d1ca2ca · nodejs/node@b16f6da · GitHub
Skip to content

Commit b16f6da

Browse files
committed
deps: V8: cherry-pick 5f025d1ca2ca
Original commit message: [wasm] Fix deadlock in async wrapper compilation If compilation is cancelled while wrapper compilation is running, the tasks spawned for the {AsyncCompileJSToWasmWrapperJob} will return immediately, but {GetMaxConcurrency} will still return a positive value. Hence {Join()} will spawn another task, resulting in a livelock. We could fix this by checking for cancellation in {GetMaxConcurrency}, but that requires taking the compilation state lock. So this CL fixes the issue by dropping the number of outstanding compilation units by to (basically) zero. We can't unconditionally drop to zero because another thread might concurrently execute a wrapper compilation and still call {CompleteUnit} afterwards. Hence only drop outstanding units by the amount of not-yet-started units. R=jkummerow@chromium.org Bug: v8:13858 Change-Id: I5398ef370da2e7f212ca772fd1f87f659929dd6d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4437531 Commit-Queue: Clemens Backes <clemensb@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/main@{#87143} Refs: v8/v8@5f025d1 PR-URL: #47610 Refs: #47297 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 99f8fca commit b16f6da

2 files changed

Lines changed: 49 additions & 23 deletions

File tree

common.gypi

Lines changed: 1 addition & 1 deletion

deps/v8/src/wasm/module-compiler.cc

Lines changed: 48 additions & 22 deletions

0 commit comments

Comments
 (0)