joker.eph added a comment. jhen: can you try reversing the condition as I suggested and verify if TSAN still complains (I'm still trying to make sure I have a good understanding of the existing logic...) http://reviews.llvm.org/D18811