[cfe-dev] Who is working on/has worked on Capability analysis (-Wthread-safety)?

David Blaikie via cfe-dev cfe-dev at lists.llvm.org
Sun Oct 31 00:12:51 PDT 2021


I believe it's mostly unmaintained at this point. +Delesley Hutchins
<delesley at google.com> (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.

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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20211031/abaeef31/attachment.html>


More information about the cfe-dev mailing list