Commit Graph

4708 Commits

Author SHA1 Message Date
Viktor Kutuzov 6b862f22e5 [Tsan] Fix the sunrpc.cc test to build on FreeBSD
Differential Revision: http://reviews.llvm.org/D5730

llvm-svn: 219791
2014-10-15 12:47:48 +00:00
Viktor Kutuzov adcf1ce904 [Tsan] Make the mutex_robust tests Linux-specific
Differential Revision: http://reviews.llvm.org/D5729

llvm-svn: 219790
2014-10-15 12:43:04 +00:00
Dmitry Vyukov 6373829449 tsan: fix false positive related to signals
Write interceptor calls malloc, which causes a false
unsafe-call-in-signal-handler report. See the test.

llvm-svn: 219784
2014-10-15 08:56:43 +00:00
Dmitry Vyukov a08a8dc01d tsan: use a different dir for llvm build
build is used as gtest temp build dir, and is cleared during every build

llvm-svn: 219783
2014-10-15 08:56:15 +00:00
Dmitry Vyukov f03e719f23 tsan: remove dead code
llvm-svn: 219779
2014-10-15 05:38:49 +00:00
Ed Maste 3ba162d2f9 Fix compiler-rt build on FreeBSD 10.1
We have to #define _WANT_RTENTRY to get struct rtentry, and add headers
that it depends on.

SIOCADDRT and SIOCDELRT also do not exist in FreeBSD 10.1 and were removed
in FreeBSD rev. 263203:

  Garbage collect long time obsoleted (or never used) stuff from routing
  API.

Differential Revision: http://reviews.llvm.org/D5703

llvm-svn: 219722
2014-10-14 21:08:35 +00:00
Renato Golin 498b223eec Re-enable ASAN/UBSAN tests on ARM, with VFP3 they began to pass
When compiling with -mfpu=vfpv3, those tests began to pass, like the others
with "Illegal Instruction" error, so removing the XFAIL from them should
get the bot green (and have more tests!).

llvm-svn: 219721
2014-10-14 21:00:22 +00:00
Bob Wilson ca0a38e0ae Add complex multiply/divide functions to arm64 iOS libclang_rt libraries.
Clang r219557 introduces libcalls to complex multiply/divide functions.
Since these functions are not available in iOS for arm64 devices, add them to
the static libraries.

llvm-svn: 219715
2014-10-14 20:33:36 +00:00
Alexey Samsonov 37efdf0033 [UBSan] XFAIL test added in r219642 on Darwin
llvm-svn: 219699
2014-10-14 17:31:15 +00:00
Evgeniy Stepanov 9e984c5137 [sanitizer] Fix a crash in FP unwinder on ARM.
This change fixes 2 issues in the fast unwinder from r217079:
* A crash if a frame pointer points below current stack head, but
  inside the current thread stack limits. That memory may be
  unmapped. A check for this was lost in r217079.
* The last valid stack frame (the first one with an invalid next
  frame pointer) is always interpreted as a GCC layout frame. This
  results in garbled last PC in the (expected) case when the last
  frame has LLVM layout.

llvm-svn: 219683
2014-10-14 13:46:07 +00:00
Renato Golin 8fcae0b35e Fix silly commit to disable test on ARM
llvm-svn: 219681
2014-10-14 12:32:47 +00:00
Renato Golin 3743568735 Disable failing ASAN LongJump test on ARM
Updated the URL to reflect information on the problem as well as build the
case for ARM. This seems to be a wider problem, not ARM or PPC specific.

llvm-svn: 219680
2014-10-14 12:24:28 +00:00
Dmitry Vyukov 4eebdf22ef tsan: remove trailing whitespace
llvm-svn: 219678
2014-10-14 09:46:56 +00:00
Evgeniy Stepanov f518a4e774 [asan] Add fast_unwind_on_check flag.
Allows to specify the unwinder to use for CHECK failures. Previous behaviour
was to use the "fatal" unwinder.
As compiler-rt is built without frame pointers, only the slow unwinder
really makes sense here, and it is the default.

llvm-svn: 219677
2014-10-14 09:36:24 +00:00
Dmitry Vyukov ea2f3bffca tsan: refactor atexit handling
The current handling (manual execution of atexit callbacks)
is overly complex and leads to constant problems due to mutual ordering of callbacks.
Instead simply wrap callbacks into our wrapper to establish
the necessary synchronization.
Fixes issue https://code.google.com/p/thread-sanitizer/issues/detail?id=80

llvm-svn: 219675
2014-10-14 09:32:45 +00:00
Alexey Samsonov eb47d8a2c8 Sanitize upcasts and conversion to virtual base.
This change adds UBSan check to upcasts. Namely, when we
perform derived-to-base conversion, we:
1) check that the pointer-to-derived has suitable alignment
   and underlying storage, if this pointer is non-null.
2) if vptr-sanitizer is enabled, and we perform conversion to
   virtual base, we check that pointer-to-derived has a matching vptr.

llvm-svn: 219642
2014-10-13 23:59:00 +00:00
Filipe Cabecinhas 830c45e5de Fix minor typos in comments.
llvm-svn: 219632
2014-10-13 21:40:52 +00:00
Dmitry Vyukov 02ff8bb986 tsan: better reporting for virtual-call-after-free
Previously we said that it's a data race, which is confusing
if it happens in the same thread.

llvm-svn: 219600
2014-10-13 08:46:25 +00:00
Chandler Carruth 30bdfa7f99 [UBSan] Disable one run line of this test to allow the test as a whole
to pass in an opt build.

The test case in question does show UBSan catching the error, but it
doesn't then successfully set the exit code of the program. I'll let the
UBSan folks sort out why. It should reproduce trivially with an
optimized build.

llvm-svn: 219563
2014-10-11 06:49:00 +00:00
Alexey Samsonov 19c2e631bd [UBSan] Fix UBSan testcase for float->int conversion after LLVM r219542.
llvm-svn: 219559
2014-10-11 01:34:16 +00:00
Petar Jovanovic a1ac4b2f6a [asan][mips] Adding support of asan for mipsel arch
cmake/config-ix.cmake: Enabled building of asan for mipsel arch
test/asan/CMakeLists.txt: Enabled testing of asan for mipsel

Patch by Kumar Sukhani

Differential Revision: http://reviews.llvm.org/D5615

llvm-svn: 219496
2014-10-10 13:46:55 +00:00
Renato Golin 1a8093c3a7 Disabling main() check on UBSAN, since the noreturn check is already made
llvm-svn: 219488
2014-10-10 10:26:14 +00:00
Viktor Kutuzov 4546519196 [Tsan] Do not use INTERCEPT_FUNCTION_VER() on FreeBSD
Differential Revision: http://reviews.llvm.org/D5708

llvm-svn: 219483
2014-10-10 07:11:58 +00:00
Viktor Kutuzov e3b6a6a379 [Tsan] Fix the getline_nohang.cc test to build on FreeBSD
Differential Revision: http://reviews.llvm.org/D5666

llvm-svn: 219482
2014-10-10 07:07:26 +00:00
Viktor Kutuzov 348758bbca [Tsan] Fix comments in the user_fopen.cc and user_malloc.cc tests
Related revision: http://reviews.llvm.org/D5670

llvm-svn: 219481
2014-10-10 07:01:52 +00:00
Viktor Kutuzov 918df1abd8 [Tsan] Make the user_fopen.cc and user_malloc.cc tests Linux-specific
Differential Revision: http://reviews.llvm.org/D5670

llvm-svn: 219478
2014-10-10 06:55:17 +00:00
Renato Golin e68963a986 XFAIL some more sanitiser ARMv7l tests
Some more tests failing on the ARMv7 buildbot.

llvm-svn: 219404
2014-10-09 11:34:40 +00:00
Viktor Kutuzov e17b55be69 [Tsan] Fix the signal_errno.cc and signal_malloc.cc tests to pass on FreeBSD
Differential Revision: http://reviews.llvm.org/D5669

llvm-svn: 219399
2014-10-09 09:40:02 +00:00
Viktor Kutuzov c2e274dc2c [Tsan] Fix the global_race tests to pass on FreeBSD
Differential Revision: http://reviews.llvm.org/D5668

llvm-svn: 219398
2014-10-09 09:35:25 +00:00
Viktor Kutuzov 27781f993d [Tsan] Fix the blacklist2.cc test to pass on FreeBSD
Differential Revision: http://reviews.llvm.org/D5665

llvm-svn: 219397
2014-10-09 09:04:26 +00:00
Viktor Kutuzov bafaa7f6ba [Sanitizers] Intercept dlopen() and dlclose() on FreeBSD
Differential Revision: http://reviews.llvm.org/D5664

llvm-svn: 219396
2014-10-09 08:59:59 +00:00
Viktor Kutuzov 2ed7c9df7f [Tsan] Fix references to libc entities in tsan_interceptors.cc on FreeBSD
Differential Revision: http://reviews.llvm.org/D5663

llvm-svn: 219395
2014-10-09 08:56:22 +00:00
Renato Golin 1aaa4bcdd1 Mark sanitizer tests XFAIL on ARMv7
ASAN, UBSAN and profile tests that don't work with arm-linux-gnueabi and
android also don't work on armv7l-linux-gnueabihf. Some of the tests have
known causes, others not yet. In order to get a green bot, I'm disabling
those tests for now and will investigate when the priority rises.

llvm-svn: 219343
2014-10-08 21:13:23 +00:00
Ed Maste e4320f5e6a Remove bashisms and switch to /bin/sh
On a default FreeBSD install Bash is not installed and fdescfs is not
mounted.  Use plain sh functionality instead.

Differential Revision: http://reviews.llvm.org/D5631

llvm-svn: 219333
2014-10-08 18:35:16 +00:00
Tim Northover 8897b8d21a AArch64: don't just hack arm64 support into compiler-rt.
We should check whether the compiler & linker support ARM64 before attempting
to build a version of compiler-rt for it. Otherwise things will go badly.

rdar://problem/18575597

llvm-svn: 219332
2014-10-08 18:34:30 +00:00
Tim Northover a5a06ad6fc AArch64: add support for ARM64 iOS versions of compiler-rt.
Just a dummy directory and a few sane choices in the Darwin SDK.

rdar://problem/18575597

llvm-svn: 219323
2014-10-08 17:28:37 +00:00
Renato Golin 34cb659103 Separating ARM/AArch64 Compiler-RT tests
Makes sure ARM bots don't run AArch64 and vice-versa, since not all
AArch64 systems can run AArch32 and no ARM hardware can run AArch64.

llvm-svn: 219304
2014-10-08 13:47:18 +00:00
Alexander Potapenko ff7456dd34 [ASan] Bump the minimum OSX version required to run ASan to 10.7.
llvm-svn: 219302
2014-10-08 12:41:11 +00:00
Lorenzo Martignoni 60ebffc12f Custom wrappers for DFSanitizing sprintf & snprintf.
Differential Revision: http://reviews.llvm.org/D5561

llvm-svn: 219293
2014-10-08 10:01:42 +00:00
Ed Maste 89b80fb022 Avoid bashisms and switch to /bin/sh
Bash may not be installed on some systems by default, like FreeBSD.

Differential Revision: http://reviews.llvm.org/D5654

llvm-svn: 219231
2014-10-07 20:23:57 +00:00
Ed Maste 1419e9adb5 Run profile tests on FreeBSD
FreeBSD does not have libdl, so set it via lit.cfg instead of the test
input, as with asan.  Also remove it from Darwin test runs - it's not
necessary, but harmless there.

Add FreeBSD to the list of hosts to test.

Differential Revision: http://reviews.llvm.org/D5650

llvm-svn: 219227
2014-10-07 19:24:24 +00:00
Yuri Gorshenin d6c04770c1 Fixed asan-asm-stacktrace-test.cc
Summary: Fixed asan-asm-stacktrace-test.cc. Now it's supported on x86_64 and added test run when no debug info is generated.

Differential Revision: http://reviews.llvm.org/D5547

llvm-svn: 219200
2014-10-07 11:12:55 +00:00
Saleem Abdulrasool 2cf5d82983 builtins: add missed change from previous commit
The macro rework was missing a trailing SEPARATOR for the .thumb_func, resulting
in assembly failures.

llvm-svn: 219183
2014-10-07 03:00:17 +00:00
Saleem Abdulrasool 48d4e4dd35 builtins: rework use of DEFINE_COMPILERRT_THUMB_FUNCTION
This is simply to help clarity of the code.  The functions are built as thumb
only if Thumb2 is available (__ARM_ARCH_ISA_THUMB == 2).  Sink the selection
into the location of the definition and make DEFINE_COMPILERRT_THUMB_FUNCTION
always define a thumb function while DEFINE_COMPILERRT_FUNCTION always selects
the default.

Since the .thumb_func directive is always available (at least on Linux, Windows,
and BSD), sinking the macro right into the macro works just as well.

No functional change intended.

llvm-svn: 219182
2014-10-07 02:39:13 +00:00
Evgeniy Stepanov faef77480d [asan] Minor tweak to asan_device_setup.
Add another wait-for-device which may fix a flaky setup error.
Fix output message.

llvm-svn: 219117
2014-10-06 12:45:39 +00:00
Bob Wilson 115547464e Try harder to fix ARM/Linux after r219040.
llvm-svn: 219066
2014-10-04 20:11:10 +00:00
Bob Wilson d2f1281e6c Attempt to fix ARM/Linux after r219040.
llvm-svn: 219064
2014-10-04 18:13:41 +00:00
Steven Wu 84610ba9b3 Fix the armv7 thumb builtins on darwin
The arm builtins converted into thumb in r213481 are not working
on darwin. On apple platforms, .thumb_func directive is required
to generated correct symbols for thumb functions.

<rdar://problem/18523605>

llvm-svn: 219040
2014-10-04 00:18:59 +00:00
Dmitry Vyukov 7e1accefa2 tsan: output stats about stackdepot in memory profiler
quite amusing on some programs:
RSS 9152 MB: shadow:2456 meta:1736 file:454 mmap:3442 trace:196 heap:866 other:0 stacks=176[1065994] nthr=157/159
...
RSS 30192 MB: shadow:613 meta:5550 file:1839 mmap:20487 trace:212 heap:1489 other:0 stacks=12870[1599445] nthr=162/165
...
RSS 42232 MB: shadow:599 meta:8199 file:2304 mmap:29420 trace:213 heap:1494 other:0 stacks=17794[1690645] nthr=162/165

llvm-svn: 218988
2014-10-03 14:54:11 +00:00
Evgeniy Stepanov 0b9109c803 [asan] Support Android/x86 in asan_device_setup.
llvm-svn: 218968
2014-10-03 08:57:11 +00:00