chromiumos/third_party/compiler-rt.git
4 hours ago[lsan] Prevent inlining of WipeStack(). master
Sergey Matveev [Wed, 19 Jun 2013 15:39:13 +0000 (15:39 +0000)]
[lsan] Prevent inlining of WipeStack().

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@184312 91177308-0d34-0410-b5e6-96231b3b80d8

6 hours ago[lsan] Move symbolization and reporting out of StopTheWorld callback.
Sergey Matveev [Wed, 19 Jun 2013 14:04:11 +0000 (14:04 +0000)]
[lsan] Move symbolization and reporting out of StopTheWorld callback.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@184303 91177308-0d34-0410-b5e6-96231b3b80d8

7 hours ago[sanitizer] Fix struct ifconf definition on Mac and restore the size checks.
Evgeniy Stepanov [Wed, 19 Jun 2013 13:21:38 +0000 (13:21 +0000)]
[sanitizer] Fix struct ifconf definition on Mac and restore the size checks.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@184296 91177308-0d34-0410-b5e6-96231b3b80d8

7 hours agoWhen the compiler is not providing a clean triple, we should fail
Sylvestre Ledru [Wed, 19 Jun 2013 12:59:56 +0000 (12:59 +0000)]
When the compiler is not providing a clean triple, we should fail
the build right from the start.
For now, it is only done with DEBUGMAKE is provided. That makes
things harder to debug during ports of compiler-rt on other systems.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@184295 91177308-0d34-0410-b5e6-96231b3b80d8

8 hours ago[ASan] Delete excessive 'extern "C"' around mlock* interceptors.
Alexander Potapenko [Wed, 19 Jun 2013 11:36:51 +0000 (11:36 +0000)]
[ASan] Delete excessive 'extern "C"' around mlock* interceptors.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@184294 91177308-0d34-0410-b5e6-96231b3b80d8

9 hours ago[sanitizer] Fix Android build.
Evgeniy Stepanov [Wed, 19 Jun 2013 10:36:31 +0000 (10:36 +0000)]
[sanitizer] Fix Android build.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@184293 91177308-0d34-0410-b5e6-96231b3b80d8

11 hours ago[sanitizer] Fix build on RHEL 6.3, 6.4.
Evgeniy Stepanov [Wed, 19 Jun 2013 08:55:28 +0000 (08:55 +0000)]
[sanitizer] Fix build on RHEL 6.3, 6.4.

linux/if_ppp.h is broken in certain kernels.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@184290 91177308-0d34-0410-b5e6-96231b3b80d8

29 hours ago[asan] fix a rare failure in fast unwinder, found by asan/clang bootstrap
Kostya Serebryany [Tue, 18 Jun 2013 14:47:40 +0000 (14:47 +0000)]
[asan] fix a rare failure in fast unwinder, found by asan/clang bootstrap

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@184190 91177308-0d34-0410-b5e6-96231b3b80d8

29 hours ago[lsan] Set current_thread_tid correctly for main thread.
Sergey Matveev [Tue, 18 Jun 2013 14:44:45 +0000 (14:44 +0000)]
[lsan] Set current_thread_tid correctly for main thread.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@184189 91177308-0d34-0410-b5e6-96231b3b80d8

30 hours ago[sanitizer] Fix Android build.
Evgeniy Stepanov [Tue, 18 Jun 2013 13:56:12 +0000 (13:56 +0000)]
[sanitizer] Fix Android build.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@184187 91177308-0d34-0410-b5e6-96231b3b80d8

33 hours ago[sanitizer] Remove a set of deprecated ioctls.
Evgeniy Stepanov [Tue, 18 Jun 2013 10:37:17 +0000 (10:37 +0000)]
[sanitizer] Remove a set of deprecated ioctls.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@184185 91177308-0d34-0410-b5e6-96231b3b80d8

34 hours ago[sanitizer] Replace ext2_ ioctls with generic fs_ ioctls.
Evgeniy Stepanov [Tue, 18 Jun 2013 09:49:04 +0000 (09:49 +0000)]
[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.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@184184 91177308-0d34-0410-b5e6-96231b3b80d8

35 hours ago[sanitizer] Symbolic ioctl names.
Evgeniy Stepanov [Tue, 18 Jun 2013 09:22:24 +0000 (09:22 +0000)]
[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.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@184183 91177308-0d34-0410-b5e6-96231b3b80d8

2 days agotsan: consistently use return pc as top frame pc
Dmitry Vyukov [Mon, 17 Jun 2013 19:57:03 +0000 (19:57 +0000)]
tsan: consistently use return pc as top frame pc
always substract 1 from the top pc
this allows to get correct stacks with -O2

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@184112 91177308-0d34-0410-b5e6-96231b3b80d8

5 days agoProperly install LSan interface header, rely on sanitizer header presence in lit...
Alexey Samsonov [Fri, 14 Jun 2013 11:45:36 +0000 (11:45 +0000)]
Properly install LSan interface header, rely on sanitizer header presence in lit tests

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183977 91177308-0d34-0410-b5e6-96231b3b80d8

5 days ago[TSan] use InternalMmapVector to store fired suppressions
Alexey Samsonov [Fri, 14 Jun 2013 11:18:58 +0000 (11:18 +0000)]
[TSan] use InternalMmapVector to store fired suppressions

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183974 91177308-0d34-0410-b5e6-96231b3b80d8

5 days ago[LSan] Use a typedef for frontier vector
Alexey Samsonov [Fri, 14 Jun 2013 10:07:56 +0000 (10:07 +0000)]
[LSan] Use a typedef for frontier vector

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183973 91177308-0d34-0410-b5e6-96231b3b80d8

5 days ago[Sanitizer] Rename InternalVector to InternalMmapVector
Alexey Samsonov [Fri, 14 Jun 2013 09:59:40 +0000 (09:59 +0000)]
[Sanitizer] Rename InternalVector to InternalMmapVector

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183972 91177308-0d34-0410-b5e6-96231b3b80d8

6 days agotsan: fix Windows Go crash
Dmitry Vyukov [Thu, 13 Jun 2013 10:15:44 +0000 (10:15 +0000)]
tsan: fix Windows Go crash

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183898 91177308-0d34-0410-b5e6-96231b3b80d8

6 days ago[LSan] fix link flags for building unit tests
Alexey Samsonov [Thu, 13 Jun 2013 07:23:18 +0000 (07:23 +0000)]
[LSan] fix link flags for building unit tests

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183891 91177308-0d34-0410-b5e6-96231b3b80d8

6 days agoFix broken header guard.
Richard Trieu [Wed, 12 Jun 2013 22:37:22 +0000 (22:37 +0000)]
Fix broken header guard.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183873 91177308-0d34-0410-b5e6-96231b3b80d8

8 days ago[lsan] Harmonized some naming inconsistencies.
Sergey Matveev [Tue, 11 Jun 2013 15:26:20 +0000 (15:26 +0000)]
[lsan] Harmonized some naming inconsistencies.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183748 91177308-0d34-0410-b5e6-96231b3b80d8

8 days agotsan: add -Wno-maybe-uninitialized to Go build script
Dmitry Vyukov [Tue, 11 Jun 2013 11:44:43 +0000 (11:44 +0000)]
tsan: add -Wno-maybe-uninitialized to Go build script
this is how the rest of the codebase is built

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183738 91177308-0d34-0410-b5e6-96231b3b80d8

8 days ago[lsan] Fix the unittest makefiles.
Sergey Matveev [Tue, 11 Jun 2013 09:52:02 +0000 (09:52 +0000)]
[lsan] Fix the unittest makefiles.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183735 91177308-0d34-0410-b5e6-96231b3b80d8

8 days ago[Sanitizer] add file forgotten in r183730
Alexey Samsonov [Tue, 11 Jun 2013 08:14:24 +0000 (08:14 +0000)]
[Sanitizer] add file forgotten in r183730

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183732 91177308-0d34-0410-b5e6-96231b3b80d8

8 days ago[Sanitizer] support running external llvm-symbolizer on Mac
Alexey Samsonov [Tue, 11 Jun 2013 08:13:36 +0000 (08:13 +0000)]
[Sanitizer] support running external llvm-symbolizer on Mac

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183730 91177308-0d34-0410-b5e6-96231b3b80d8

9 days agotsan: fix lit test failures
Dmitry Vyukov [Mon, 10 Jun 2013 16:06:21 +0000 (16:06 +0000)]
tsan: fix lit test failures

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183674 91177308-0d34-0410-b5e6-96231b3b80d8

9 days agotsan: add system tests for suppressions
Dmitry Vyukov [Mon, 10 Jun 2013 15:39:28 +0000 (15:39 +0000)]
tsan: add system tests for suppressions

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183673 91177308-0d34-0410-b5e6-96231b3b80d8

9 days agotsan: allows to suppress races on global variables
Dmitry Vyukov [Mon, 10 Jun 2013 15:38:44 +0000 (15:38 +0000)]
tsan: allows to suppress races on global variables

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183672 91177308-0d34-0410-b5e6-96231b3b80d8

9 days ago[ASan] Fix unset-insert-libraries-on-exec.cc on 32-bit Darwin.
Alexander Potapenko [Mon, 10 Jun 2013 14:47:43 +0000 (14:47 +0000)]
[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.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183662 91177308-0d34-0410-b5e6-96231b3b80d8

9 days ago[ASan] mark ioctl test as xfailing on darwin. remove redundant semicolons
Alexey Samsonov [Mon, 10 Jun 2013 14:17:08 +0000 (14:17 +0000)]
[ASan] mark ioctl test as xfailing on darwin. remove redundant semicolons

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183655 91177308-0d34-0410-b5e6-96231b3b80d8

9 days ago[asan] fix Android build (mark asan_malloc_usable_size as an interface function)
Kostya Serebryany [Mon, 10 Jun 2013 13:28:33 +0000 (13:28 +0000)]
[asan] fix Android build (mark asan_malloc_usable_size as an interface function)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183651 91177308-0d34-0410-b5e6-96231b3b80d8

9 days agotsan: disable getaddrinfo() interceptor for tsan (causes recursion)
Dmitry Vyukov [Mon, 10 Jun 2013 11:35:08 +0000 (11:35 +0000)]
tsan: disable getaddrinfo() interceptor for tsan (causes recursion)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183649 91177308-0d34-0410-b5e6-96231b3b80d8

9 days agotsan: fix merge bug
Dmitry Vyukov [Mon, 10 Jun 2013 11:11:29 +0000 (11:11 +0000)]
tsan: fix merge bug

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183648 91177308-0d34-0410-b5e6-96231b3b80d8

9 days ago[asan] fix the bug with memalign and malloc_usable_size (http://code.google.com/p...
Kostya Serebryany [Mon, 10 Jun 2013 10:46:27 +0000 (10:46 +0000)]
[asan] fix the bug with memalign and malloc_usable_size (code.google.com/p/address-sanitizer/issues/detail?id=193); also fix lint

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183647 91177308-0d34-0410-b5e6-96231b3b80d8

9 days agotsan: fix windows crash (incorrect stack boundaries)
Dmitry Vyukov [Mon, 10 Jun 2013 10:30:54 +0000 (10:30 +0000)]
tsan: fix windows crash (incorrect stack boundaries)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183646 91177308-0d34-0410-b5e6-96231b3b80d8

9 days agotsan: fix old gcc warnings
Dmitry Vyukov [Mon, 10 Jun 2013 10:30:19 +0000 (10:30 +0000)]
tsan: fix old gcc warnings

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183645 91177308-0d34-0410-b5e6-96231b3b80d8

9 days agotsan: fix windows mingw build
Dmitry Vyukov [Mon, 10 Jun 2013 10:02:02 +0000 (10:02 +0000)]
tsan: fix windows mingw build

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183644 91177308-0d34-0410-b5e6-96231b3b80d8

9 days agotsan: more detailed trace for atomic operations (include address and memory ordering)
Dmitry Vyukov [Mon, 10 Jun 2013 10:01:31 +0000 (10:01 +0000)]
tsan: more detailed trace for atomic operations (include address and memory ordering)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183643 91177308-0d34-0410-b5e6-96231b3b80d8

9 days agotsan: fix lint warnings
Dmitry Vyukov [Mon, 10 Jun 2013 10:00:54 +0000 (10:00 +0000)]
tsan: fix lint warnings

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183642 91177308-0d34-0410-b5e6-96231b3b80d8

9 days ago[MSan] don't add msan unit tests to check-msan command if libcxx is not checked out
Alexey Samsonov [Mon, 10 Jun 2013 09:09:40 +0000 (09:09 +0000)]
[MSan] don't add msan unit tests to check-msan command if libcxx is not checked out

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183641 91177308-0d34-0410-b5e6-96231b3b80d8

9 days ago[ASan] don't use -m{32,64} flag in test case, as it can be run in both 32- and 64...
Alexey Samsonov [Mon, 10 Jun 2013 07:55:12 +0000 (07:55 +0000)]
[ASan] don't use -m{32,64} flag in test case, as it can be run in both 32- and 64-bit modes

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183638 91177308-0d34-0410-b5e6-96231b3b80d8

12 days agoReverting r183529:
Bill Wendling [Fri, 7 Jun 2013 20:28:29 +0000 (20:28 +0000)]
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]
                                                        ^~~~~~~~~~~~~~~

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183557 91177308-0d34-0410-b5e6-96231b3b80d8

12 days ago[sanitizer] Handle SIOCGIFCONF ioctl.
Evgeniy Stepanov [Fri, 7 Jun 2013 15:49:38 +0000 (15:49 +0000)]
[sanitizer] Handle SIOCGIFCONF ioctl.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183529 91177308-0d34-0410-b5e6-96231b3b80d8

12 days ago[ASan] fix test case to use absolute paths
Alexey Samsonov [Fri, 7 Jun 2013 15:44:21 +0000 (15:44 +0000)]
[ASan] fix test case to use absolute paths

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183527 91177308-0d34-0410-b5e6-96231b3b80d8

12 days ago[ASan] An early return from InitializeAsanInterceptors() on Mac has been considered...
Alexander Potapenko [Fri, 7 Jun 2013 15:10:02 +0000 (15:10 +0000)]
[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.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183524 91177308-0d34-0410-b5e6-96231b3b80d8

12 days ago[sanitizer] Fix Android build.
Evgeniy Stepanov [Fri, 7 Jun 2013 14:56:54 +0000 (14:56 +0000)]
[sanitizer] Fix Android build.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183523 91177308-0d34-0410-b5e6-96231b3b80d8

12 days ago[sanitizer] Fix windows build.
Evgeniy Stepanov [Fri, 7 Jun 2013 13:19:33 +0000 (13:19 +0000)]
[sanitizer] Fix windows build.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183518 91177308-0d34-0410-b5e6-96231b3b80d8

12 days ago[sanitizer] ioctl interceptor.
Evgeniy Stepanov [Fri, 7 Jun 2013 13:00:47 +0000 (13:00 +0000)]
[sanitizer] ioctl interceptor.

ASan: disabled by default
MSan: enabled by default
TSan: disabled

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183517 91177308-0d34-0410-b5e6-96231b3b80d8

12 days agoDrop support for 32-bit PowerPC in sanitizer tools.
Alexey Samsonov [Fri, 7 Jun 2013 09:44:43 +0000 (09:44 +0000)]
Drop support for 32-bit PowerPC in sanitizer tools.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183499 91177308-0d34-0410-b5e6-96231b3b80d8

12 days ago[ASan] create separate configs for running ASan lit tests in both 32- and 64-bit...
Alexey Samsonov [Fri, 7 Jun 2013 09:38:55 +0000 (09:38 +0000)]
[ASan] create separate configs for running ASan lit tests in both 32- and 64-bit mode. Clean up RUN-lines in tests.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183498 91177308-0d34-0410-b5e6-96231b3b80d8

13 days ago[lsan] Put SANITIZER_INTERFACE_ATTRIBUTE on LSan interface functions.
Sergey Matveev [Thu, 6 Jun 2013 18:40:55 +0000 (18:40 +0000)]
[lsan] Put SANITIZER_INTERFACE_ATTRIBUTE on LSan interface functions.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183429 91177308-0d34-0410-b5e6-96231b3b80d8

13 days agotsan: use memory access size for Go after all
Dmitry Vyukov [Thu, 6 Jun 2013 14:31:15 +0000 (14:31 +0000)]
tsan: use memory access size for Go after all
helps to make range access functions correct and fast

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183418 91177308-0d34-0410-b5e6-96231b3b80d8

13 days ago[sanitizer] Do not fall back to SlowUnwindStack() in GetStackTrace()
Sergey Matveev [Thu, 6 Jun 2013 14:19:36 +0000 (14:19 +0000)]
[sanitizer] Do not fall back to SlowUnwindStack() in GetStackTrace()

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183414 91177308-0d34-0410-b5e6-96231b3b80d8

13 days ago[lsan] Implement __lsan_ignore_object().
Sergey Matveev [Thu, 6 Jun 2013 14:17:56 +0000 (14:17 +0000)]
[lsan] Implement __lsan_ignore_object().

Leak annotation similar to HeapChecker's IgnoreObject().

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183412 91177308-0d34-0410-b5e6-96231b3b80d8

13 days ago[ASan] make pthread_getschedparam test more robust
Alexey Samsonov [Thu, 6 Jun 2013 14:08:40 +0000 (14:08 +0000)]
[ASan] make pthread_getschedparam test more robust

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183411 91177308-0d34-0410-b5e6-96231b3b80d8

13 days agoSimplify lit configs for asan/lsan/msan unit tests
Alexey Samsonov [Thu, 6 Jun 2013 13:48:20 +0000 (13:48 +0000)]
Simplify lit configs for asan/lsan/msan unit tests

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183410 91177308-0d34-0410-b5e6-96231b3b80d8

13 days agotsan: always strip bottom frame in Go reports
Dmitry Vyukov [Thu, 6 Jun 2013 13:31:35 +0000 (13:31 +0000)]
tsan: always strip bottom frame in Go reports

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183408 91177308-0d34-0410-b5e6-96231b3b80d8

13 days agoRemove a bunch of copy-paste: use common config for sanitizer lit/unit tests
Alexey Samsonov [Thu, 6 Jun 2013 13:28:37 +0000 (13:28 +0000)]
Remove a bunch of copy-paste: use common config for sanitizer lit/unit tests

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183407 91177308-0d34-0410-b5e6-96231b3b80d8

13 days agotsan: fix darwin Go crashes
Dmitry Vyukov [Thu, 6 Jun 2013 13:20:40 +0000 (13:20 +0000)]
tsan: fix darwin Go crashes

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183405 91177308-0d34-0410-b5e6-96231b3b80d8

13 days agotsan: fix darwin Go build
Dmitry Vyukov [Thu, 6 Jun 2013 13:00:32 +0000 (13:00 +0000)]
tsan: fix darwin Go build

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183402 91177308-0d34-0410-b5e6-96231b3b80d8

13 days ago[ASan] create common autogenerated config for running compiler-rt unit tests, and...
Alexey Samsonov [Thu, 6 Jun 2013 12:48:20 +0000 (12:48 +0000)]
[ASan] create common autogenerated config for running compiler-rt unit tests, and use it in ASan

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183401 91177308-0d34-0410-b5e6-96231b3b80d8

13 days ago[ASan] lit tests: create common autogenerated config for running compiler-rt lit...
Alexey Samsonov [Thu, 6 Jun 2013 12:35:48 +0000 (12:35 +0000)]
[ASan] lit tests: create common autogenerated config for running compiler-rt lit tests, and use it in ASan

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183400 91177308-0d34-0410-b5e6-96231b3b80d8

13 days ago[ASan] move all lit_tests under TestCases
Alexey Samsonov [Thu, 6 Jun 2013 09:23:34 +0000 (09:23 +0000)]
[ASan] move all lit_tests under TestCases

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183395 91177308-0d34-0410-b5e6-96231b3b80d8

13 days ago[LSan] remove unneeded empty directory
Alexey Samsonov [Thu, 6 Jun 2013 09:07:42 +0000 (09:07 +0000)]
[LSan] remove unneeded empty directory

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183392 91177308-0d34-0410-b5e6-96231b3b80d8

13 days ago[ASan] Add a few tests for use-after-scope mode
Alexey Samsonov [Thu, 6 Jun 2013 08:30:26 +0000 (08:30 +0000)]
[ASan] Add a few tests for use-after-scope mode

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183391 91177308-0d34-0410-b5e6-96231b3b80d8

13 days ago[ASan] One more fix for realloc: check that reallocated chunk is valid before calling...
Alexey Samsonov [Thu, 6 Jun 2013 08:25:31 +0000 (08:25 +0000)]
[ASan] One more fix for realloc: check that reallocated chunk is valid before calling memcpy

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183390 91177308-0d34-0410-b5e6-96231b3b80d8

13 days ago[ASan] make free_hook_realloc test more robust
Alexey Samsonov [Thu, 6 Jun 2013 07:58:00 +0000 (07:58 +0000)]
[ASan] make free_hook_realloc test more robust

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183387 91177308-0d34-0410-b5e6-96231b3b80d8

2 weeks ago[sanitizer] Fix windows build.
Evgeniy Stepanov [Tue, 4 Jun 2013 14:06:16 +0000 (14:06 +0000)]
[sanitizer] Fix windows build.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183225 91177308-0d34-0410-b5e6-96231b3b80d8

2 weeks ago[sanitizer] Fix __sanitizer_unaligned_* to work with unaligned data types.
Evgeniy Stepanov [Tue, 4 Jun 2013 13:49:10 +0000 (13:49 +0000)]
[sanitizer] Fix __sanitizer_unaligned_* to work with unaligned data types.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183224 91177308-0d34-0410-b5e6-96231b3b80d8

2 weeks ago[msan] Implement __sanitizer_unaligned_*.
Evgeniy Stepanov [Tue, 4 Jun 2013 13:08:36 +0000 (13:08 +0000)]
[msan] Implement __sanitizer_unaligned_*.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183221 91177308-0d34-0410-b5e6-96231b3b80d8

2 weeks agoCall __asan_free_hook() before marking the chunk quarantinned
Alexey Samsonov [Tue, 4 Jun 2013 12:19:31 +0000 (12:19 +0000)]
Call __asan_free_hook() before marking the chunk quarantinned

Summary:
With this change, the user may safely call __asan_get_ownership()
from malloc/free hooks and assume it would return "true". If there is a
realloc/free race, free hook might be called twice, but I think it's acceptable,
as it's a data race and would later be reported anyway.

This change also fixes a bug when failing realloc incorrectly marked the
original memory as "quarantinned".

Reviewers: timurrrr, kcc, samsonov

Reviewed By: samsonov

CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D913

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183220 91177308-0d34-0410-b5e6-96231b3b80d8

2 weeks ago[asan] Fix invalid thread registry access when checking if LSan is disabled.
Sergey Matveev [Tue, 4 Jun 2013 10:39:24 +0000 (10:39 +0000)]
[asan] Fix invalid thread registry access when checking if LSan is disabled.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183218 91177308-0d34-0410-b5e6-96231b3b80d8

2 weeks agoFix ALIGNED misuse in asan_thread.cc (built on all platforms); also, add a comment...
Timur Iskhodzhanov [Tue, 4 Jun 2013 08:25:17 +0000 (08:25 +0000)]
Fix ALIGNED misuse in asan_thread.cc (built on all platforms); also, add a comment to the ALIGNED macro describing the correct usage

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183214 91177308-0d34-0410-b5e6-96231b3b80d8

2 weeks ago[asan] ASan Linux MIPS32 support (compiler-rt part), patch by Jyun-Yan Y
Kostya Serebryany [Mon, 3 Jun 2013 14:49:25 +0000 (14:49 +0000)]
[asan] ASan Linux MIPS32 support (compiler-rt part), patch by Jyun-Yan Y

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183105 91177308-0d34-0410-b5e6-96231b3b80d8

2 weeks ago[lsan] Add __lsan_disable() and __lsan_enable().
Sergey Matveev [Mon, 3 Jun 2013 11:21:34 +0000 (11:21 +0000)]
[lsan] Add __lsan_disable() and __lsan_enable().

Objects allocated after a call to __lsan_disable() will be treated as
live memory. Also add a ScopedDisabler.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183099 91177308-0d34-0410-b5e6-96231b3b80d8

2 weeks ago[sanitizer] Fix kThreadDescriptorSize for glibc <= 2.11.
Sergey Matveev [Mon, 3 Jun 2013 10:20:23 +0000 (10:20 +0000)]
[sanitizer] Fix kThreadDescriptorSize for glibc <= 2.11.

Address issue reported by Greg Fitzgerald.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183098 91177308-0d34-0410-b5e6-96231b3b80d8

2 weeks ago[ASan] Do not buffer stdin in asan_symbolize.py
Alexander Potapenko [Fri, 31 May 2013 14:55:06 +0000 (14:55 +0000)]
[ASan] Do not buffer stdin in asan_symbolize.py

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183006 91177308-0d34-0410-b5e6-96231b3b80d8

2 weeks ago[lsan] Added a dummy unittest to suppress LIT warnings.
Sergey Matveev [Fri, 31 May 2013 14:15:54 +0000 (14:15 +0000)]
[lsan] Added a dummy unittest to suppress LIT warnings.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183004 91177308-0d34-0410-b5e6-96231b3b80d8

2 weeks ago[lsan] Run the leak detection tests under both ASan and LSan.
Sergey Matveev [Fri, 31 May 2013 13:13:55 +0000 (13:13 +0000)]
[lsan] Run the leak detection tests under both ASan and LSan.

Change the LSan lit test logic. Now "check-lsan" tests the leak
checking functionality in both standalone LSan and ASan.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183000 91177308-0d34-0410-b5e6-96231b3b80d8

2 weeks ago[msan] Fix gcc build of msan runtime.
Evgeniy Stepanov [Fri, 31 May 2013 13:04:07 +0000 (13:04 +0000)]
[msan] Fix gcc build of msan runtime.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182999 91177308-0d34-0410-b5e6-96231b3b80d8

2 weeks ago[msan] Handle mixed track-origins and keep-going settings (compiler-rt part).
Evgeniy Stepanov [Fri, 31 May 2013 12:04:08 +0000 (12:04 +0000)]
[msan] Handle mixed track-origins and keep-going settings (compiler-rt part).

Before this change, each module defined a weak_odr global __msan_track_origins
with a value of 1 if origin tracking is enabled, 0 if disabled. If there are
modules with different values, any of them may win. If 0 wins, and there is at
least one module with 1, the program will most likely crash.

With this change, __msan_track_origins is only emitted if origin tracking is
on. Then runtime library detects if there is at least one module with origin
tracking, and enables runtime support for it.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182996 91177308-0d34-0410-b5e6-96231b3b80d8

2 weeks ago[sanitizer] Fix r182994 - update test.
Sergey Matveev [Fri, 31 May 2013 11:33:21 +0000 (11:33 +0000)]
[sanitizer] Fix r182994 - update test.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182995 91177308-0d34-0410-b5e6-96231b3b80d8

2 weeks ago[lsan] Use the fast version of GetBlockBegin for leak checking in LSan and ASan.
Sergey Matveev [Fri, 31 May 2013 11:13:45 +0000 (11:13 +0000)]
[lsan] Use the fast version of GetBlockBegin for leak checking in LSan and ASan.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182994 91177308-0d34-0410-b5e6-96231b3b80d8

2 weeks ago[sanitizer] Fix wrong size of addrinfo::ai_addrlen.
Evgeniy Stepanov [Fri, 31 May 2013 10:46:51 +0000 (10:46 +0000)]
[sanitizer] Fix wrong size of addrinfo::ai_addrlen.

Add compile time tests for sizes and offsets of all sanitizer-posix types.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182993 91177308-0d34-0410-b5e6-96231b3b80d8

2 weeks ago[asan] workaround for the quemu bug in proc maps (http://code.google.com/p/address...
Kostya Serebryany [Thu, 30 May 2013 11:00:08 +0000 (11:00 +0000)]
[asan] workaround for the quemu bug in proc maps (code.google.com/p/address-sanitizer/issues/detail?id=160)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182922 91177308-0d34-0410-b5e6-96231b3b80d8

2 weeks agoFix #if guards in sanitizer_common code
Alexey Samsonov [Thu, 30 May 2013 09:16:04 +0000 (09:16 +0000)]
Fix #if guards in sanitizer_common code

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182918 91177308-0d34-0410-b5e6-96231b3b80d8

2 weeks ago[sanitizer] introduce LargeMmapAllocator::GetBlockBeginFastSingleThreaded, required...
Kostya Serebryany [Thu, 30 May 2013 08:43:30 +0000 (08:43 +0000)]
[sanitizer] introduce LargeMmapAllocator::GetBlockBeginFastSingleThreaded, required for LeakSanitizer to work faster. Also fix lint.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182917 91177308-0d34-0410-b5e6-96231b3b80d8

2 weeks ago[ASan] Minor cleanup: remove a couple of unused variables.
Alexander Potapenko [Thu, 30 May 2013 07:30:07 +0000 (07:30 +0000)]
[ASan] Minor cleanup: remove a couple of unused variables.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182915 91177308-0d34-0410-b5e6-96231b3b80d8

3 weeks agoReplaced 'bool .* = 0;' with '... = false;'
Timur Iskhodzhanov [Wed, 29 May 2013 17:26:25 +0000 (17:26 +0000)]
Replaced 'bool .* = 0;' with '... = false;'

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182868 91177308-0d34-0410-b5e6-96231b3b80d8

3 weeks ago[asan] Fix r182858.
Sergey Matveev [Wed, 29 May 2013 15:31:52 +0000 (15:31 +0000)]
[asan] Fix r182858.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182862 91177308-0d34-0410-b5e6-96231b3b80d8

3 weeks ago[asan] Fix r182854: run the unpoison_tls test only on Linux.
Sergey Matveev [Wed, 29 May 2013 14:37:04 +0000 (14:37 +0000)]
[asan] Fix r182854: run the unpoison_tls test only on Linux.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182858 91177308-0d34-0410-b5e6-96231b3b80d8

3 weeks agoFix MSVC W3 compiler warnings
Timur Iskhodzhanov [Wed, 29 May 2013 14:11:44 +0000 (14:11 +0000)]
Fix MSVC W3 compiler warnings

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182857 91177308-0d34-0410-b5e6-96231b3b80d8

3 weeks ago[asan] Make ASan report the correct thread address ranges to LSan.
Sergey Matveev [Wed, 29 May 2013 13:09:44 +0000 (13:09 +0000)]
[asan] Make ASan report the correct thread address ranges to LSan.

This CL enables thread support in LSan when used on top of ASan.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182854 91177308-0d34-0410-b5e6-96231b3b80d8

3 weeks ago[sanitizer] Change the way GetThreadStackAndTls() obtains the thread descriptor address.
Sergey Matveev [Wed, 29 May 2013 13:07:42 +0000 (13:07 +0000)]
[sanitizer] Change the way GetThreadStackAndTls() obtains the thread descriptor address.

Instead of using arch_prctl(ARCH_GET_FS), read the address from the
tread descriptor itself. This lets us avoid sandboxing issues. Also,
GetThreadStackAndTls() can now be implemented on i386.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182853 91177308-0d34-0410-b5e6-96231b3b80d8

3 weeks ago[sanitizer] Fix getaddrinfo interceptor to use the actual returned sockaddr size.
Evgeniy Stepanov [Wed, 29 May 2013 12:33:31 +0000 (12:33 +0000)]
[sanitizer] Fix getaddrinfo interceptor to use the actual returned sockaddr size.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182852 91177308-0d34-0410-b5e6-96231b3b80d8

3 weeks ago[nolibc] Unweak SymbolizerPrepareForSandboxing and move it to libc-independent part.
Peter Collingbourne [Wed, 29 May 2013 12:11:43 +0000 (12:11 +0000)]
[nolibc] Unweak SymbolizerPrepareForSandboxing and move it to libc-independent part.

Fixes the Go build.

Differential Revision: http://llvm-reviews.chandlerc.com/D877

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182851 91177308-0d34-0410-b5e6-96231b3b80d8

3 weeks agoFix MSVC warnings at the -W2 level
Timur Iskhodzhanov [Wed, 29 May 2013 12:03:49 +0000 (12:03 +0000)]
Fix MSVC warnings at the -W2 level

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182848 91177308-0d34-0410-b5e6-96231b3b80d8

3 weeks ago[sanitizer] Fix Mac build.
Evgeniy Stepanov [Wed, 29 May 2013 11:55:27 +0000 (11:55 +0000)]
[sanitizer] Fix Mac build.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182845 91177308-0d34-0410-b5e6-96231b3b80d8

3 weeks ago[sanitizer] Intercept getpeername.
Evgeniy Stepanov [Wed, 29 May 2013 11:49:25 +0000 (11:49 +0000)]
[sanitizer] Intercept getpeername.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182844 91177308-0d34-0410-b5e6-96231b3b80d8