• Clemens Backes's avatar
    [wasm][debug] Do not hold lock while recompiling functions · 813c5954
    Clemens Backes authored
    This is to avoid a lock inversion problem. In many situation, the
    {NativeModule} lock is held while getting the {DebugInfo} lock.
    Hence we should never do is the other way around, otherwise we risk a
    deadlock.
    When setting a breakpoint, we hold the {DebugInfo} lock when triggering
    recompilation, but recompilation accesses the {NativeModule} for
    creating the {CompilationEnv}, and therefore takes the {NativeModule}
    lock.
    This CL fixes this lock inversion by giving up the {DebugInfo} lock
    before recompiling functions.
    
    R=thibaudm@chromium.org
    
    Bug: v8:10351
    Change-Id: Ic818c6589b2b532006aee4c16bac92b2fe79fa65
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2139574
    Commit-Queue: Clemens Backes <clemensb@chromium.org>
    Reviewed-by: 's avatarThibaud Michaud <thibaudm@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#67042}
    813c5954
Name
Last commit
Last update
..
OWNERS Loading commit data...
condition-variable.cc Loading commit data...
condition-variable.h Loading commit data...
elapsed-timer.h Loading commit data...
mutex.cc Loading commit data...
mutex.h Loading commit data...
platform-aix.cc Loading commit data...
platform-cygwin.cc Loading commit data...
platform-freebsd.cc Loading commit data...
platform-fuchsia.cc Loading commit data...
platform-linux.cc Loading commit data...
platform-macos.cc Loading commit data...
platform-openbsd.cc Loading commit data...
platform-posix-time.cc Loading commit data...
platform-posix-time.h Loading commit data...
platform-posix.cc Loading commit data...
platform-posix.h Loading commit data...
platform-qnx.cc Loading commit data...
platform-solaris.cc Loading commit data...
platform-win32.cc Loading commit data...
platform.h Loading commit data...
semaphore.cc Loading commit data...
semaphore.h Loading commit data...
time.cc Loading commit data...
time.h Loading commit data...