History log of /external/clang/test/CodeGen/catch-undef-behavior.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
508764518dd54eb7be82b0474cb42ef8dbe9ebd3 28-Mar-2013 Richard Smith <richard-llvm@metafoo.co.uk> UBSan: Don't diagnose inf/nan conversions between floating-point types. It's far from clear whether these have undefined behavior, and these checks are helping no-one. Keep the double->float overflow warnings, though, since those are useful in practice, even though it's unclear whether such operations have defined behavior.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178194 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGen/catch-undef-behavior.c
bf8487a3c290203ae54fd81d35a94be0ff211235 22-Mar-2013 Richard Smith <richard-llvm@metafoo.co.uk> ubsan: Pass floating-point arguments to the runtime by value if they fit the
value argument. If not, be sure we don't accidentally use a dynamic alloca.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177690 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGen/catch-undef-behavior.c
aa624954c50a741528752b85d3a3bf11ef9771db 19-Mar-2013 Richard Smith <richard-llvm@metafoo.co.uk> PR15383: When -fsanitize=float-cast-overflow checks a float-to-int conversion,
it wasn't taking into account that the float should be truncated *before* the
range check happens. Thus (unsigned)-0.99 and (unsigned char)255.9 have defined
behavior and should not be trapped.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177362 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGen/catch-undef-behavior.c
bb60fc6a71f280f8e19e7f1a784ef05c40f5aa39 25-Feb-2013 Will Dietz <wdietz2@illinois.edu> [ubsan] Emit single check for left shift.

Avoids warning twice on same shift.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176056 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGen/catch-undef-behavior.c
4e1125f630e75a52209b928e9d43b638abf39987 22-Feb-2013 Bill Wendling <isanbard@gmail.com> Update to use references to attribute groups instead of listing the attributes on the call/invoke instructions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175878 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGen/catch-undef-behavior.c
78d85b1c5830a881c0a20a1b3fea99ee73149590 30-Jan-2013 Chad Rosier <mcrosier@apple.com> [ubsan] Implement the -fcatch-undefined-behavior flag using a trapping
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173848 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGen/catch-undef-behavior.c
4a5984cc6d176d8356529e7e5aee4856088d79f0 09-Jan-2013 Will Dietz <wdietz2@illinois.edu> [ubsan] Make static check data non-const so it can be used for deduplication.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171947 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGen/catch-undef-behavior.c
7a83421776416d6a9044fb03b5b02208b47646c1 07-Jan-2013 David Tweed <david.tweed@arm.com> Scalar shifts in the OpenCL specification (as of v. 1.2) are defined to be
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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171755 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGen/catch-undef-behavior.c
2d382d149b442b928fd3fb8edcc8d82ea9325872 30-Dec-2012 Will Dietz <wdietz2@illinois.edu> [ubsan] Recover by default, use -fno-sanitize-recover to disable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171264 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGen/catch-undef-behavior.c
1bdbe4d23ed90f601772edd4aa00b8d757c6d6ca 15-Dec-2012 Will Dietz <wdietz2@illinois.edu> [ubsan] Emit branch weight metadata to hint towards common case.

Results in better block placement that helps close the
performance gap when making ubsan checks recoverable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170263 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGen/catch-undef-behavior.c
463b48ba7eab6d7c96d23b59caea7f25de548293 13-Dec-2012 Richard Smith <richard-llvm@metafoo.co.uk> ubsan: Add -fsanitize=bool and -fsanitize=enum, which check for loads of
bit-patterns which are not valid values for enumerated or boolean types.
These checks are the ubsan analogue of !range metadata.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170108 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGen/catch-undef-behavior.c
ad95481b2769ad61f23afc5e2c31f11c66090657 02-Dec-2012 Will Dietz <wdietz2@illinois.edu> [ubsan] Add flag to enable recovery from checks when possible.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169114 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGen/catch-undef-behavior.c
b85403658a77e9c19c391c8f02bc7767544a25d9 27-Nov-2012 Will Dietz <wdietz2@illinois.edu> Add -fsanitize=integer for reporting suspicious integer behaviors.

Introduces new sanitizer "unsigned-integer-overflow".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168701 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGen/catch-undef-behavior.c
c54e25f9450d927dcd41270639523c1b4c0d5868 06-Nov-2012 Richard Smith <richard-llvm@metafoo.co.uk> Classify the INT_MIN/-1 check as -fsanitize=signed-integer-overflow, not as -fsanitize=divide-by-zero.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167433 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGen/catch-undef-behavior.c
d6396a681c9acbe56bc41bbc2bed2db45755bcd7 05-Nov-2012 Richard Smith <richard-llvm@metafoo.co.uk> Use the individual -fsanitize=<...> arguments to control which of the UBSan
checks to enable. Remove frontend support for -fcatch-undefined-behavior,
-faddress-sanitizer and -fthread-sanitizer now that they don't do anything.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167413 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGen/catch-undef-behavior.c
292d67bb69e878104d2cdc1a1f72264e4fc2852a 01-Nov-2012 Richard Smith <richard-llvm@metafoo.co.uk> -fcatch-undefined-behavior: Start checking loads and stores for null pointers.
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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167219 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGen/catch-undef-behavior.c
b2aa66c0f5ad4e2c67b7d02af6a644432ca189cf 13-Oct-2012 Richard Smith <richard-llvm@metafoo.co.uk> -fcatch-undefined-behavior: Trap undefined behavior due to conversions to or
from a floating-point type where the source value is not in the range of
representable values of the destination type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165843 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGen/catch-undef-behavior.c
930c05c32eac171ef1a94fabf80aecb4e6e2c840 10-Oct-2012 Richard Smith <richard-llvm@metafoo.co.uk> -fcatch-undefined-behavior: catch a VLA bound which evalutes to a non-positive value.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165583 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGen/catch-undef-behavior.c
0a940686f55b069b4f59a911eabf8be8a673b170 10-Oct-2012 Richard Smith <richard-llvm@metafoo.co.uk> Fix test broken by r165572.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165581 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGen/catch-undef-behavior.c
4def70d3040e73707c738f7c366737a986135edf 09-Oct-2012 Richard Smith <richard-llvm@metafoo.co.uk> -fcatch-undefined-behavior: emit calls to the runtime library whenever one of the checks fails.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGen/catch-undef-behavior.c
36ef0d54cfddf31cd48816e78ab4db73b31a6c1d 05-Oct-2012 Richard Smith <richard-llvm@metafoo.co.uk> If we flow off the end of a value-returning function:
- 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)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165273 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGen/catch-undef-behavior.c
9d3e226acad5e23e562cde0a69362bb266f2a333 25-Aug-2012 Richard Smith <richard-llvm@metafoo.co.uk> -fcatch-undefined-behavior: add the -ftrapv checks to the set of things caught
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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162634 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGen/catch-undef-behavior.c
2c9f87ca5cccbfdaad82762368af5b2323320653 24-Aug-2012 Richard Smith <richard-llvm@metafoo.co.uk> New -fcatch-undefined-behavior features:
* 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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162523 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGen/catch-undef-behavior.c
4ccf0043c67cf6e103c44cd7629efb812daaa877 08-May-2012 Nuno Lopes <nunoplopes@sapo.pt> hopefully unbreak some buildbots

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156357 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGen/catch-undef-behavior.c
9eecef16fe1f8ab4735062e1c670ad982ae912a2 07-May-2012 Nuno Lopes <nunoplopes@sapo.pt> make this test a little more useful. I'll add more tests for bound checking once -fbounds-checking patch gets in

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156321 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGen/catch-undef-behavior.c
e6da20fcd8d1cd34c75ce46ed0c1236ed88f2279 11-Apr-2010 Benjamin Kramer <benny.kra@googlemail.com> Fix run line so this test actually tests something.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100962 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGen/catch-undef-behavior.c
c24b9c46558919e98f4398ecbd45bc7b05f9acd9 10-Apr-2010 Chris Lattner <sabre@nondot.org> fix PR6805: llvm.objectsize changed to take an i1 instead of an i32.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100938 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGen/catch-undef-behavior.c