Sergey Matveev
7159b2a382
[asan] LSan hooks in asan_allocator2.cc
...
llvm-svn: 182379
2013-05-21 13:46:41 +00:00
Sergey Matveev
65dd62abe5
[asan] LSan hooks in asan_thread.cc
...
llvm-svn: 182378
2013-05-21 13:40:13 +00:00
Sergey Matveev
aa0b45a094
[lsan] LSan in LD_PRELOAD library form.
...
llvm-svn: 182376
2013-05-21 12:49:33 +00:00
Alexey Samsonov
73565f7f5d
[Sanitizer] Print verbose warning if symbolizer can't read /proc/self/exe for some reason
...
llvm-svn: 182374
2013-05-21 12:22:36 +00:00
Peter Collingbourne
c787d42f40
[nolibc] Move symbolizer to RTSanitizerCommonLibc, and make it optional using a weak symbol.
...
llvm-svn: 182372
2013-05-21 12:08:37 +00:00
Peter Collingbourne
fa8aa4105c
[nolibc] Move stoptheworld to RTSanitizerCommonLibc.
...
llvm-svn: 182369
2013-05-21 11:38:39 +00:00
Peter Collingbourne
8575195772
[nolibc] Move libc-dependent sanitizer_posix.cc code to sanitizer_posix_libcdep.cc.
...
llvm-svn: 182366
2013-05-21 10:27:07 +00:00
Alexey Samsonov
3677b18388
[ASan] Mark init-order test as XFAIL on Darwin
...
llvm-svn: 182365
2013-05-21 10:11:17 +00:00
Alexey Samsonov
af456d0c40
[ASan] Don't run fast unwinder tests on 32-bit Linux as fast unwinder may be unexpectedly smart on some hosts
...
llvm-svn: 182363
2013-05-21 09:35:48 +00:00
Evgeniy Stepanov
4059d778d1
[sanitizer] Enable pthread_getschedparam interceptor on Android.
...
llvm-svn: 182361
2013-05-21 09:01:23 +00:00
Alexey Samsonov
1c26f007ed
[ASan] Mark some tests as working only on x86_64 and i386 arches
...
llvm-svn: 182360
2013-05-21 09:01:13 +00:00
Evgeniy Stepanov
1d2f22825d
[msan] Replace GetArgv hack with something that is slightly better.
...
llvm-svn: 182359
2013-05-21 08:56:22 +00:00
Alexey Samsonov
4ca93997f7
Add lit config feature <target>-supported-target to mark target-specific tests
...
llvm-svn: 182355
2013-05-21 08:22:03 +00:00
Dmitry Vyukov
536bff3396
tsan: detect when a thread ends with ignores enabled
...
llvm-svn: 182354
2013-05-21 08:12:35 +00:00
Evgeniy Stepanov
970be35808
[sanitizer] Intercept pthread_getschedparam.
...
llvm-svn: 182353
2013-05-21 08:12:08 +00:00
Kostya Serebryany
b1333fe831
[sanitizer] fix asan on the platforms where the page size is not a compile-time constant (or at least where EXEC_PAGESIZE may not be trustworthy), e.g. powerpc64.
...
llvm-svn: 182351
2013-05-21 06:15:50 +00:00
Peter Collingbourne
b69b8a4a8f
[nolibc] Move GetPageSize to the individual platforms.
...
GetPageSize wraps sysconf(_SC_PAGESIZE) on POSIX platforms, but
sysconf resides in libc. To make this libc-independent on Linux,
move the wrapper to sanitizer_mac.cc and return the Linux-specific
constant EXEC_PAGESIZE in the sanitizer_linux.cc implementation.
llvm-svn: 182303
2013-05-20 17:05:29 +00:00
Peter Collingbourne
0c8df4e1d8
[nolibc] Move libc-dependent sanitizer_linux.cc code to sanitizer_linux_libcdep.cc.
...
llvm-svn: 182292
2013-05-20 15:57:44 +00:00
Peter Collingbourne
d5169edc36
[nolibc] Make GetArgsAndEnv libc-independent.
...
__libc_stack_end is made into a weak symbol if possible. If libc is
not linked, read args and environment from /proc.
llvm-svn: 182276
2013-05-20 14:25:32 +00:00
Alexey Samsonov
cbbdfc50ee
Build LSan on x86_64 only if this target is supported
...
llvm-svn: 182272
2013-05-20 14:16:45 +00:00
Sergey Matveev
6dd91e475a
[lsan] Fix r182256.
...
Add missing call to GetUserBegin().
llvm-svn: 182267
2013-05-20 14:04:56 +00:00
Alexey Samsonov
9711b25d4b
[ASan] Nuke build of static ASan runtime on Mac OS
...
llvm-svn: 182261
2013-05-20 13:38:27 +00:00
Alexey Samsonov
7dcfc46253
[Sanitizer] Build sanitizer runtimes with debug info in Makefile build
...
llvm-svn: 182260
2013-05-20 13:35:43 +00:00
Alexander Potapenko
a15d49cc1f
[libsanitizer] Introduce INTERCEPTOR_WITH_SUFFIX which is to be used for appending the __DARWIN_ALIAS() version suffixes to function names on Darwin.
...
This should fix asan/lit_tests/wait.cc under ASan.
llvm-svn: 182259
2013-05-20 13:32:35 +00:00
Sergey Matveev
bcfd838bcb
[lsan] GetUserBegin() in LSan.
...
Separate the notions of user-visible chunk and allocator chunk, to facilitate
ASan integration.
llvm-svn: 182256
2013-05-20 13:08:23 +00:00
Timur Iskhodzhanov
67c918a424
Fix realloc'ing freed/invalid pointers
...
See https://code.google.com/p/address-sanitizer/issues/detail?id=187 for the details
llvm-svn: 182255
2013-05-20 13:05:58 +00:00
Sergey Matveev
6a6c5b6dee
[asan] Modify ASan metadata atomically.
...
We need this to avoid races when ASan and LSan are used together.
llvm-svn: 182252
2013-05-20 11:25:18 +00:00
Sergey Matveev
3c20829559
[lsan] CMakeLists and lit test configs for LSan.
...
llvm-svn: 182251
2013-05-20 11:13:33 +00:00
Sergey Matveev
48c1d1acad
[lsan] Tests for LeakSanitizer.
...
llvm-svn: 182250
2013-05-20 11:09:27 +00:00
Sergey Matveev
b5483be858
[lsan] Common leak checking module.
...
Leak checking functionality which will be shared between
LSan/ASan/MSan.
llvm-svn: 182249
2013-05-20 11:06:50 +00:00
Sergey Matveev
3d97cdd140
[lsan] Standalone LSan initialization.
...
llvm-svn: 182248
2013-05-20 11:04:43 +00:00
Sergey Matveev
a5f9691dfb
[lsan] Interceptors for standalone LSan.
...
llvm-svn: 182247
2013-05-20 11:01:40 +00:00
Sergey Matveev
c7d003ec43
[lsan] Thread registry for standalone LSan.
...
llvm-svn: 182246
2013-05-20 10:57:53 +00:00
Sergey Matveev
866abfb3fe
[lsan] Allocator for standalone LSan.
...
This is the first in a series of CLs implementing LeakSanitizer.
http://clang.llvm.org/docs/LeakSanitizer.html
llvm-svn: 182245
2013-05-20 10:54:00 +00:00
Timur Iskhodzhanov
667cae7b69
[ASan] Remove an unused ChunkBase field
...
Also fix wrong alignment maths and an outdated comment
llvm-svn: 182238
2013-05-20 08:20:17 +00:00
Kostya Serebryany
3469375e4f
[sanitizer] factor out ByteMap from SizeClassAllocator32 so that it can be later replaced with a more memory-efficient implementation on 64-bit.
...
llvm-svn: 182234
2013-05-20 07:29:21 +00:00
Richard Smith
73241096f7
Avoid rebuilding the RTSanitizerCommon objects when building clang_rt.san.
...
llvm-svn: 182218
2013-05-19 19:53:01 +00:00
Timur Iskhodzhanov
836a4f3643
Replace CHECK(a == b); with CHECK_EQ(a, b); throughout asan_allocator2.cc
...
llvm-svn: 182198
2013-05-18 18:27:33 +00:00
David Blaikie
97c3018aac
Fix the UBSan CMake build broken in r182118
...
llvm-svn: 182177
2013-05-17 23:57:24 +00:00
Peter Collingbourne
ffaf2eac4d
[nolibc] Move all platforms to internal_getpid.
...
Before, we had an unused internal_getpid function for Linux, and a
platform-independent GetPid function. To make the naming conventions
consistent for syscall-like functions, the GetPid syscall wrapper
in sanitizer_posix.cc is moved to sanitizer_mac.cc, and GetPid is
renamed to internal_getpid, bringing the Linux variant into use.
llvm-svn: 182132
2013-05-17 16:56:53 +00:00
Peter Collingbourne
6d4a7d3723
[nolibc] Begin moving sanitizer_common's libc-dependent code to a separate library
...
Introduce a new object library, RTSanitizerCommonLibc, which will contain
the subset of sanitizer_common with libc dependencies. RTSanitizerCommon
contains the remainder of sanitizer_common, and is intended to have no
libc dependencies. Begin moving code to RTSanitizerCommonLibc, starting
with sanitizer_common.cc, whose libc-dependent portion is moved to
sanitizer_common_libcdep.cc, the first member of the new library.
This split affects the CMake build only. The makefile build continues
to produce the full sanitizer_common library.
llvm-svn: 182118
2013-05-17 16:17:19 +00:00
Evgeniy Stepanov
bec53faad0
[sanitizer] Fix build with Android NDK r8e.
...
llvm-svn: 182110
2013-05-17 15:22:32 +00:00
Alexander Potapenko
dd3c583211
[ASan] Make the regression test for time(NULL) Linux-specific, as it crashes on Darwin (and the problem used to occur on Linux).
...
Do not use zero-based shadow for the time() test.
llvm-svn: 182107
2013-05-17 15:11:26 +00:00
Evgeniy Stepanov
44ff0eb4b9
[sanitizer] Fix gcc build.
...
llvm-svn: 182094
2013-05-17 13:30:48 +00:00
Evgeniy Stepanov
ff6728f2f8
[msan] Unpoison dlpi_name in dl_iterate_phdr interceptor.
...
llvm-svn: 182093
2013-05-17 12:51:13 +00:00
Dmitry Vyukov
9ff1023816
tsan: remove "printing report from signal handler. Can crash or hang" output
...
it was added to debug mysterious hangs, but it does not seem to happen anymore
now it only clutter up output
llvm-svn: 182089
2013-05-17 12:05:44 +00:00
Dmitry Vyukov
c9af818515
tsan: introduce recursive mutex lock/unlock java interface
...
this is required to handle Object.Wait()
llvm-svn: 182088
2013-05-17 12:03:46 +00:00
Dmitry Vyukov
69c544d857
tsan: comment out debug output in test
...
llvm-svn: 182087
2013-05-17 11:54:37 +00:00
Alexander Potapenko
00b44ba778
[ASan] Fix allow_user_segv.cc on Darwin (32-bit build required a SIGBUS handler instead of the SIGSEGV one)
...
llvm-svn: 182080
2013-05-17 08:08:50 +00:00
Alexander Potapenko
12d09f3a3d
[ASan] Fix init-order-dlopen.cc to pass under Mac OS.
...
llvm-svn: 182010
2013-05-16 14:51:01 +00:00