| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
attributes on the call/invoke instructions.
llvm-svn: 175878
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
| |
llvm-svn: 171947
|
| |
|
|
|
|
|
|
|
|
| |
with respect to the lower "left-hand-side bitwidth" bits, even when negative);
see OpenCL spec 6.3j. This patch both implements this behaviour in the code
generator and "constant folding" bits of Sema, and also prevents tests
to detect undefinedness in terms of the weaker C99 or C++ specifications
from being applied.
llvm-svn: 171755
|
| |
|
|
| |
llvm-svn: 171264
|
| |
|
|
|
|
|
| |
Results in better block placement that helps close the
performance gap when making ubsan checks recoverable.
llvm-svn: 170263
|
| |
|
|
|
|
|
| |
bit-patterns which are not valid values for enumerated or boolean types.
These checks are the ubsan analogue of !range metadata.
llvm-svn: 170108
|
| |
|
|
| |
llvm-svn: 169114
|
| |
|
|
|
|
| |
Introduces new sanitizer "unsigned-integer-overflow".
llvm-svn: 168701
|
| |
|
|
|
|
| |
-fsanitize=divide-by-zero.
llvm-svn: 167433
|
| |
|
|
|
|
|
| |
checks to enable. Remove frontend support for -fcatch-undefined-behavior,
-faddress-sanitizer and -fthread-sanitizer now that they don't do anything.
llvm-svn: 167413
|
| |
|
|
|
|
|
|
| |
We want the diagnostic, and if the load is optimized away, we still want to
trap it. Stop checking non-default address spaces; that doesn't work in
general.
llvm-svn: 167219
|
| |
|
|
|
|
|
| |
from a floating-point type where the source value is not in the range of
representable values of the destination type.
llvm-svn: 165843
|
| |
|
|
|
|
| |
non-positive value.
llvm-svn: 165583
|
| |
|
|
| |
llvm-svn: 165581
|
| |
|
|
|
|
| |
of the checks fails.
llvm-svn: 165536
|
| |
|
|
|
|
|
|
| |
- outside C++, return undef (behavior is not undefined unless the value is used)
- in C++, with -fcatch-undefined-behavior, perform an appropriate trap
- in C++, produce an 'unreachable' (behavior is undefined immediately)
llvm-svn: 165273
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
by this mode, and also check for signed left shift overflow. The rules for the
latter are a little subtle:
* neither C89 nor C++98 specify the behavior of a signed left shift at all
* in C99 and C11, shifting a 1 bit into the sign bit has undefined behavior
* in C++11, with core issue 1457, shifting a 1 bit *out* of the sign bit has
undefined behavior
As of this change, we use the C99 rules for all C language variants, and the
C++11 rules for all C++ language variants. Once we have individual
-fcatch-undefined-behavior= flags, this should be revisited.
llvm-svn: 162634
|
| |
|
|
|
|
|
|
| |
* when checking that a pointer or reference refers to appropriate storage for a type, also check the alignment and perform a null check
* check that references are bound to appropriate storage
* check that 'this' has appropriate storage in member accesses and member function calls
llvm-svn: 162523
|
| |
|
|
| |
llvm-svn: 156357
|
| |
|
|
|
|
| |
once -fbounds-checking patch gets in
llvm-svn: 156321
|
| |
|
|
| |
llvm-svn: 100962
|
|
|
llvm-svn: 100938
|