Evgeniy Stepanov
52b2d13245
[sanitizer] Enable prctl interceptor on Android.
...
llvm-svn: 177497
2013-03-20 07:35:52 +00:00
Evgeniy Stepanov
95eaa21637
[sanitizer] More renamed macros.
...
llvm-svn: 177401
2013-03-19 14:54:17 +00:00
Evgeniy Stepanov
0af672326a
[sanitizer] Replace more platform checks with SANITIZER_ constants.
...
llvm-svn: 177400
2013-03-19 14:33:38 +00:00
Evgeniy Stepanov
d3b56605f1
[sanitizer] Move ASan platform macros to sanitizer_common and rename them appropriately.
...
llvm-svn: 177397
2013-03-19 13:54:41 +00:00
Dmitry Vyukov
082afc8346
tsan: fix build
...
llvm-svn: 177395
2013-03-19 13:34:12 +00:00
Dmitry Vyukov
4ecfa696e0
tsan: flush dead thread info earlier (when another thread is finished rather than new thread is created)
...
llvm-svn: 177394
2013-03-19 12:25:48 +00:00
Dmitry Vyukov
29f335ae80
tsan: symbolizer "flush caches" functinality
...
llvm-svn: 177388
2013-03-19 10:23:17 +00:00
Evgeniy Stepanov
6d02c1c598
[sanitizer] Avoid use of uintptr_t.
...
llvm-svn: 177384
2013-03-19 09:39:15 +00:00
Evgeniy Stepanov
b4a218db34
[sanitizer] Don't adjust the size of the user-allocated stack.
...
Moved this code to sanitizer_common.
llvm-svn: 177383
2013-03-19 09:30:52 +00:00
Dmitry Vyukov
49e462fab2
tsan: fix clang -Wall build
...
Clang does not like classes with virtual functions but w/o virtual dtor.
Go does not like libstdc++ (operator delete).
llvm-svn: 177267
2013-03-18 10:10:15 +00:00
Dmitry Vyukov
50160030e1
tsan: fix Go build
...
llvm-svn: 177260
2013-03-18 08:52:46 +00:00
Dmitry Vyukov
6f7ca81cce
tsan: fix huge stack frames
...
llvm-svn: 177255
2013-03-18 08:09:42 +00:00
Dmitry Vyukov
0f2c7ea5d0
tsan: fix lint warnings
...
llvm-svn: 177251
2013-03-18 07:58:20 +00:00
Alexey Samsonov
f9dbbda5bc
[Sanitizer] Get rid of global mutexes in StopTheWorld implementation
...
llvm-svn: 177246
2013-03-18 06:27:13 +00:00
Alexey Samsonov
e25c72958a
[Sanitizer] Rely on template argument deduction in sanitizer_allocator_test
...
llvm-svn: 177245
2013-03-18 06:07:44 +00:00
Alexander Potapenko
845b575370
[libsanitizer] StopTheWorld in sanitizer_common
...
StopTheWorld puts the process in a suspended state before running the
user-supplied callback. To be used in TSan and in leak checking code.
Linux implementation provided.
Patch by Sergey Matveev (earthdok@google.com )
llvm-svn: 177156
2013-03-15 14:37:21 +00:00
Alexey Samsonov
3a6b6b9d55
[Sanitizer] Don't intercept frexpf and frexpl on Windows. Add frexp declaration to asan_intercepted_functions.h
...
llvm-svn: 177155
2013-03-15 14:02:21 +00:00
Alexey Samsonov
e4385c4b98
[Sanitizer] Don't link tests with -lpthread on Android.
...
llvm-svn: 177151
2013-03-15 12:54:01 +00:00
Kostya Serebryany
96a7620f3a
[sanitizer] fix gcc build warnings
...
llvm-svn: 177149
2013-03-15 12:27:52 +00:00
Kostya Serebryany
b941a2fca4
[asan] Add ForEachChunk() to sanitizer allocators. Patch by Sergey Matveev
...
llvm-svn: 177147
2013-03-15 11:39:41 +00:00
Alexey Samsonov
cdd46d9ccc
[Sanitizer] Generalize compile/link flags for sanitizer_common tests on Android and on other platforms.
...
llvm-svn: 177146
2013-03-15 10:39:26 +00:00
Alexey Samsonov
337b0fcf9c
[Sanitizer] Build sanitizer_common tests w/o RTTI. Move ThreadRegistry class members below methods.
...
llvm-svn: 177143
2013-03-15 07:08:52 +00:00
Eric Christopher
d3c993b396
Fix a virtual destructor warning.
...
Patch by Manuel Klimek!
llvm-svn: 177132
2013-03-15 00:20:17 +00:00
Alexey Samsonov
d1999a1ccc
[Sanitizer] Fix compiler warnings and style issues in sanitizer_common tests. Use -Werror=sign-compare when building them.
...
llvm-svn: 177077
2013-03-14 15:15:35 +00:00
Alexey Samsonov
1cb684381a
[Sanitizer] Add generic ThreadRegistry class for sanitizer runtimes. This class holds basic thread bookkeeping logic and allows specific sanitizer runtimes to create thread contexts and mark threads as created/running/joined etc. The class is based on the way we currently store thread contexts in TSan.
...
llvm-svn: 177074
2013-03-14 13:54:30 +00:00
Alexey Samsonov
a097f7b1e3
[Sanitizer] Add default constructor for BlockingMutex
...
llvm-svn: 177072
2013-03-14 13:30:56 +00:00
Evgeniy Stepanov
8d487b4407
[sanitizer] No dirent64 on Android.
...
llvm-svn: 177071
2013-03-14 13:24:03 +00:00
Alexey Samsonov
3d09fdbf21
[Sanitizer] Build sanitizer_common with -fno-rtti
...
llvm-svn: 177070
2013-03-14 13:16:35 +00:00
Kostya Serebryany
d332d42372
[asan] remove one redundant malloc stress test, unify the usage of ASAN_LOW_MEMORY macro in tests, slightly reduce test memory usage (all to make 32-bit runs consume less RAM)
...
llvm-svn: 177069
2013-03-14 13:16:09 +00:00
Alexander Potapenko
34e1171768
[libsanitizer] fixed a bug in ThreadLister tests where we forgot to terminate one thread
...
Patch by Sergey Matveev (earthdok@google.com )
llvm-svn: 177068
2013-03-14 13:15:14 +00:00
Evgeniy Stepanov
740e6ebe71
[msan] Add changes missing from r177065.
...
llvm-svn: 177067
2013-03-14 13:13:49 +00:00
Alexander Potapenko
ac3bbb3ef3
[libsanitizer] Fixed incorrect handling of pre-existing threads in ThreadLister test.
...
Also, extended the test to check that ThreadLister::Reset() works as intended.
Patch by Sergey Matveev (earthdok@google.com )
llvm-svn: 177060
2013-03-14 12:06:54 +00:00
Evgeniy Stepanov
231894a902
[sanitizer] Intercept frexp and friends.
...
llvm-svn: 177056
2013-03-14 11:34:39 +00:00
Alexey Samsonov
7d2385419a
[Sanitizer] fix compilation for Windows
...
llvm-svn: 177054
2013-03-14 11:29:06 +00:00
Alexey Samsonov
83e7622df6
[Sanitizer] Write a slightly better implementation of GetEnv() function on Windows
...
llvm-svn: 177051
2013-03-14 11:10:23 +00:00
Evgeniy Stepanov
96f82f8ac3
[sanitizer] Fix lint.
...
llvm-svn: 176943
2013-03-13 10:20:35 +00:00
Evgeniy Stepanov
98f5ea0dba
[msan] Increase stack size as required.
...
Adjust stack size in pthread_attr_t when the app-requested size does not fit MSan TLS.
llvm-svn: 176939
2013-03-13 09:01:40 +00:00
Evgeniy Stepanov
5697b58ec4
[sanitizer] Move GetTlsSize code from TSan to sanitizer_common.
...
llvm-svn: 176938
2013-03-13 08:19:53 +00:00
Evgeniy Stepanov
24aad9c0cb
Break a >80 char line.
...
llvm-svn: 176937
2013-03-13 08:17:39 +00:00
Alexey Samsonov
91f833a413
[Sanitizer] Fixup for r176931 for Mac and Windows
...
llvm-svn: 176935
2013-03-13 07:39:25 +00:00
Alexey Samsonov
d38aceda4e
[Sanitizer] Fix a typo in function name
...
llvm-svn: 176932
2013-03-13 06:55:02 +00:00
Alexey Samsonov
06d3aa4884
[Sanitizer] Change MemoryMappingLayout methods to also report memory protection flags (for future use in leak checker). Patch by Sergey Matveev.
...
llvm-svn: 176931
2013-03-13 06:51:02 +00:00
Kostya Serebryany
138b155042
[sanitizer] use fewer size classes in the allocator to reduce the memory footprint. There is no all-size-fits-all constant here, but this change is positive or neutral on several large apps I've tested
...
llvm-svn: 176855
2013-03-12 08:44:40 +00:00
Kostya Serebryany
ba56c8d4f9
[sanitizer] simplify the allocator's SizeClassMap: do not require an extra template parameter, instead compute it in flight. No functionality change
...
llvm-svn: 176853
2013-03-12 07:01:27 +00:00
Alexey Samsonov
db7d9656bb
[Sanitizer] Implement BlockingMutex::CheckLocked()
...
llvm-svn: 176805
2013-03-11 15:45:20 +00:00
Alexander Potapenko
1f78ad5da4
[ASan] Reduce the local buffer size in Report() not to fail the check enforced when building TSan runtime.
...
llvm-svn: 176804
2013-03-11 13:36:39 +00:00
Alexander Potapenko
18c916c6c5
[ASan] Try to use a small (512 bytes) stack-local buffer in Report() for short messages, fall back to MmapOrDie() in the case of a failure.
...
This shall eliminate most of the cryptic "ERROR: failed to mmap" messages caused by recursively calling MmapOrDie() from MmapOrDie().
llvm-svn: 176802
2013-03-11 11:47:43 +00:00
Alexander Potapenko
92cc1a6d24
[ASan] don't call strerr from functions that map memory, since this results in malloc().
...
llvm-svn: 176800
2013-03-11 10:21:28 +00:00
Kostya Serebryany
0f5c20b417
[sanitizer] make SizeClassAllocator64::GetBlockBegin more bullet proof (by Sergey Matveev)
...
llvm-svn: 176799
2013-03-11 09:43:12 +00:00
Reid Kleckner
c193da57b8
[msan] pthread_join() returns int, not void*
...
pthread_join() returns an error code, not the result of the
pthread_create() function like I thought.
llvm-svn: 176554
2013-03-06 15:41:35 +00:00