[cfe-dev] clang attributes to disable asan/tsan/msan

Dmitri Gribenko gribozavr at gmail.com
Mon Feb 18 08:23:11 PST 2013


On Mon, Feb 18, 2013 at 6:15 PM, Dean Sutherland <dsutherland at cert.org> wrote:
> I like Jean-Daniel's suggestion.  One possible improvement:  Make two such attributes.  One could be called static_safety_analysis and the other dynamic_safety_analysis.  The result might look like this:
>
> __attribute__((static_safety_analysis("memory",…), dynamic_safety_analysis("thread", …)))
>
> Even better if the arguments included both foo and nofoo versions (e.g., "memory" or "no_memory").
>
> Someone else should suggest more felicitous spellings for both the attributes and the arguments.

It would be cleaner to use plain identifiers instead of string literals.

Dmitri

-- 
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/




More information about the cfe-dev mailing list