summaryrefslogtreecommitdiffstats
path: root/clang/test/Driver/fsanitize.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Implement function type checker for the undefined behavior sanitizer.Peter Collingbourne2013-10-201-2/+2
| | | | | | | | | This uses function prefix data to store function type information at the function pointer. Differential Revision: http://llvm-reviews.chandlerc.com/D1338 llvm-svn: 193058
* Enable -fsanitize=use-after-return by default under -fsanitize=addressKostya Serebryany2013-09-231-2/+5
| | | | | | | | | | | | | | | | | | | | | Summary: We enable ASAN's use-after-return instrumentation at compile-time, but still keep it disabled at run-time. This enables the users to flip the flag at run-time using environment variable ASAN_OPTIONS=detect_stack_use_after_return=1 instead of using a separate build. If UAR detection is disabled at run-time, this extra compile-time instrumentation costs very small slowdown. On SPEC 2006 14 tests are not affected at all, 4 tests get ~ 1% slowdown and 453.povray gets 4%. Reviewers: samsonov Reviewed By: samsonov CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1741 llvm-svn: 191186
* Move SanitizerArgs to the clang DriverAlexey Samsonov2013-08-191-0/+4
| | | | | | | | | | | | | | | | Summary: This change turns SanitizerArgs into high-level options stored in the Driver, which are parsed lazily. This fixes an issue of multiple copies of the same diagnostic message produced by sanitizer arguments parser. Reviewers: rsmith Reviewed By: rsmith CC: chandlerc, eugenis, cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1341 llvm-svn: 188660
* Fixup for r188058: assume hasAsanZeroBaseShadow() is false if ASan is not neededAlexey Samsonov2013-08-091-0/+3
| | | | llvm-svn: 188068
* Add -fno-assume-sane-operator-new when building with MSan.Evgeniy Stepanov2013-06-201-0/+3
| | | | | | | A workaroudn for PR16386. MSan's operator new aften has side-effects that are miscompiled without this flag. llvm-svn: 184410
* Add -fsanitize=leak to driver options.Sergey Matveev2013-05-271-0/+12
| | | | | | | | If -fsanitize=leak is specified, link the program with the LeakSanitizer runtime. Ignore this option when -fsanitize=address is specified, because AddressSanitizer has this functionality built in. llvm-svn: 182729
* Follow-up for r179082: more careful handling of ↵Alexey Samsonov2013-04-091-0/+6
| | | | | | -f(no-)sanitize-address-zero-base-shadow on Android llvm-svn: 179089
* If the user requested a zero-base-shadow sanitizer, infer -pie and -fPIC ↵Peter Collingbourne2013-04-091-5/+10
| | | | | | | | when appropriate. Differential Revision: http://llvm-reviews.chandlerc.com/D502 llvm-svn: 179082
* [ASan] Make -fsanitize=address always imply -fsanitize=init-orderAlexey Samsonov2013-03-191-1/+1
| | | | llvm-svn: 177391
* [ASan] Make -fsanitize=address imply -fsanitize=init-order (if the latter is ↵Alexey Samsonov2013-03-141-0/+6
| | | | | | not explicitly disabled). llvm-svn: 177061
* [ubsan] Implement the -fcatch-undefined-behavior flag using a trappingChad Rosier2013-01-291-2/+19
| | | | | | | | | | | implementation; this is much more inline with the original implementation (i.e., pre-ubsan) and does not require run-time library support. The trapping implementation can be invoked using either '-fcatch-undefined-behavior' or '-fsanitize=undefined-trap -fsanitize-undefined-trap-on-error', with the latter being preferred. Eventually, the -fcatch-undefined-behavior' flag will be removed. llvm-svn: 173848
* Print warning instead of error if optional ASan features are enabled w/o ↵Alexey Samsonov2013-01-281-1/+7
| | | | | | specifying -fsanitize=address llvm-svn: 173670
* Add top-level Clang flag -f(no-)sanitize-address-zero-base-shadow that makes ↵Alexey Samsonov2013-01-201-0/+12
| | | | | | AddressSanitizer use bottom of the address space for the shadow memory. On Linux it can be used with -fPIE/-pie to improve performance. llvm-svn: 172974
* Fix uninitialized bool flag access in SanitizerArgs parserAlexey Samsonov2013-01-161-0/+3
| | | | llvm-svn: 172605
* [ubsan] Recover by default, use -fno-sanitize-recover to disable.Will Dietz2012-12-301-0/+8
| | | | llvm-svn: 171264
* Support -fsanitize-memory-track-origins.Evgeniy Stepanov2012-12-241-3/+12
| | | | llvm-svn: 171020
* ubsan: Add -fsanitize=bool and -fsanitize=enum, which check for loads ofRichard Smith2012-12-131-4/+2
| | | | | | | bit-patterns which are not valid values for enumerated or boolean types. These checks are the ubsan analogue of !range metadata. llvm-svn: 170108
* Reuse an existing diagnostic for tsan/msan needing -pie error.Evgeniy Stepanov2012-12-051-0/+18
| | | | | | | Add a diagnosting for -fsanitize=memory conflicting with other sanitizers. Extend tests. llvm-svn: 169380
* Switch to using -### as mentioned by chandlerc.Joey Gouly2012-12-011-8/+8
| | | | llvm-svn: 169089
* Add -emit-llvm to test/Driver/fsanitize.c to stop this failing on the ARM ↵Joey Gouly2012-12-011-8/+8
| | | | | | bot. Approved by d0k. llvm-svn: 169088
* Remove restriction on combining ubsan with asan or tsan. This has worked for ↵Richard Smith2012-12-011-4/+4
| | | | | | a while. llvm-svn: 169066
* This patch exposes to Clang users three more sanitizers are experimental ↵Alexey Samsonov2012-11-291-0/+6
| | | | | | | | | | | | | | features of ASan: 1) init-order sanitizer: initialization-order checker. Status: usable, but may produce false positives w/o proper blacklisting. 2) use-after-return sanitizer Status: implemented, but heavily understed. Should be optional, as it significanlty slows program down. 3) use-after-scope sanitizer Status: in progress. llvm-svn: 168950
* Refactor -fsanitize, -f*-sanitizer arguments parsing. Provide a more careful ↵Alexey Samsonov2012-11-281-0/+6
| | | | | | diagnostic for invalid sets of sanitizers llvm-svn: 168794
* Add -fsanitize=integer for reporting suspicious integer behaviors.Will Dietz2012-11-271-2/+7
| | | | | | Introduces new sanitizer "unsigned-integer-overflow". llvm-svn: 168701
* PR14306: Move -fbounds-checking to -fsanitize=bounds.Joey Gouly2012-11-231-3/+4
| | | | llvm-svn: 168510
* clang/test/Driver/fsanitize.c: Speculative fix to improve test on win32, not ↵NAKAMURA Takumi2012-11-061-5/+5
| | | | | | to mix emissions into stdout. llvm-svn: 167485
* Per discussion on cfe-commits, treat -faddress-sanitizer,Richard Smith2012-11-061-2/+9
| | | | | | | | | -fno-address-sanitizer, -fthread-sanitizer, -fno-thread-sanitizer, and -fcatch-undefined-behavior as deprecated: produce a warning if they are used pointing to the corresponding -fsanitize= option. In passing add the missing '-' to some diagnostics. llvm-svn: 167429
* Add -fsanitize=<sanitizers> argument to driver and frontend, and addRichard Smith2012-11-051-0/+16
-fno-sanitize=<sanitizers> argument to driver. These allow ASan, TSan, and the various UBSan checks to be enabled and disabled separately. Right now, the different modes can't be combined, but the intention is that combining UBSan and the other sanitizers will be permitted in the near future. Currently, the UBSan checks will all be enabled if any of them is; that will be fixed by the next patch. llvm-svn: 167411
OpenPOWER on IntegriCloud