Dmitry Vyukov
ce7a1ba196
tsan: faster memory reset for Go
...
llvm-svn: 168567
2012-11-25 16:05:42 +00:00
Kostya Serebryany
df198db1aa
[asan/tsan] get rid of kPageSize completely in favor of GetPageSizeCached(). This makes the code friendly to more platforms
...
llvm-svn: 168537
2012-11-24 05:03:11 +00:00
Dmitry Vyukov
195eda9922
tsan: add failure memory order to atomic compare exchange functions
...
llvm-svn: 168518
2012-11-23 15:51:45 +00:00
Kostya Serebryany
f22c697f58
[asan] get rid of some of the uses of kPageSize. The intent is to get rid of it completely to support platforms with multiple possible page sizes.
...
llvm-svn: 168517
2012-11-23 15:38:49 +00:00
Alexey Samsonov
1a05424ee0
[ASan] move swapcontext_test to Linux-specific tests
...
llvm-svn: 168513
2012-11-23 11:20:54 +00:00
Alexey Samsonov
aac36b345a
[ASan] intercept swapcontext on Linux only
...
llvm-svn: 168509
2012-11-23 10:14:44 +00:00
Alexey Samsonov
0d7755ccb5
[ASan] Add interceptor for swapcontext to fight with false positives in some of its use cases.
...
llvm-svn: 168508
2012-11-23 09:46:34 +00:00
Dmitry Vyukov
db584aded7
tsan: ensure than func entry/exit are inlined
...
llvm-svn: 168506
2012-11-23 07:14:11 +00:00
Dmitry Vyukov
6971414f3e
tsan: fix more bugs in signal handling
...
llvm-svn: 168497
2012-11-22 13:53:54 +00:00
Dmitry Vyukov
3048e1a399
tsan: add missing \n in report
...
llvm-svn: 168496
2012-11-22 13:38:28 +00:00
Dmitry Vyukov
35437032be
tsan: better error message for OOM
...
llvm-svn: 168491
2012-11-22 08:42:01 +00:00
Kostya Serebryany
8bc5421ba0
[asan] get rid of kPageSizeBits
...
llvm-svn: 168426
2012-11-21 13:31:07 +00:00
Evgeniy Stepanov
979a1e7352
Allow PopStackFrames leave the stack empty.
...
llvm-svn: 168425
2012-11-21 13:00:04 +00:00
Kostya Serebryany
734f1eb5f4
[asan/tsan] do not use __WORDSIZE macro, as it is glibc-private thing. Instead, define our own SANITIZER_WORDSIZE
...
llvm-svn: 168424
2012-11-21 12:38:58 +00:00
Dmitry Vyukov
aeed45cde0
tsan: explictly say when we fail to restore a stack trace
...
llvm-svn: 168423
2012-11-21 11:44:20 +00:00
Alexey Samsonov
3a3488e4e1
[Sanitizer] replace while with internal_memset to make sure compiler won't replace it with library memset
...
llvm-svn: 168422
2012-11-21 11:12:57 +00:00
Dmitry Vyukov
9ca2afd3a1
tsan: fix handling of signals
...
(do not execute synchronous signals in recursive interceptors)
llvm-svn: 168421
2012-11-21 11:12:33 +00:00
Kostya Serebryany
6db8ad43df
[asan] pop the two internal functions from the stack trace produced by _Unwind_Backtrace (Peter Bergner)
...
llvm-svn: 168369
2012-11-20 15:15:44 +00:00
Kostya Serebryany
87e0464bfb
[asan] better support for powerpc and sparc targets (thanks to H.J. Liu and David Miller)
...
llvm-svn: 168358
2012-11-20 08:57:26 +00:00
Kostya Serebryany
46de580003
[asan] more support for powerpc, patch by Peter Bergner
...
llvm-svn: 168356
2012-11-20 07:00:42 +00:00
Alexey Samsonov
27a22688b9
[ASan] use raw Exit() to kill the program in case ASan finds an error while reporting the error in the same thread
...
llvm-svn: 168308
2012-11-19 11:22:22 +00:00
Kostya Serebryany
386e2d853b
[asan] support x32 mode in the fast stack unwinder. Patch by H.J. Lu
...
llvm-svn: 168306
2012-11-19 10:31:00 +00:00
Alexey Samsonov
06b22c1513
[ASan] change interface of GetAccumulatedStats() function to prevent Clang from inserting memcpy() call into runtime.
...
llvm-svn: 168305
2012-11-19 10:25:17 +00:00
Kostya Serebryany
cb9f62189b
[asan] support PowerPC and SPARC in sanitizer_linux.cc
...
llvm-svn: 168301
2012-11-19 07:53:36 +00:00
Alexey Samsonov
56f1ef7d3b
ubsan: fix broken test case by using brand new [[ @LINE ]] FileCheck feature
...
llvm-svn: 168170
2012-11-16 13:38:03 +00:00
Alexey Samsonov
be9a293dda
UBSan: enable CMake build on Darwin. Fix two failing tests and disable the test which produces linker errors on Darwin.
...
llvm-svn: 168169
2012-11-16 12:57:07 +00:00
Alexey Samsonov
77d35747be
UBSan: fix support on Darwin in 'make' build system. Patch by Jean-Daniel Dupas.
...
llvm-svn: 168167
2012-11-16 12:51:23 +00:00
Dmitry Vyukov
4ee90c231a
asan: sync with gcc r193553
...
llvm-svn: 168151
2012-11-16 11:26:05 +00:00
Alexey Samsonov
4ac66c49da
[TSan] use explicit ctor for BlockingCall
...
llvm-svn: 168150
2012-11-16 11:21:07 +00:00
Alexey Samsonov
038e3489d9
[TSan] use llvm-symbolizer to run tsan tests
...
llvm-svn: 168146
2012-11-16 10:16:14 +00:00
Dmitry Vyukov
933c9889aa
tsan: remove unused parameter
...
llvm-svn: 168060
2012-11-15 18:49:08 +00:00
Dmitry Vyukov
f34db58c20
tsan: switch to 4 shadow cells by default (since that's what we use everywhere now)
...
llvm-svn: 168059
2012-11-15 18:44:22 +00:00
Dmitry Vyukov
262465c126
tsan: eevn better handling of signals
...
add interceptor for poll()
in addition process signals in every atomic op
in addition process signals in blocking libc functions
llvm-svn: 168050
2012-11-15 17:40:49 +00:00
Alexander Potapenko
bcc00a4174
[ASan] Revert r168040 and r168043 and take a cleaner solution suggested by Kostya: return the known frame name for fake stack instead of looking it up.
...
llvm-svn: 168046
2012-11-15 15:24:42 +00:00
Alexander Potapenko
93dcc8d2bd
[ASan] Minor fix: return to the last byte of the fake stack if we've raced by.
...
llvm-svn: 168043
2012-11-15 14:59:19 +00:00
Alexander Potapenko
b34db9e883
[ASan] Poison the leftmost shadow byte with a special value so that we can find
...
the beginning of the fake frame when reporting an use-after-return error.
Fixes http://code.google.com/p/address-sanitizer/issues/detail?id=126
llvm-svn: 168040
2012-11-15 13:40:44 +00:00
Alexey Samsonov
11aec95f4a
[UBSan] Add support for building ubsan runtime library on Linux with 'make'. Compiler-rt part.
...
llvm-svn: 168038
2012-11-15 12:37:55 +00:00
Alexander Potapenko
4d533d243d
[ASan] Add the "lea $imm(%rip),%rax" instruction to mach_override.c
...
The need for this has been reported by Jack Howarth (howarth@bromo.med.uc.edu ) who's porting ASan-Darwin to GCC
llvm-svn: 168032
2012-11-15 08:32:16 +00:00
Richard Smith
2674c6e39b
Fix typo from code review (thanks to Alexey Samsonov). This is also caught by the existing tests when building for i386.
...
llvm-svn: 167890
2012-11-13 23:58:20 +00:00
Richard Smith
6122d0692b
Support for building the ubsan runtime when using the autoconf build system on
...
Darwin. Patch by Jean-Daniel Dupas, tweaked by Jonathan Sauer, simplified
somewhat by me.
llvm-svn: 167889
2012-11-13 23:55:06 +00:00
Richard Smith
05dce7e644
-fsanitize=undefined: Switch to using sanitizer_common for output. This gets us much closer to not depending on any system headers.
...
llvm-svn: 167888
2012-11-13 23:42:05 +00:00
Kostya Serebryany
1f8922cf71
[asan] use #if defined __x86_64__ instead of #if __WORDSIZE == 64 in sanitizer_linux.cc
...
llvm-svn: 167883
2012-11-13 23:13:17 +00:00
Dmitry Vyukov
6d67d3b0ee
tsan: remove unused const
...
llvm-svn: 167835
2012-11-13 14:13:21 +00:00
Dmitry Vyukov
041eaf976c
tsan: better function names
...
llvm-svn: 167834
2012-11-13 14:05:58 +00:00
Alexey Samsonov
b8a5f99bee
[TSan] Add output test for write under reader lock
...
llvm-svn: 167833
2012-11-13 14:05:02 +00:00
Dmitry Vyukov
dcba4d1288
tsan: fix stats collection
...
llvm-svn: 167832
2012-11-13 13:53:43 +00:00
Alexey Samsonov
2906117857
[ASan] now we don't need llvm_obj_root to access llvm-symbolizer tool
...
llvm-svn: 167823
2012-11-13 07:55:16 +00:00
Alexey Samsonov
c835b9e4a3
[ASan] test blacklist functionality for global-init-order checker (r167725)
...
llvm-svn: 167727
2012-11-12 14:03:00 +00:00
Alexander Potapenko
9448581d9e
[ASan] Remove llvm-symbolizer from compiler-rt/utils/
...
This is the first (1/2) part of a change that moves llvm-symbolizer to llvm/tools/, which will allow to build it
with both cmake and configure+make.
llvm-svn: 167722
2012-11-12 11:32:42 +00:00
Alexander Potapenko
5066c5d9b7
[ASan] Fix the golden stack for use-after-free.cc.
...
The change has been caused by the switch to llvm-symbolizer, that prints inlined stack frames.
This should fix PR 14251
llvm-svn: 167721
2012-11-12 11:27:24 +00:00