• jameslahm's avatar
    [d8] Don't call WaitForRunningWorkers in quit() · d8c9b089
    jameslahm authored
    There are problems calling WaitForRunningWorkers when we
    call quit().
    First, suppose the main thread first calls quit(),
    and the worker thread calls quit() after the main
    thread calls quit(), then sched_yield to wait for
    quit_once_ updated to ONCE_STATE_DONE. However
    the main thread is WaitForRunningWorkers to wait
    for the worker thread to join, thus causing deadlock.
    
    Second, suppose the worker thread calls quit() and empty
    the running_workers_ by WaitForRunningWorkers, then
    the main thread calls `onExit(isolate, true)` to dispose
    the platform and other global data, which will crash other
    running workers.
    
    Bug: v8:12219
    Change-Id: I333e5aad431daefb1c163f69e66d8e9d5e9bf754
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3518908Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
    Commit-Queue: Marja Hölttä <marja@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#79525}
    d8c9b089
Name
Last commit
Last update
..
benchmarks Loading commit data...
bigint Loading commit data...
cctest Loading commit data...
common Loading commit data...
debugger Loading commit data...
debugging Loading commit data...
fuzzer Loading commit data...
fuzzilli Loading commit data...
inspector Loading commit data...
intl Loading commit data...
js-perf-test Loading commit data...
memory Loading commit data...
message Loading commit data...
mjsunit Loading commit data...
mkgrokdump Loading commit data...
mozilla Loading commit data...
test262 Loading commit data...
torque Loading commit data...
unittests Loading commit data...
wasm-api-tests Loading commit data...
wasm-js Loading commit data...
wasm-spec-tests Loading commit data...
webkit Loading commit data...
BUILD.gn Loading commit data...
OWNERS Loading commit data...