• Clemens Hammacher's avatar
    [wasm][gc] Fix deadlock during shutdown · 777d5084
    Clemens Hammacher authored
    The destructor of the {WasmGCForegroundTask} can be called immediately
    when scheduling that task (if the platform determines that the task can
    never execute anyway). In that case, we deregister the task from the
    wasm engine so we do not access it later (which would be UAF). This
    deregistration leads to recursively taking a mutex now.
    The only later access to the task happens to cancel the task. For this
    purpose, we can also use the {CancelableTaskManager} of the isolate,
    and avoid all code in the destructor. This should fix the reentrant
    mutex, which leads to a DCHECK failure in debug builds and deadlock
    in release builds.
    
    R=mstarzinger@chromium.org
    
    Bug: chromium:984970, v8:8217
    Change-Id: I14f05a21ea961ecc391dc59af3b5eebf31e0f873
    Cq-Include-Trybots: luci.v8.try:v8_linux_blink_rel
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1706480Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
    Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#62804}
    777d5084
Name
Last commit
Last update
..
api Loading commit data...
asmjs Loading commit data...
ast Loading commit data...
base Loading commit data...
builtins Loading commit data...
codegen Loading commit data...
common Loading commit data...
compiler Loading commit data...
compiler-dispatcher Loading commit data...
d8 Loading commit data...
date Loading commit data...
debug Loading commit data...
deoptimizer Loading commit data...
diagnostics Loading commit data...
execution Loading commit data...
extensions Loading commit data...
flags Loading commit data...
handles Loading commit data...
heap Loading commit data...
ic Loading commit data...
init Loading commit data...
inspector Loading commit data...
interpreter Loading commit data...
json Loading commit data...
libplatform Loading commit data...
libsampler Loading commit data...
logging Loading commit data...
numbers Loading commit data...
objects Loading commit data...
parsing Loading commit data...
profiler Loading commit data...
protobuf Loading commit data...
regexp Loading commit data...
roots Loading commit data...
runtime Loading commit data...
sanitizer Loading commit data...
snapshot Loading commit data...
strings Loading commit data...
tasks Loading commit data...
third_party Loading commit data...
torque Loading commit data...
tracing Loading commit data...
trap-handler Loading commit data...
utils Loading commit data...
wasm Loading commit data...
zone Loading commit data...
DEPS Loading commit data...
OWNERS Loading commit data...