Commit Graph

2472 Commits

Author SHA1 Message Date
Kostya Serebryany 63d84f8149 [asan] fix a rare failure in fast unwinder, found by asan/clang bootstrap
llvm-svn: 184190
2013-06-18 14:47:40 +00:00
Sergey Matveev 2717e7be06 [lsan] Set current_thread_tid correctly for main thread.
llvm-svn: 184189
2013-06-18 14:44:45 +00:00
Evgeniy Stepanov 394b09b00f [sanitizer] Fix Android build.
llvm-svn: 184187
2013-06-18 13:56:12 +00:00
Evgeniy Stepanov fc3f61fcf0 [sanitizer] Remove a set of deprecated ioctls.
llvm-svn: 184185
2013-06-18 10:37:17 +00:00
Evgeniy Stepanov b9c1020696 [sanitizer] Replace ext2_ ioctls with generic fs_ ioctls.
They are actually the same, but ext2_fs.h header is not available in userspace
with newer kernels.

llvm-svn: 184184
2013-06-18 09:49:04 +00:00
Evgeniy Stepanov 8fa046e288 [sanitizer] Symbolic ioctl names.
Replace hardcoded ioctl request ids with symbolic names.
Disable certain ioctls on platforms where such names are not found in the
system headers.
Fix a bug in ioctl_lookup.
Reenable ioctl test on Mac.

llvm-svn: 184183
2013-06-18 09:22:24 +00:00
Dmitry Vyukov 5cf581a8d4 tsan: consistently use return pc as top frame pc
always substract 1 from the top pc
this allows to get correct stacks with -O2

llvm-svn: 184112
2013-06-17 19:57:03 +00:00
Alexey Samsonov 7e325fb477 Properly install LSan interface header, rely on sanitizer header presence in lit tests
llvm-svn: 183977
2013-06-14 11:45:36 +00:00
Alexey Samsonov 0d7012debb [TSan] use InternalMmapVector to store fired suppressions
llvm-svn: 183974
2013-06-14 11:18:58 +00:00
Alexey Samsonov bd0428b81a [LSan] Use a typedef for frontier vector
llvm-svn: 183973
2013-06-14 10:07:56 +00:00
Alexey Samsonov b0d92b3312 [Sanitizer] Rename InternalVector to InternalMmapVector
llvm-svn: 183972
2013-06-14 09:59:40 +00:00
Dmitry Vyukov 26daccaddb tsan: fix Windows Go crash
llvm-svn: 183898
2013-06-13 10:15:44 +00:00
Alexey Samsonov 5e520c5e09 [LSan] fix link flags for building unit tests
llvm-svn: 183891
2013-06-13 07:23:18 +00:00
Richard Trieu 5685aa6845 Fix broken header guard.
llvm-svn: 183873
2013-06-12 22:37:22 +00:00
Sergey Matveev 978460c12c [lsan] Harmonized some naming inconsistencies.
llvm-svn: 183748
2013-06-11 15:26:20 +00:00
Dmitry Vyukov a8570d38fe tsan: add -Wno-maybe-uninitialized to Go build script
this is how the rest of the codebase is built

llvm-svn: 183738
2013-06-11 11:44:43 +00:00
Sergey Matveev 5129c5e56f [lsan] Fix the unittest makefiles.
llvm-svn: 183735
2013-06-11 09:52:02 +00:00
Alexey Samsonov bc1c6714f2 [Sanitizer] add file forgotten in r183730
llvm-svn: 183732
2013-06-11 08:14:24 +00:00
Alexey Samsonov c8e7364763 [Sanitizer] support running external llvm-symbolizer on Mac
llvm-svn: 183730
2013-06-11 08:13:36 +00:00
Dmitry Vyukov 79de34f75c tsan: fix lit test failures
llvm-svn: 183674
2013-06-10 16:06:21 +00:00
Dmitry Vyukov b08e72913a tsan: add system tests for suppressions
llvm-svn: 183673
2013-06-10 15:39:28 +00:00
Dmitry Vyukov 315bb0e687 tsan: allows to suppress races on global variables
llvm-svn: 183672
2013-06-10 15:38:44 +00:00
Alexander Potapenko 152f7edf24 [ASan] Fix unset-insert-libraries-on-exec.cc on 32-bit Darwin.
The test used to execute a 64-bit /bin/bash binary and preload a 32-bit dynamic library into it.
Now the arch-specific version of echo-env is executed instead.

llvm-svn: 183662
2013-06-10 14:47:43 +00:00
Alexey Samsonov f67191b4c3 [ASan] mark ioctl test as xfailing on darwin. remove redundant semicolons
llvm-svn: 183655
2013-06-10 14:17:08 +00:00
Kostya Serebryany 02062becea [asan] fix Android build (mark asan_malloc_usable_size as an interface function)
llvm-svn: 183651
2013-06-10 13:28:33 +00:00
Dmitry Vyukov b19a26b852 tsan: disable getaddrinfo() interceptor for tsan (causes recursion)
llvm-svn: 183649
2013-06-10 11:35:08 +00:00
Dmitry Vyukov 7e4a18c4fb tsan: fix merge bug
llvm-svn: 183648
2013-06-10 11:11:29 +00:00
Kostya Serebryany e71982d589 [asan] fix the bug with memalign and malloc_usable_size (http://code.google.com/p/address-sanitizer/issues/detail?id=193); also fix lint
llvm-svn: 183647
2013-06-10 10:46:27 +00:00
Dmitry Vyukov b278f1235f tsan: fix windows crash (incorrect stack boundaries)
llvm-svn: 183646
2013-06-10 10:30:54 +00:00
Dmitry Vyukov ddb0294dd8 tsan: fix old gcc warnings
llvm-svn: 183645
2013-06-10 10:30:19 +00:00
Dmitry Vyukov e979c5467c tsan: fix windows mingw build
llvm-svn: 183644
2013-06-10 10:02:02 +00:00
Dmitry Vyukov 8794772337 tsan: more detailed trace for atomic operations (include address and memory ordering)
llvm-svn: 183643
2013-06-10 10:01:31 +00:00
Dmitry Vyukov 50ef53ebfc tsan: fix lint warnings
llvm-svn: 183642
2013-06-10 10:00:54 +00:00
Alexey Samsonov dd489a4e15 [MSan] don't add msan unit tests to check-msan command if libcxx is not checked out
llvm-svn: 183641
2013-06-10 09:09:40 +00:00
Alexey Samsonov 4c0ea93725 [ASan] don't use -m{32,64} flag in test case, as it can be run in both 32- and 64-bit modes
llvm-svn: 183638
2013-06-10 07:55:12 +00:00
Bill Wendling 658fb53b7e Reverting r183529:
This is causing the following error on Darwin:

/Volumes/Sandbox/llvm-clean.src/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc:282:1: error: 'assertion_failed__282' declared as an array with a negative size
CHECK_TYPE_SIZE(ifconf);
^~~~~~~~~~~~~~~~~~~~~~~
/Volumes/Sandbox/llvm-clean.src/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc:223:3: note: expanded from macro 'CHECK_TYPE_SIZE'
  COMPILER_CHECK(sizeof(__sanitizer_##TYPE) == sizeof(TYPE))
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Volumes/Sandbox/llvm-clean.src/projects/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h:239:30: note: expanded from macro 'COMPILER_CHECK'
#define COMPILER_CHECK(pred) IMPL_COMPILER_ASSERT(pred, __LINE__)
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Volumes/Sandbox/llvm-clean.src/projects/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h:245:57: note: expanded from macro 'IMPL_COMPILER_ASSERT'
    typedef char IMPL_PASTE(assertion_failed_##_, line)[2*(int)(pred)-1]
                                                        ^~~~~~~~~~~~~~~
/Volumes/Sandbox/llvm-clean.src/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc:284:1: error: 'assertion_failed__284' declared as an array with a negative size
CHECK_SIZE_AND_OFFSET(ifconf, ifc_ifcu);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Volumes/Sandbox/llvm-clean.src/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc:228:3: note: expanded from macro 'CHECK_SIZE_AND_OFFSET'
  COMPILER_CHECK(offsetof(__sanitizer_##CLASS, MEMBER) ==          \
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Volumes/Sandbox/llvm-clean.src/projects/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h:239:30: note: expanded from macro 'COMPILER_CHECK'
#define COMPILER_CHECK(pred) IMPL_COMPILER_ASSERT(pred, __LINE__)
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Volumes/Sandbox/llvm-clean.src/projects/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h:245:57: note: expanded from macro 'IMPL_COMPILER_ASSERT'
    typedef char IMPL_PASTE(assertion_failed_##_, line)[2*(int)(pred)-1]
                                                        ^~~~~~~~~~~~~~~

llvm-svn: 183557
2013-06-07 20:28:29 +00:00
Evgeniy Stepanov cead69d4a3 [sanitizer] Handle SIOCGIFCONF ioctl.
llvm-svn: 183529
2013-06-07 15:49:38 +00:00
Alexey Samsonov 4fdf8d66a9 [ASan] fix test case to use absolute paths
llvm-svn: 183527
2013-06-07 15:44:21 +00:00
Alexander Potapenko 6af3fce55e [ASan] An early return from InitializeAsanInterceptors() on Mac has been considered unobvious.
Remove it and replace ASAN_INTERCEPT_FUNC with a no-op if SANITIZER_MAC==1.

llvm-svn: 183524
2013-06-07 15:10:02 +00:00
Evgeniy Stepanov c24e13e7bb [sanitizer] Fix Android build.
llvm-svn: 183523
2013-06-07 14:56:54 +00:00
Evgeniy Stepanov 74dcb1a8de [sanitizer] Fix windows build.
llvm-svn: 183518
2013-06-07 13:19:33 +00:00
Evgeniy Stepanov 0b1f41b6f4 [sanitizer] ioctl interceptor.
ASan: disabled by default
MSan: enabled by default
TSan: disabled
llvm-svn: 183517
2013-06-07 13:00:47 +00:00
Alexey Samsonov 575c599554 Drop support for 32-bit PowerPC in sanitizer tools.
llvm-svn: 183499
2013-06-07 09:44:43 +00:00
Alexey Samsonov 889e3ab83c [ASan] create separate configs for running ASan lit tests in both 32- and 64-bit mode. Clean up RUN-lines in tests.
llvm-svn: 183498
2013-06-07 09:38:55 +00:00
Sergey Matveev 1c4e214c32 [lsan] Put SANITIZER_INTERFACE_ATTRIBUTE on LSan interface functions.
llvm-svn: 183429
2013-06-06 18:40:55 +00:00
Dmitry Vyukov 0fffc0088c tsan: use memory access size for Go after all
helps to make range access functions correct and fast

llvm-svn: 183418
2013-06-06 14:31:15 +00:00
Sergey Matveev db356560fc [sanitizer] Do not fall back to SlowUnwindStack() in GetStackTrace()
llvm-svn: 183414
2013-06-06 14:19:36 +00:00
Sergey Matveev ecc4f5ba8e [lsan] Implement __lsan_ignore_object().
Leak annotation similar to HeapChecker's IgnoreObject().

llvm-svn: 183412
2013-06-06 14:17:56 +00:00
Alexey Samsonov e674320ade [ASan] make pthread_getschedparam test more robust
llvm-svn: 183411
2013-06-06 14:08:40 +00:00
Alexey Samsonov f6630ecee9 Simplify lit configs for asan/lsan/msan unit tests
llvm-svn: 183410
2013-06-06 13:48:20 +00:00