[cfe-dev] Way to disable sanitize checks locally

Richard Smith richard at metafoo.co.uk
Thu Dec 13 19:25:56 PST 2012


On Thu, Dec 13, 2012 at 11:55 AM, Will Dietz <willdtz at gmail.com> wrote:
> On Thu, Dec 13, 2012 at 12:27 PM, Sean McBride <sean at rogue-research.com> wrote:
>> On Thu, 13 Dec 2012 10:06:49 -0800, zapadinsky said:
>>
>>>Hi I am new here. I am using clang to check errors in our code. Specifically
>>>integer overflows. But sometimes it is ok, some dirty code are ok, for
>>>example in hash function calculation. How can I disable sanitize checks
>>>locally for one inlined function for example?
>>
>
> Glad to hear it!
>
> Adding attributes to annotate safe locations is on my TODO list, as
> this is an important feature for usability.  It shouldn't take too
> long, but even so unfortunately I don't think I'll be able to get to
> it for at least a few days.

We already have the -fsanitize-blacklist= option to specify a
blacklist file. Currently, it's only used by ASan, but we should try
to extend the same mechanism to the other sanitizers before inventing
something else.



More information about the cfe-dev mailing list