• Clemens Backes's avatar
    [platform] Fix data race on DefaultJobState::priority_ · 35cc3da9
    Clemens Backes authored
    The {priority_} field is being updated in {DefaultJobState::Join}, under
    {mutex_}. In other places though, it is read unprotected (without
    holding the mutex), leading to data races.
    This CL fixes that by reading the field while holding the mutex and
    using the read priority after releasing the mutex.
    
    Note that the {priority_} field is documented to be protected by
    {mutex_}, so the unprotected read was a bug.
    
    R=ulan@chromium.org
    CC=etiennep@chromium.org
    
    Bug: v8:10822
    Change-Id: I80079f3cb6689e26116ffeb33755c6938c4a2cf1
    Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel_ng
    Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_isolates_rel_ng
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2377685Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
    Commit-Queue: Clemens Backes <clemensb@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#69571}
    35cc3da9
Name
Last commit
Last update
..
tracing Loading commit data...
DEPS Loading commit data...
OWNERS Loading commit data...
default-foreground-task-runner.cc Loading commit data...
default-foreground-task-runner.h Loading commit data...
default-job.cc Loading commit data...
default-job.h Loading commit data...
default-platform.cc Loading commit data...
default-platform.h Loading commit data...
default-worker-threads-task-runner.cc Loading commit data...
default-worker-threads-task-runner.h Loading commit data...
delayed-task-queue.cc Loading commit data...
delayed-task-queue.h Loading commit data...
task-queue.cc Loading commit data...
task-queue.h Loading commit data...
worker-thread.cc Loading commit data...
worker-thread.h Loading commit data...