summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic/Sanitizers.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [Basic] Fix some Clang-tidy modernize and Include What You Use warnings; ↵Eugene Zelenko2018-03-281-3/+2
| | | | | | other minor fixes (NFC). llvm-svn: 328735
* Pull trivial SanitizerSet methods into the header.Benjamin Kramer2015-07-141-25/+0
| | | | | | Inlining them is always preferable to a call. NFC. llvm-svn: 242154
* [ASan] Initial support for Kernel AddressSanitizerAlexander Potapenko2015-06-191-0/+4
| | | | | | | | | This patch adds initial support for the -fsanitize=kernel-address flag to Clang. Right now it's quite restricted: only out-of-line instrumentation is supported, globals are not instrumented, some GCC kasan flags are not supported. Using this patch I am able to build and boot the KASan tree with LLVMLinux patches from github.com/ramosian-glider/kasan/tree/kasan_llvmlinux. To disable KASan instrumentation for a certain function attribute((no_sanitize("kernel-address"))) can be used. llvm-svn: 240131
* Revert "[Sanitizers] Provide better diagnostic for sanitizers unsupported ↵Alexey Samsonov2015-06-171-6/+0
| | | | | | | | | for target triple." This reverts commit r239953, while I'm investigating assertion failure from http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_check/9994/ llvm-svn: 239958
* [Sanitizers] Provide better diagnostic for sanitizers unsupported for target ↵Alexey Samsonov2015-06-171-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | triple. Summary: Introduce ToolChain::getSupportedSanitizers() that would return the set of sanitizers available on given toolchain. By default, these are sanitizers which don't necessarily require runtime support (i.e. set from -fsanitize=undefined-trap). Sanitizers (ASan, DFSan, TSan, MSan etc.) which cannot function without runtime library are marked as supported only on platforms for which we actually build these runtimes. This would allow more fine-grained checks in the future: for instance, we have to restrict availability of -fsanitize=vptr to Mac OS 10.9+ (PR23539) Update test cases accrodingly: add tests for certain unsupported configurations, remove test cases for -fsanitize=vptr + PS4 integration, as we don't build the runtime for PS4 at the moment. Test Plan: regression test suite Reviewers: pcc Subscribers: cfe-commits, filcab, eugenis, thakis, kubabrecka, emaste, rsmith Differential Revision: http://reviews.llvm.org/D10467 llvm-svn: 239953
* Move sanitizer parser and group expander from Driver to Basic.Peter Collingbourne2015-05-111-0/+22
| | | | | | | | No functional change. Differential Revision: http://reviews.llvm.org/D9621 llvm-svn: 237056
* Unify sanitizer kind representation between the driver and the rest of the ↵Peter Collingbourne2015-05-111-9/+10
| | | | | | | | | | compiler. No functional change. Differential Revision: http://reviews.llvm.org/D9618 llvm-svn: 237055
* [Sanitizer] Refactor SanitizerArgs parsing in Driver.Alexey Samsonov2014-11-141-0/+4
| | | | | | | | | | | Remove flag parsing details from the public header. Use SanitizerSet to represent the set of enabled sanitizers. Cleanup the implementation: update the comments to reflect reality, remove dead code. No functionality change. llvm-svn: 221968
* [Sanitizer] Refactor sanitizer options in LangOptions.Alexey Samsonov2014-11-111-0/+31
Get rid of ugly SanitizerOptions class thrust into LangOptions: * Make SanitizeAddressFieldPadding a regular language option, and rely on default behavior to initialize/reset it. * Make SanitizerBlacklistFile a regular member LangOptions. * Introduce the helper class "SanitizerSet" to represent the set of enabled sanitizers and make it a member of LangOptions. It is exactly the entity we want to cache and modify in CodeGenFunction, for instance. We'd also be able to reuse SanitizerSet in CodeGenOptions for storing the set of recoverable sanitizers, and in the Driver to represent the set of sanitizers turned on/off by the commandline flags. No functionality change. llvm-svn: 221653
OpenPOWER on IntegriCloud