[cfe-dev] ASan: suppress new-delete-type-mismatch via ASAN_OPTIONS suppressions?

Stephan Bergmann via cfe-dev cfe-dev at lists.llvm.org
Mon Jun 27 02:00:14 PDT 2016


On 06/17/2016 07:35 PM, Stephan Bergmann via cfe-dev wrote:
> On 06/17/2016 06:30 PM, Kostya Serebryany wrote:
>> Sorry for delay. (cfe-dev is not the list I usually monitor for asan
>> problems).
>
> Ah, yeah, wasn't sure which list is best to discuss sanitizer issues.
>
>> Suppressing new-delete mismatches might be useful in some rare cases
>> (and maybe yours is like this: buggy third party code that you don't
>> control).
>> But I am reluctant to add more suppression mechanisms unless many people
>> ask for it (extra complexity is justified only if there are enough users
>> who need it; you are the first, AFAICT. I am especially careful with
>> suppressions as I've seen them hurt the testing process many times).
>>
>> If you feel strong, please send a patch with a test and doc update to
>> llvm-commits
>> using phabricator. (CC me and eugenis at google.com
>> <mailto:eugenis at google.com>).
>
> Had already filed <http://reviews.llvm.org/D21378> meanwhile.  Will add
> a doc update to it in any case.  Anyway, if you don't want suppression
> support to go in that direction, we can also drop it.

So I had another look now, trying to add the requested doc update. 
However, I have no idea what I'm supposed to add where: 
docs/AddressSanitizer.rst in the clang repo is the only place I found 
discussing the ASan suppression mechanism.  But it doesn't explain what 
error reports exactly can be suppressed with that mechanism.  It starts 
of with a vague "Runtime interposition allows AddressSanitizer to find 
bugs in code that is not being recompiled."  Which IMO already covers 
this new-delete-type-mismatch report (via interposition of C++ 
new/delete handling) just as well as it covers whatever other interposition.




More information about the cfe-dev mailing list