[PATCH] D84604: Thread safety analysis: Consider global variables in scope
Aaron Puchert via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 30 08:02:34 PDT 2020
aaronpuchert added a comment.
In D84604#2363768 <https://reviews.llvm.org/D84604#2363768>, @rupprecht wrote:
> I applied D87194 <https://reviews.llvm.org/D87194> locally and rebuilt the original source, and not only am I seeing the original issue (also firing on `DoThings()` when it should only be on `DoStuff()`), I'm also seeing: `error: acquiring mutex 'lock' requires negative capability '!lock' [-Werror,-Wthread-safety-negative]`, where `lock` is a local variable, defined as `MutexLock lock(mutex_)`.
Oh yes, I need to rebase this, sorry if I wasted your time. This is still on top of the bug that @lebedev.ri pointed out in D84604#2262745 <https://reviews.llvm.org/D84604#2262745> and on top of the bug that you pointed out.
> I'll work on getting a better repro for this.
Maybe wait a bit with that, I'll add you as reviewer when I've done the rebase and then you can try it again. I hope to have covered both locals and static members now.
Another issue is linkage, but I'll have to read up on that a bit.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84604/new/
https://reviews.llvm.org/D84604
More information about the cfe-commits
mailing list