[PATCH] D129832: [sanitizer] Add "mainsrc" prefix to sanitizer special case list

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 14 23:36:45 PDT 2022


MaskRay marked 2 inline comments as done.
MaskRay added inline comments.


================
Comment at: clang/docs/SanitizerSpecialCaseList.rst:108
+caution. It may still be useful, e.g. when patterns are picked in a way to
+ensure the prevailing one is ignored.
+
----------------
Added: ``(There is an action at a distance risk.)``


================
Comment at: clang/docs/SanitizerSpecialCaseList.rst:110-112
+``mainsrc`` can be useful enabling a ubsan check for a large code base when
+finding the direct stack frame triggering the failure for every failure is
+difficult.
----------------
vitalybuka wrote:
> if this is transitionalt solution, would it be better just to use -fno-sanitize= on *.cpp file?
This provides a more convenient way than using `-fno-sanitize=` for a different set of files.

E.g. if a group wants to ignore a check for all ``[a-m]*` files, then can use `mainsrc:[a-m]*` instead of patching the build system.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D129832/new/

https://reviews.llvm.org/D129832



More information about the cfe-commits mailing list