<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hi Alexey,<br>
<br>
We have not tried ThreadSanitizer. Thanks for the suggestion.<br>
<br>
I think the solution to my original question is to add an
attribute that can be attached to declarations when
[[cms::threadsafe]] appears in the code.<br>
<br>
Patrick<br>
<br>
On 11/20/2013 1:47 AM, Alexey Samsonov wrote:<br>
</div>
<blockquote
cite="mid:CAGSYnCOCW3enrZ-SZfQw2F89yrfnPx_VSMpE-OvzHVvJ1TXNvA@mail.gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<div dir="ltr">Hi Patrick,<br>
<br>
<div>On Tue, Nov 19, 2013 at 9:27 PM, Patrick Gartung <<a
moz-do-not-send="true" href="mailto:gartung@fnal.gov">gartung@fnal.gov</a>>
wrote:<br>
</div>
<div>> Hi,<br>
><br>
> We are working on a project to make a large code base
thread safe.</div>
<div><br>
</div>
<div>Out of curiosity, did you try <a moz-do-not-send="true"
href="http://clang.llvm.org/docs/ThreadSanitizer.html">ThreadSanitizer</a> on
your code base? It's able to report</div>
<div>data races which are hard to detect statically.</div>
<div><br>
</div>
<div>> We have<br>
> several clang static analyzers that we use to identify
thread safety<br>
> problems. As we fix these problems we would like to use
cxx11 attributes to<br>
> flag them complete, eg void * foo () -->>
[cms::threadsafe] void * foo().<br>
> Initial tests we release 3.3 show that the parse throws a
warning and drops<br>
> the info:<br>
><br>
> func_checker.cpp:8:4: warning: unknown attribute
'threadsafe' ignored<br>
> [[ cms::threadsafe ]] void bar() {<br>
><br>
> We would like to store the contents of the unknown
attribute and drop static<br>
> analyzer reports based on it.<br>
><br>
> Is there support for this in the head version of clang?<br>
><br>
> Patrick Gartung<br>
><br>
><br>
><br>
> _______________________________________________<br>
> cfe-dev mailing list<br>
> <a moz-do-not-send="true"
href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
> <a moz-do-not-send="true"
href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
><br>
<br>
<br>
<br>
-- <br>
Alexey Samsonov, MSK<br>
</div>
</div>
</blockquote>
<br>
</body>
</html>