RFC: Sanitizer: Make SuppressionContext tool-specific

Dmitry Vyukov dvyukov at google.com
Wed Feb 18 20:46:40 PST 2015

sounds good to me
but probably not super top priority

On Thu, Feb 19, 2015 at 3:02 AM, Alexey Samsonov <vonosmas at gmail.com> wrote:
> Hi,
> TL;DR Let's make each sanitizer has its own suppression context.
> So now there are four  sanitizers that support suppressions: TSan, LSan,
> UBSan, ASan; and 12 types of suppressions (TSan has 7, LSan and UBSan has 1,
> ASan has 3, none are shared).
> The only way to use suppressions is via SuppressionContext singleton from
> sanitizer_common library. I propose to make SuppressionContext a regular
> class and let each sanitizer use its own, specialized version of it.
> "suppressions" runtime flag will be removed from CommonFlags, and instead
> added to each of: TsanFlags, UbsanFlags, AsanFlags, LsanFlags.
> This will allow us to:
> 1) specify different suppression files for each sanitizer, which is useful
> if they are combined
> $ ASAN_OPTIONS=suppressions=asan_supp.txt
> LSAN_OPTIONS=suppressions=lsan_supp.txt
> 2) properly diagnose unsupported suppressions: e.g. if one will write
> thread:foo.cc
> and pass this suppression file to UBSan
> 3) get rid of hardcoding all possible sanitizer-specific suppressions in
> sanitizer_common.
> I'm fine with making this change, do you agree that we should do it? To me
> this seems like a no-brainer, but let me know if you think differently.
> --
> Alexey Samsonov
> vonosmas at gmail.com

More information about the llvm-commits mailing list