[cfe-dev] Who is working on/has worked on Capability analysis (-Wthread-safety)?
Aaron Ballman via cfe-dev
cfe-dev at lists.llvm.org
Sun Oct 31 06:22:17 PDT 2021
On Sun, Oct 31, 2021 at 3:13 AM David Blaikie via cfe-dev
<cfe-dev at lists.llvm.org> wrote:
>
> I believe it's mostly unmaintained at this point. +Delesley Hutchins (as the primary developer on this originally, or at least the last maintainer I'm aware of) in case he's got any pointers to current state/interested parties.
Aaron Puchert (CCed) has been doing a lot of good work in this area,
and I still continue to help review patches with the functionality.
Delesley has also been very helpful with review work when we need to
reach out for his expertise, so this is still being actively
maintained.
All of our thread safety analysis documentation lives at:
https://clang.llvm.org/docs/ThreadSafetyAnalysis.html (specific to
thread safety and capability analysis)
https://clang.llvm.org/docs/AttributeReference.html (on the attributes
themselves)
If you are interested in improving this documentation, I'm sure
there's a few of us who would be happy to help review any improvements
you want to make!
~Aaron
>
> On Sat, Oct 30, 2021 at 9:28 PM Randell Jesup via cfe-dev <cfe-dev at lists.llvm.org> wrote:
>>
>> I'm looking to find and document the best ways to use clang thread-safety features (capability analysis), especially for some common patterns of access such as a single reader/writer thread with multiple reader threads, and also to document how to use it for thread-locked access checking -- there's a single example involving a ThreadRole.h file to set up uses of capabilities for tracking threads. There's a brief mention of it on the paper, and also a longer example at https://insights.sei.cmu.edu/blog/thread-safety-analysis-in-c-and-c/ . However, that's from 2014, and it doesn't cover a lot of possible uses.
>>
>> One way to possibly handle the reader/writer vs readers case (where reads on the writing thread don't need to lock) would be to be able to say "guarded by this or that", in this case something like GUARDED_BY(mMutex, MainThread) (GUARDED_BY(mMutex || MainThread) ??).
>>
>> Randell Jesup, Mozilla
>>
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at lists.llvm.org
>> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
More information about the cfe-dev
mailing list