Commit Graph

11 Commits

Author SHA1 Message Date
Peter Collingbourne 90a0876ae7 Runtime support for the indirect function call checker.
Differential Revision: http://llvm-reviews.chandlerc.com/D1339

llvm-svn: 193060
2013-10-20 21:29:46 +00:00
Nick Lewycky b7aa592c19 Make the InvalidValueData take a SourceLocation.
llvm-svn: 191807
2013-10-02 02:29:47 +00:00
Richard Smith 0404ec8396 ubsan: Runtime handlers for array indexing checks.
llvm-svn: 175948
2013-02-23 02:40:07 +00:00
Will Dietz ad5180d774 [ubsan] Move attribute specifier to fix build with gcc.
llvm-svn: 172078
2013-01-10 17:01:13 +00:00
Will Dietz e4b1d2e32c [ubsan] Give entry methods default (not hidden) visibility.
Fixes using ubsan on shared libraries in linux, for example.

llvm-svn: 172041
2013-01-10 03:37:30 +00:00
Richard Smith 32952215b6 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.

llvm-svn: 170107
2012-12-13 07:00:14 +00:00
Will Dietz 2c36c71f5b [ubsan] Refactor handlers to have separate entry points for aborting.
If user specifies aborting after a recoverable failed check is
appropriate, frontend should emit call to the _abort variant.

Test this behavior with newly added -fsanitize-recover flag.

llvm-svn: 169113
2012-12-02 19:47:29 +00:00
Will Dietz 2631aaf939 ubsan: Support unsigned overflows, and divide-by-zero int/float split.
llvm-svn: 168700
2012-11-27 15:01:43 +00:00
Richard Smith 7247b23efc -fcatch-undefined-behavior: Runtime library support for trapping conversions to or
from a floating-point type where the source value is not in the range of
representable values of the destination type.

llvm-svn: 165844
2012-10-12 22:57:15 +00:00
Richard Smith 22cc16462e -fcatch-undefined-behavior: handler for VLA bound which evaluates to a non-positive value.
llvm-svn: 165582
2012-10-10 01:10:59 +00:00
Richard Smith 68b3014cd3 Add a runtime diagnostics library for Clang's -fcatch-undefined-behavior.
llvm-svn: 165533
2012-10-09 19:34:32 +00:00