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
Alexey Samsonov
fafbcb6d4c
[CMake] Fixup for r200753
...
llvm-svn: 200761
2014-02-04 13:24:13 +00:00
Alexander Potapenko
4672bacaef
[ASan] Get rid of asan_mac.h, which contents have been moved to sanitizer_mac.h
...
llvm-svn: 200757
2014-02-04 11:35:59 +00:00
Alexander Potapenko
844a3cf77e
[ASan] Use replace_str=0 and replace_intrin=0 in printf-{2,4}.c to avoid triggering a buffer overflow in strlen and memcpy.
...
This change fixes printf-2.c and printf-4.c under OSX.
llvm-svn: 200756
2014-02-04 11:32:05 +00:00
Dmitry Vyukov
2e1634b69f
tsan: fix darwin Go build
...
llvm-svn: 200755
2014-02-04 11:29:09 +00:00
Justin Bogner
ad560c4c11
CMake: Enable -Werror for the -fno-function-sections check
...
If the -fno-function-sections flag isn't recognized, the compiler
emits a warning. This isn't enough to cause the check to fail, so we
enable -Werror as well.
llvm-svn: 200753
2014-02-04 10:40:46 +00:00
Alexander Potapenko
40fcff653c
[ASan] Fix printf-5.c on OSX: fix a compiler warning, avoid intercepting memcpy (which triggers the error report before printf does).
...
llvm-svn: 200751
2014-02-04 10:36:55 +00:00
Dmitry Vyukov
9244c48b29
tsan: update public Go interface
...
in preparation for https://codereview.appspot.com/55100044
llvm-svn: 200750
2014-02-04 10:35:23 +00:00
Alexander Potapenko
2e7dc60ee3
[ASan] Replace the call to "vname" with "WRAP(vname)" in FORMAT_INTERCEPTOR_IMPL
...
It's incorrect to call the function by its name in the interceptor, because that means WRAP(vname) on Linux and REAL(vname) on OSX.
This patch fixes asan/lit_tests/TestCases/printf-3.c on Mac.
llvm-svn: 200749
2014-02-04 09:35:09 +00:00
Kostya Serebryany
b965a2fa32
[lsan] simplify use_tls_dynamic.cc test
...
llvm-svn: 200748
2014-02-04 09:07:16 +00:00
Dmitry Vyukov
fd0affac37
tsan: add SANITIZER_INTERFACE_ATTRIBUTE to more callbacks
...
so that it's possible to override them from a dynamic library.
llvm-svn: 200747
2014-02-04 08:46:09 +00:00
Alexey Samsonov
d23c79604e
[CMake] Check that compiler supports -fno-function-sections flag
...
llvm-svn: 200746
2014-02-04 08:28:17 +00:00
Dmitry Vyukov
8aaa44c43d
tsan: relax check for errno spoiling more
...
We do not detect errno spoiling for SIGTERM,
because some SIGTERM handlers do spoil errno but reraise SIGTERM,
tsan reports false positive in such case.
It's difficult to properly detect this situation (reraise),
because in async signal processing case (when handler is called directly
from rtl_generic_sighandler) we have not yet received the reraised
signal; and it looks too fragile to intercept all ways to reraise a signal.
llvm-svn: 200742
2014-02-04 07:10:45 +00:00
Kostya Serebryany
f6e085cf89
[sanitizer] make __tls_get_addr interceptor (more) AS-safe. No good test so far, will keep trying.
...
llvm-svn: 200734
2014-02-04 05:22:00 +00:00
Kostya Serebryany
51f135d820
[sanitizer] Handle TLS sizes for glibc < 2.13; As discussed in http://gcc.gnu.org/PR60038 , the hardcoded sizeof(struct thread); patch by Jakub Jelinek
...
llvm-svn: 200733
2014-02-04 04:09:38 +00:00
Alexander Potapenko
f6ff6b0929
[libsanitizer] Workaround for https://code.google.com/p/address-sanitizer/issues/detail?id=261
...
If pthread_get_stacksize_np() returns 512K for the main thread on Mavericks, obtain the stack size from the current stack rlimit.
llvm-svn: 200703
2014-02-03 16:42:29 +00:00
Alexander Potapenko
8d58767b34
[libsanitizer] Follow-up for r200700: add the new header to CMakeLists.txt and make it empty on non-Mac.
...
llvm-svn: 200701
2014-02-03 15:45:03 +00:00
Alexander Potapenko
768e315a74
[ASan] Move GetMacosVersion() to sanitizer_common.
...
llvm-svn: 200700
2014-02-03 15:32:19 +00:00
Evgeniy Stepanov
1fc9e61356
[asan] asan_device_setup.sh: allow overriding adb path.
...
llvm-svn: 200698
2014-02-03 15:12:09 +00:00
Evgeniy Stepanov
756e1c1e4b
[asan] Reinitialize allocator quarantine on activation.
...
This is covered by AddressSanitizer.UAF_* tests in asan_test
with start_deactivated=1.
llvm-svn: 200696
2014-02-03 14:19:08 +00:00
Evgeniy Stepanov
bd2b3177da
[sanitizer] Resubmit r200683: disable -ffunction-sections.
...
llvm-svn: 200686
2014-02-03 11:16:41 +00:00
Evgeniy Stepanov
fe437f0a8f
Revert r200683.
...
-fno-function-sections is broken in Clang.
llvm-svn: 200684
2014-02-03 10:52:53 +00:00
Evgeniy Stepanov
aa0d7dee77
[sanitizer] Disable -ffunction-sections.
...
It breaks when a binary is linked with --gc-sections: parts of sanitizer
interface get thrown away and inaccessible from dlopen-ed libs.
llvm-svn: 200683
2014-02-03 10:15:08 +00:00
Evgeniy Stepanov
04e841c047
[msan] Fix a typo.
...
Spotted by Keno Fischer.
llvm-svn: 200682
2014-02-03 07:27:01 +00:00
Sergey Matveev
c18b36625e
[sanitizer] Partial revert of recent ioctl changes.
...
Some build environments are missing the required headers.
This reverts r200544, r200547, r200551. This does not revert the change that
introduced READWRITE ioctl type.
llvm-svn: 200567
2014-01-31 19:19:45 +00:00
Timur Iskhodzhanov
322ce39e39
Remove /FS as it's auto-added by CMake 2.8.12.1; also, remove /wd4221 as 4221 is a linker warning, not a compiler warning
...
llvm-svn: 200564
2014-01-31 18:25:37 +00:00
Alexander Potapenko
ea4a0dbb8d
[ASan] Implement __sanitizer::InstallDeadlySignalHandlers() and __asan::AsanOnSIGSEGV() on Windows.
...
llvm-svn: 200554
2014-01-31 15:11:11 +00:00