Commit Graph

16 Commits

Author SHA1 Message Date
Alexey Samsonov 56f1ef7d3b ubsan: fix broken test case by using brand new [[@LINE]] FileCheck feature
llvm-svn: 168170
2012-11-16 13:38:03 +00:00
Alexey Samsonov be9a293dda UBSan: enable CMake build on Darwin. Fix two failing tests and disable the test which produces linker errors on Darwin.
llvm-svn: 168169
2012-11-16 12:57:07 +00:00
Richard Smith 2674c6e39b Fix typo from code review (thanks to Alexey Samsonov). This is also caught by the existing tests when building for i386.
llvm-svn: 167890
2012-11-13 23:58:20 +00:00
Richard Smith 6122d0692b Support for building the ubsan runtime when using the autoconf build system on
Darwin. Patch by Jean-Daniel Dupas, tweaked by Jonathan Sauer, simplified
somewhat by me.

llvm-svn: 167889
2012-11-13 23:55:06 +00:00
Richard Smith 05dce7e644 -fsanitize=undefined: Switch to using sanitizer_common for output. This gets us much closer to not depending on any system headers.
llvm-svn: 167888
2012-11-13 23:42:05 +00:00
Richard Smith 77930919ad Update compiler-rt tests to match flag renaming/deprecation in Clang.
llvm-svn: 167434
2012-11-06 02:31:42 +00:00
Richard Smith 8f4d7eb518 Consistently declare 'extern "C"' variable in namespace __ubsan. No functionality change.
llvm-svn: 166966
2012-10-29 21:01:59 +00:00
Richard Smith f0aac0b99e Don't define an extern "C" variable in its first declaration, to appease a
bogus gcc warning. Take this opportunity to move the declaration to the header,
since it's part of the API of this file.

llvm-svn: 166965
2012-10-29 20:54:34 +00:00
Richard Smith 2f0d7d564c -fcatch-undefined-behavior checking for appropriate vptr value: library side.
llvm-svn: 166660
2012-10-25 02:07:02 +00:00
Richard Smith feea5d6fb4 Provide a slightly more helpful diagnostic if -fcatch-undefined-behavior finds
a problem with __int128 arithmetic but the runtime was not built with __int128
support.

llvm-svn: 165913
2012-10-14 23:53:37 +00:00
Richard Smith 130b748b72 Use a better test for __int128 support, which works on old GCC versions.
llvm-svn: 165912
2012-10-14 23:28:55 +00:00
Chandler Carruth eea8a48218 Fix the bootstrap of CompilerRT with host compilers that don't support
emulating 128-bit arithmetic on 32-bit x86 targets. This should get the
bootstrap back for GCC 4.6 at least.

Suggestions on better ways to do the detection here are welcome...

llvm-svn: 165863
2012-10-13 02:30:10 +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 b6fb381dba -fcatch-undefined-behavior: store the type name directly at the end of a type descriptor. 5% binary size reduction due to fewer relocations.
llvm-svn: 165571
2012-10-09 23:55:18 +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