提交 db54008b 编写于 作者: J jiefu

8229169: False failure of GenericTaskQueue::pop_local on architectures with weak memory model

Reviewed-by: mdoerr, kbarrett, tschatzl
上级 e88fb400
......@@ -714,6 +714,11 @@ GenericTaskQueue<E, F, N>::pop_local(volatile E& t) {
} else {
// Otherwise, the queue contained exactly one element; we take the slow
// path.
// The barrier is required to prevent reordering the two reads of _age:
// one is the _age.get() below, and the other is _age.top() above the if-stmt.
// The algorithm may fail if _age.get() reads an older value than _age.top().
OrderAccess::loadload();
return pop_local_slow(localBot, _age.get());
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册