Commit 6993e5ab authored by Victor Gomes's avatar Victor Gomes Committed by V8 LUCI CQ

[baseline] Check dequeue compilation job success

Between the loop entry and the Dequeue call, another
thread might exhaust the queue itens and the Dequeue
call will return false without setting the job.

Bug: chromium:1272009
Change-Id: Ia254d97de36395676f069c100f46747b41483783
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3300130
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78084}
parent 823c44d3
......@@ -166,7 +166,8 @@ class ConcurrentBaselineCompiler {
// we only switch back the memory chunks to RX at the end.
CodePageCollectionMemoryModificationScope batch_alloc(isolate_->heap());
std::unique_ptr<BaselineBatchCompilerJob> job;
incoming_queue_->Dequeue(&job);
if (!incoming_queue_->Dequeue(&job)) break;
DCHECK_NOT_NULL(job);
job->Compile();
outgoing_queue_->Enqueue(std::move(job));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment