summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/bounds-checking.c
Commit message (Collapse)AuthorAgeFilesLines
* [PM] Require a registered x86 target for this test which uses the x86Chandler Carruth2017-11-141-0/+2
| | | | | | triple. llvm-svn: 318137
* [PM] Wire up support for the bounds checking sanitizer with the new PM.Chandler Carruth2017-11-141-0/+2
| | | | | | | | | | | | | | | Not much interesting here. Mostly wiring things together. One thing worth noting is that the approach is substantially different from the old PM. Here, the -O0 case works fundamentally differently in that we just directly build the pipeline without any callbacks or other cruft. In some ways, this is nice and clean. However, I don't like that it causes the sanitizers to be enabled with different changes at different times. =/ Suggestions for a better way to do this are welcome. Differential Revision: https://reviews.llvm.org/D39085 llvm-svn: 318131
* Introduce -fsanitize-trap= flag.Peter Collingbourne2015-06-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This flag controls whether a given sanitizer traps upon detecting an error. It currently only supports UBSan. The existing flag -fsanitize-undefined-trap-on-error has been made an alias of -fsanitize-trap=undefined. This change also cleans up some awkward behavior around the combination of -fsanitize-trap=undefined and -fsanitize=undefined. Previously we would reject command lines containing the combination of these two flags, as -fsanitize=vptr is not compatible with trapping. This required the creation of -fsanitize=undefined-trap, which excluded -fsanitize=vptr (and -fsanitize=function, but this seems like an oversight). Now, -fsanitize=undefined is an alias for -fsanitize=undefined-trap, and if -fsanitize-trap=undefined is specified, we treat -fsanitize=vptr as an "unsupported" flag, which means that we error out if the flag is specified explicitly, but implicitly disable it if the flag was implied by -fsanitize=undefined. Differential Revision: http://reviews.llvm.org/D10464 llvm-svn: 240105
* Split -fsanitize=bounds to -fsanitize=array-bounds (for the frontend-insertedRichard Smith2013-10-221-8/+11
| | | | | | | | | | | | | | check using the ubsan runtime) and -fsanitize=local-bounds (for the middle-end check which inserts traps). Remove -fsanitize=local-bounds from -fsanitize=undefined. It does not produce useful diagnostics and has false positives (PR17635), and is not a good compromise position between UBSan's checks and ASan's checks. Map -fbounds-checking to -fsanitize=local-bounds to restore Clang's historical behavior for that flag. llvm-svn: 193205
* PR14306: Move -fbounds-checking to -fsanitize=bounds.Joey Gouly2012-11-231-1/+1
| | | | llvm-svn: 168510
* wire -fbounds-checking to the new LLVM bounds checking passNuno Lopes2012-05-221-10/+11
| | | | llvm-svn: 157262
* revert the usage of the objectsize intrinsic with 3 parameters (to match ↵Nuno Lopes2012-05-221-4/+4
| | | | | | LLVM r157255) llvm-svn: 157256
* update calls to objectsize intrinsic to match LLVM r156473Nuno Lopes2012-05-091-0/+25
add a test for -fbounds-checking code generation llvm-svn: 156474
OpenPOWER on IntegriCloud