Commit Graph

3477 Commits

Author SHA1 Message Date
Evgeniy Stepanov 8ab205fb74 [asan] Handle OpenFile errors in CovDump.
llvm-svn: 201240
2014-02-12 15:29:22 +00:00
Evgeniy Stepanov 254c7636cf [sanitizer] Fix wait4 interceptor on Android.
It's called __wait4 there.

llvm-svn: 201235
2014-02-12 13:05:17 +00:00
Kostya Serebryany be1d22b631 [sanitizer] added class BVGraph, to be used in a deadlock detector; added more methods to the bit vectors
llvm-svn: 201226
2014-02-12 11:28:09 +00:00
Alexey Samsonov ce9c449a4d [TSan] Kill tsan_symbolize_addr2line_linux.cc
llvm-svn: 201219
2014-02-12 08:37:09 +00:00
Alexey Samsonov 7304b4201f [Sanitizer] Teach external symbolizer to work with addr2line if llvm-symbolizer is unavailable. Allow this mode in TSan.
llvm-svn: 201218
2014-02-12 08:29:42 +00:00
Alexey Samsonov c34a997669 [UBSan] Parse common runtime flags before using a symbolizer
llvm-svn: 201217
2014-02-12 08:21:44 +00:00
Alexey Samsonov 167c15a98f [Sanitizer] Build sanitizer_common with -Wframe-larger-than=512 flag
llvm-svn: 201213
2014-02-12 07:26:40 +00:00
Alexey Samsonov 7e97768f2f [Sanitizer] Reduce stack frame size of SlowUnwindStackWithContext
llvm-svn: 201212
2014-02-12 07:24:11 +00:00
Kostya Serebryany 083d657845 [sanitizer] added a bit vector class to be used in a deadlock detector
llvm-svn: 201210
2014-02-12 07:05:24 +00:00
Hans Wennborg a97442f5fb Require CMake 2.8.12.1 or later on Windows
That version knows to use the /FS flag, which is needed for building
lib/interception with VS2013.

llvm-svn: 201184
2014-02-11 21:46:19 +00:00
Evgeniy Stepanov e5a447d947 [asan] Fix Windows build.
llvm-svn: 201154
2014-02-11 13:57:17 +00:00
Evgeniy Stepanov 2629e575db [sanitizer] Fix build.
llvm-svn: 201152
2014-02-11 13:45:01 +00:00
Evgeniy Stepanov 769d46f373 [sanitizer] Use system unwinder in signal handlers on Android.
Because of the way Bionic sets up signal stack frames, libc unwinder is unable
to step through it, resulting in broken SEGV stack traces.

Luckily, libcorkscrew.so on Android implements an unwinder that can start with
a signal context, thus sidestepping the issue.

llvm-svn: 201151
2014-02-11 13:38:57 +00:00
Alexey Samsonov ca183eed55 [Sanitizer] External symbolizer refactoring: split protocol for communicating with
llvm-symbolizer binary and external process handling into separate classes.

No functionality change.

llvm-svn: 201150
2014-02-11 13:03:09 +00:00
Alexey Samsonov 2f1209f851 Remove unused config.llvm_symbolizer_path
llvm-svn: 201147
2014-02-11 12:52:26 +00:00
Evgeniy Stepanov 6db97e82a4 Add a copy of missing <ucontext.h> for Android and enable ASan SEGV handler.
This change adds a copy of <ucontext.h> for Android found in google-breakpad
that is missing from the official NDK.
ASan SEGV handler is still disabled by default and can be enabled with
ASAN_OPTIONS=handle_segv.

llvm-svn: 201084
2014-02-10 13:34:43 +00:00
Evgeniy Stepanov 791a7e1603 [msan] Return EINVAL instead of crashing from mmap of an invalid address.
llvm-svn: 201074
2014-02-10 09:37:03 +00:00
Alexey Samsonov adcf48fa35 [Sanitizer] Don't #include the same system header twice.
llvm-svn: 201071
2014-02-10 08:57:28 +00:00
Evgeniy Stepanov d1e68a5ce1 [sanitizer] Disable 3 more syscall hooks on Android.
llvm-svn: 201070
2014-02-10 08:35:58 +00:00
Alexey Samsonov dce6dd9d29 [TSan] Fix mismatched mangled names in operator delete interceptors
llvm-svn: 201069
2014-02-10 08:34:46 +00:00
Evgeniy Stepanov c75ef739a1 [sanitizer] struct ustat and a bunch of other definitions are missing on Android.
llvm-svn: 201068
2014-02-10 08:00:24 +00:00
Nick Lewycky af2064f7ab Add throw() specifiers to more redeclarations of operator delete and operator delete[].
llvm-svn: 201016
2014-02-08 01:42:08 +00:00
Nick Lewycky c0930b808b Stick to C++98 for this.
llvm-svn: 201015
2014-02-08 01:36:21 +00:00
Nick Lewycky fff46e01fd Update these declarations of operator delete (and delete[]) to have noexcept,
as required per core issue 1552 and warned about with
-Wimplicit-exception-spec-mismatch.

llvm-svn: 201014
2014-02-08 01:29:07 +00:00
Dmitry Vyukov b2b3e4bd77 tsan: improve the test
remove TSAN_OPTIONS from the test, so that it runs in the presubmit script
add a CHECK, so that it can run with FileCheck as well

llvm-svn: 200972
2014-02-07 11:48:06 +00:00
Dmitry Vyukov c57987c7fb tsan: run user OnInitialize callback later
when global and thread state are initialized,
this allows to do more things in the callback.

llvm-svn: 200966
2014-02-07 09:28:57 +00:00
Sergey Matveev 4a03fa4f60 [sanitizer] Intercept if_indextoname() and if_nametoindex().
llvm-svn: 200945
2014-02-06 20:39:33 +00:00
Sergey Matveev f3a8acf38a [sanitizer] Fix build.
llvm-svn: 200942
2014-02-06 19:36:10 +00:00
Sergey Matveev 544d07f861 [sanitizer] One does not simply intercept getifaddrs().
Upgrade the interceptor, and attempt to fix the Android build.

llvm-svn: 200936
2014-02-06 18:48:23 +00:00
Sergey Matveev 07802a090a [sanitizer] Intercept getifaddrs().
llvm-svn: 200926
2014-02-06 17:42:36 +00:00
Sergey Matveev 0c62992d6e [sanitizer] Intercept getresuid and getresgid.
llvm-svn: 200925
2014-02-06 15:12:56 +00:00
Alexander Potapenko 1a0aadcd77 [TSan] Add a regression test for https://code.google.com/p/thread-sanitizer/issues/detail?id=47
llvm-svn: 200923
2014-02-06 14:06:12 +00:00
Alexander Potapenko a1193a50b0 [TSan] Don't flush all file streams on program shutdown to avoid deadlocks on file stream locks.
This should fix https://code.google.com/p/thread-sanitizer/issues/detail?id=47.

llvm-svn: 200922
2014-02-06 13:37:14 +00:00
Dmitry Vyukov 9ba840865f tsan: simplify Go build script
we don't use assembly files

llvm-svn: 200916
2014-02-06 09:23:12 +00:00
Dmitry Vyukov 447bb46e03 tsan: remove unused functions
llvm-svn: 200915
2014-02-06 09:22:50 +00:00
Dmitry Vyukov a5d1fcfde1 tsan: improve error message for Go
llvm-svn: 200914
2014-02-06 09:22:29 +00:00
Kostya Serebryany 1f5d17c57d [asan] fix testing on Mac
llvm-svn: 200910
2014-02-06 07:19:52 +00:00
Kostya Serebryany 1ee681305f [asan] introduce two functions that will allow implementations of C++ garbage colection to work with asan's fake stack
llvm-svn: 200908
2014-02-06 06:56:22 +00:00
Sergey Matveev efefe5e225 [sanitizer] Fix build.
llvm-svn: 200873
2014-02-05 20:04:12 +00:00
Sergey Matveev c5c84a1d86 [sanitizer] Implement ioctl decoding.
When an unknown ioctl is encountered, try to guess the parameter size from the
request id.

llvm-svn: 200872
2014-02-05 19:35:24 +00:00
Kostya Serebryany 9ebd483017 [sanitizer] hide two functions in the __sanitizer namespace to avoid exporting them (gold complained)
llvm-svn: 200844
2014-02-05 15:06:32 +00:00
Dmitry Vyukov 93474a9acd tsan: fix windows alignment check
llvm-svn: 200838
2014-02-05 13:41:09 +00:00
Dmitry Vyukov a54308fc6d tsan: deflake flaky test
llvm-svn: 200833
2014-02-05 12:01:34 +00:00
Dmitry Vyukov 7799eb123b tsan: ensure proper alignment of mmaps on windows
llvm-svn: 200832
2014-02-05 11:37:20 +00:00
Timur Iskhodzhanov 4a25d42a3c [ASan/Win] Add DLL thunks for __asan_{,un}poison_memory_region
llvm-svn: 200809
2014-02-04 23:54:26 +00:00
Timur Iskhodzhanov aeefb6abce [ASan/Win] Fall back to stdout if we can't print the reports to stderr
llvm-svn: 200804
2014-02-04 23:28:30 +00:00
Dmitry Vyukov d7fcee8d8c tsan: add windows native build script
llvm-svn: 200780
2014-02-04 17:52:41 +00:00
Dmitry Vyukov a61c2b0bd5 tsan: fix windows build
llvm-svn: 200779
2014-02-04 17:29:44 +00:00
Dmitry Vyukov a538aac8ce tsan: fix windows build
llvm-svn: 200778
2014-02-04 17:27:29 +00:00
Dmitry Vyukov 2da2cee706 tsan: update Go public interface
in preparation for https://codereview.appspot.com/55100044

llvm-svn: 200766
2014-02-04 14:45:54 +00:00