<div dir="ltr">Hi,<div><br></div><div>TL;DR Let's make each sanitizer has its own suppression context.</div><div><br></div><div>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).</div><div><br></div><div>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.</div><div><br></div><div>This will allow us to:</div><div>1) specify different suppression files for each sanitizer, which is useful if they are combined<br>$ ASAN_OPTIONS=suppressions=asan_supp.txt LSAN_OPTIONS=suppressions=lsan_supp.txt</div><div><br></div><div>2) properly diagnose unsupported suppressions: e.g. if one will write</div><div>thread:foo.cc</div><div>and pass this suppression file to UBSan</div><div><br></div><div>3) get rid of hardcoding all possible sanitizer-specific suppressions in sanitizer_common.</div><div><br></div><div>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.</div><div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Alexey Samsonov<br><a href="mailto:vonosmas@gmail.com" target="_blank">vonosmas@gmail.com</a></div></div>
</div></div>