diff options
author | Justin Lebar <jlebar@google.com> | 2016-04-06 23:46:40 +0000 |
---|---|---|
committer | Justin Lebar <jlebar@google.com> | 2016-04-06 23:46:40 +0000 |
commit | 9e479e4763df7801a7da3209f69dcb4875645552 (patch) | |
tree | 784cf2a65ef7fd5358d64e8ac1d67e78c2e64e5c /clang/lib/Frontend/ModuleDependencyCollector.cpp | |
parent | dd11ee7452beae10875e7690ea5dccda0ee52444 (diff) | |
download | llvm-9e479e4763df7801a7da3209f69dcb4875645552.zip llvm-9e479e4763df7801a7da3209f69dcb4875645552.tar.gz llvm-9e479e4763df7801a7da3209f69dcb4875645552.tar.bz2 |
Fix a race condition in support library ThreadPool.
By running TSAN on the ThreadPool unit tests it was discovered that the
threads in the pool can pop tasks off the queue at the same time the
"wait" routine is trying to check if the task queue is empty. This patch
fixes this problem by checking for active threads in the waiter before
checking whether the queue is empty.
Patch by Jason Henline.
Differential Revision: http://reviews.llvm.org/D18811
Reviewers: joker.eph, jlebar
llvm-svn: 265618
Diffstat (limited to 'clang/lib/Frontend/ModuleDependencyCollector.cpp')
0 files changed, 0 insertions, 0 deletions