提交 fffcec15 编写于 作者: A anoll

8043158: Crash in CodeSweeperSweepNoFlushTest in CompileQueue::free_all()

Summary: Acquire lock before calling notify()
Reviewed-by: twisti, thartmann
上级 8d10f998
...@@ -678,8 +678,11 @@ void CompileQueue::free_all() { ...@@ -678,8 +678,11 @@ void CompileQueue::free_all() {
while (next != NULL) { while (next != NULL) {
CompileTask* current = next; CompileTask* current = next;
next = current->next(); next = current->next();
{
// Wake up thread that blocks on the compile task. // Wake up thread that blocks on the compile task.
MutexLocker ct_lock(current->lock());
current->lock()->notify(); current->lock()->notify();
}
// Put the task back on the freelist. // Put the task back on the freelist.
CompileTask::free(current); CompileTask::free(current);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册