[inspector][test] Do not join a task more than once

In inspector-task.cc, the frontend and backend runners are explicitly
joined before going out-of-scope. On POSIX platforms, calling
pthread_join() on a thread that has already been joined has undefined
behavior. For example, under the musl C runtime library, a successful
call to pthread_join() will unmap the pthread_t thread information
region, and calling pthread_join() again will result in SIGSEGV.

R=clemensb@chromium.org, szuend@chromium.org

Change-Id: Ifdf34ed190df4c722c135ef043a3df588973b984
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2785905
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73699}
This commit is contained in:
Dominic Chen 2021-03-26 09:10:54 -04:00 committed by Commit Bot
parent f88739b9c7
commit b6df18ee9a
2 changed files with 2 additions and 1 deletions

View File

@ -89,6 +89,7 @@ David Manouchehri <david@davidmanouchehri.com>
Deepak Mohan <hop2deep@gmail.com>
Deon Dior <diaoyuanjie@gmail.com>
Derek Tu <derek.t@rioslab.org>
Dominic Chen <d.c.ddcc@gmail.com>
Dominic Farolini <domfarolino@gmail.com>
Douglas Crosher <dtc-v8@scieneer.com>
Dusan Milosavljevic <dusan.m.milosavljevic@gmail.com>

View File

@ -53,7 +53,7 @@ TaskRunner::TaskRunner(IsolateData::SetupGlobalTasks setup_global_tasks,
CHECK(Start());
}
TaskRunner::~TaskRunner() { Join(); }
TaskRunner::~TaskRunner() {}
void TaskRunner::Run() {
data_.reset(new IsolateData(this, std::move(setup_global_tasks_),