Alexey Samsonov
13f21af177
[TSan] Hide message about re-execing under verbosity flag
...
llvm-svn: 203793
2014-03-13 13:14:19 +00:00
Alexey Samsonov
f97f07b1b8
[CMake] Attempt to fix standalone compiler-rt build on Windows
...
llvm-svn: 203789
2014-03-13 11:55:27 +00:00
Alexey Samsonov
fe7e28c41f
[CMake] Use /W3 instead of -Wall on Windows. Remove add_definitions abuse.
...
llvm-svn: 203786
2014-03-13 11:31:10 +00:00
Dmitry Vyukov
a02fac7bec
tsan: update the test since the bug is fixed
...
http://llvm.org/bugs/show_bug.cgi?id=19113 is fixed, so enable the better CHECK
llvm-svn: 203784
2014-03-13 10:54:16 +00:00
Timur Iskhodzhanov
28bc2f7a14
Work around PR19125: -Wconstant-logical-operand false positive
...
llvm-svn: 203782
2014-03-13 10:43:02 +00:00
Kostya Serebryany
de3f20cf4b
[sanitizer] support recursive rwlocks in bitset-based deadlock detector
...
llvm-svn: 203779
2014-03-13 10:26:03 +00:00
Timur Iskhodzhanov
5c40cc3549
Disable fast shadow zero'ing on Windows
...
llvm-svn: 203778
2014-03-13 10:15:10 +00:00
Timur Iskhodzhanov
e8bd672d31
FastPoisonShadow: check for MmapFixedNoReserve failures
...
llvm-svn: 203776
2014-03-13 10:08:45 +00:00
Alexey Samsonov
32956d651a
[CMake] Make append_if semantics similar to those used in LLVM
...
llvm-svn: 203773
2014-03-13 09:31:36 +00:00
Joerg Sonnenberger
361a553ace
Preserve constness for intermediate pointers.
...
llvm-svn: 203743
2014-03-13 00:44:37 +00:00
Justin Bogner
8b77f351a8
Revert "profile: Use a simple binary format for profiling"
...
This will break without the corresponding change in clang, which I've
reverted until I figure out how to get it to link properly.
This reverts commit r203710.
llvm-svn: 203713
2014-03-12 21:07:26 +00:00
Justin Bogner
ac7c599254
profile: Use a simple binary format for profiling
...
llvm-svn: 203710
2014-03-12 20:52:34 +00:00
Daniel Sanders
f90e78a48d
Implement Android versions of __clear_cache for arm32 & mips.
...
The MIPS version was reviewed by myself. The ARM version was reviewed by JF
Bastien.
Patch by Narayan Kamath <narayan@google.com>.
llvm-svn: 203674
2014-03-12 16:38:27 +00:00
Dmitry Vyukov
22196e777c
tsan: fix deadlock in deadlock detector
...
forget to unlock a mutex on one of the paths
llvm-svn: 203663
2014-03-12 14:55:20 +00:00
Timur Iskhodzhanov
c3687e7bf3
Fix MSVS warnings in the sanitizers RTL
...
llvm-svn: 203661
2014-03-12 14:09:25 +00:00
Viktor Kutuzov
ebb00e1553
Add FreeBSD 9.2 support to asan_linux.cc
...
llvm-svn: 203658
2014-03-12 12:44:36 +00:00
Dmitry Vyukov
8c0f86e307
tsan: fix handling of pthread_cond_wait in presence of pthread_cancel
...
if the thread is cancelled in pthread_cond_wait, it locks the mutex before
processing pthread_cleanup stack
but tsan was missing that, thus reporting false double-lock/wrong-unlock errors
see the test for details
llvm-svn: 203648
2014-03-12 09:48:14 +00:00
Dmitry Vyukov
4076b3481a
tsan: add interceptors for fopen64, freopen64, tmpfile, tmpfile64
...
llvm-svn: 203647
2014-03-12 08:26:43 +00:00
Dmitry Vyukov
47fd6179b1
tsan: add disabled test for http://llvm.org/bugs/show_bug.cgi?id=19113
...
llvm-svn: 203646
2014-03-12 08:24:49 +00:00
Hans Wennborg
9f74f15682
Revert "[asan] Make __cxa_demangle non-weak symbol on Android."
...
stlport doesn't include __cxa_demangle.
This reverts r201545.
llvm-svn: 203601
2014-03-11 20:23:59 +00:00
Alexander Potapenko
a0c5a6763a
[ASan] Don't build the ASan runtime with -undefined dynamic_lookup, which isn't necessary anymore.
...
Fixes https://code.google.com/p/address-sanitizer/issues/detail?id=266 .
llvm-svn: 203572
2014-03-11 14:04:09 +00:00
Evgeniy Stepanov
14cd8e900f
[sanitizer] Fix a typo.
...
llvm-svn: 203568
2014-03-11 13:35:41 +00:00
Viktor Kutuzov
f31e53661f
A fix for platform-dependent types in sanitizers' profiling support lib on x64 FreeBSD in 32-bit mode
...
llvm-svn: 203470
2014-03-10 16:50:53 +00:00
Tim Northover
65fe9377f0
ARM: fix file's header comment
...
llvm-svn: 203247
2014-03-07 14:56:29 +00:00
Alexey Samsonov
18adbc361a
Remove sanitizer_linux_libcdep.cc from TSan-Go build
...
llvm-svn: 203238
2014-03-07 13:17:32 +00:00
Alexey Samsonov
f3f3b9e5b6
[FreeBSD] Add support for sanitizer_linux_libcdep.cc
...
Patch by Viktor Kutuzov!
llvm-svn: 203235
2014-03-07 11:47:32 +00:00
Alexey Samsonov
78a6d2073f
[FreeBSD] Port sanitizers' syscalls.
...
Patch by Viktor Kutuzov!
llvm-svn: 203227
2014-03-07 10:03:54 +00:00
Dmitry Vyukov
f852f08fb1
tsan: fix pthread_cond_destroy interceptor on android
...
llvm-svn: 203226
2014-03-07 10:01:16 +00:00
Alexey Samsonov
fefeecc7b0
[ASan] Better way to disable tests for functions unavailable on certain platforms
...
llvm-svn: 203224
2014-03-07 09:39:01 +00:00
Dmitry Vyukov
dd419aee00
tsan: update Go windows build script
...
llvm-svn: 203121
2014-03-06 14:49:21 +00:00
Evgeniy Stepanov
72a9d25060
[sanitizer] Simplify interceptors with user callbacks.
...
Get rid of the context argument in UNPOISON_PARAM and INITIALIZE_RANGE.
Get rid of all the thread-local contexts in interceptors.
llvm-svn: 203119
2014-03-06 13:26:09 +00:00
Dmitry Vyukov
350e7ddd34
tsan: update interface for Go
...
this is required to fix:
https://code.google.com/p/go/issues/detail?id=7460
llvm-svn: 203116
2014-03-06 13:17:28 +00:00
Alexey Samsonov
4a7e96e642
[CMake] Build compiler-rt libraries with -Wall
...
llvm-svn: 203113
2014-03-06 12:25:02 +00:00
Dmitry Vyukov
2516974e83
tsan: weaken concurrency guarantees in deadlock detector mutex hashmap
...
read locking on every access is too expensive
llvm-svn: 203112
2014-03-06 12:04:26 +00:00
Dmitry Vyukov
119aa0ea7c
tsan: add -ftls-model=initial-exec to deadlock detector flags
...
one way or another it must present in the process from the beginning
llvm-svn: 203111
2014-03-06 12:03:39 +00:00
Dmitry Vyukov
69bd9ca91c
tsan: better error message wording in deadlock reports
...
llvm-svn: 203109
2014-03-06 12:02:17 +00:00
Alexey Samsonov
5ec35b75ef
[FreeBSD] Provide FreeBSD-specific things for ASan.
...
Patch by Viktor Kutuzov!
llvm-svn: 203100
2014-03-06 09:05:52 +00:00
Alexey Samsonov
d52b9ba38d
[FreeBSD] Enable procmaps on FreeBSD.
...
This is not the final patch for procmaps, but it's enough for building
sanitizers and tests on FreeBSD.
Patch by Viktor Kutuzov!
llvm-svn: 203099
2014-03-06 08:58:24 +00:00
Alexey Samsonov
921f5a529e
asan_symbolize.py: use llvm-symbolizer results even if it returned function name w/o file/line info
...
llvm-svn: 202983
2014-03-05 15:18:50 +00:00
Alexey Samsonov
8ad7a05bb4
Improve llvm-symbolizer discovery in asan_symbolize.py
...
llvm-svn: 202982
2014-03-05 15:00:36 +00:00
Alexey Samsonov
e062e4c7eb
Enable memrchr interceptor only on Linux
...
llvm-svn: 202981
2014-03-05 14:07:19 +00:00
Dmitry Vyukov
792d4b1559
tsan: add missing header file to sanitizer_common cmake file
...
llvm-svn: 202979
2014-03-05 13:55:32 +00:00
Dmitry Vyukov
e73e0a04d7
tsan: fix deadlock detector build for SANITIZER_DEADLOCK_DETECTOR_VERSION=2
...
llvm-svn: 202977
2014-03-05 13:53:29 +00:00
Dmitry Vyukov
9b410fb627
tsan: implement new version of standalong deadlock detector
...
intercept pthread_cond (it is required to properly track state of mutexes)
detect cycles in mutex graph
llvm-svn: 202975
2014-03-05 13:41:21 +00:00
Dmitry Vyukov
cd3583a4c7
tsan: include what you use
...
VPrintf uses common_flags()
llvm-svn: 202974
2014-03-05 13:40:05 +00:00
Alexey Samsonov
6dece3c99f
Add common interceptors for memchr/memrchr
...
llvm-svn: 202972
2014-03-05 13:25:32 +00:00
Alexey Samsonov
1464b5966d
[CMake] Minor fix to llvm-config discovery
...
llvm-svn: 202954
2014-03-05 09:21:49 +00:00
Alexey Samsonov
c8c38dbb18
Increase threshold in StackTrace::LocatePcInTrace
...
llvm-svn: 202950
2014-03-05 08:29:56 +00:00
Dmitry Vyukov
19126f9075
tsan: add interceptors for pthread_spinlock_t and ptread_rwlock_t for deadlock detector
...
llvm-svn: 202947
2014-03-05 08:10:27 +00:00
Dmitry Vyukov
30076b0244
tsan: add another missing windows atomic operation
...
llvm-svn: 202852
2014-03-04 14:21:42 +00:00
Dmitry Vyukov
0a650fe711
tsan: attempt to fix darwin build
...
everything except linux does not need this hackery with pthread_cond
llvm-svn: 202850
2014-03-04 14:16:28 +00:00
Alexey Samsonov
359c105c92
Fix StackTrace::LocatePcInTrace, add more unit tests for generic StackTrace
...
llvm-svn: 202849
2014-03-04 14:06:11 +00:00
Alexey Samsonov
d964e7cd81
[CMake] Test for libdl and libpthread presence
...
llvm-svn: 202847
2014-03-04 13:28:21 +00:00
Sergey Matveev
8bf42919e6
[msan] Make up for missing interceptor in getxattr() test.
...
llvm-svn: 202846
2014-03-04 13:13:34 +00:00
Alexey Samsonov
3d9adc0a73
[ASan] Speed up stack trace unwinding for stacks of size 2.
...
Summary:
We don't need to do any work in this case - just take
the current PC and caller PC.
Reviewers: eugenis, ygribov
Reviewed By: eugenis
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2936
llvm-svn: 202845
2014-03-04 13:12:25 +00:00
Dmitry Vyukov
d1d8653742
tsan: add dynamic library target for standalone deadlock detector
...
it's LD_PRELOAD-able
llvm-svn: 202843
2014-03-04 12:52:20 +00:00
Sergey Matveev
e7b3e4c2ae
[msan] Add missing line to getxattr() test.
...
llvm-svn: 202841
2014-03-04 12:41:18 +00:00
Alexey Samsonov
3e8467b8b9
Avoid doing any work when unwinding stack traces with 0 or 1 frame
...
llvm-svn: 202837
2014-03-04 12:21:28 +00:00
Dmitry Vyukov
9e3a217adb
tsan: fix windows build
...
llvm-svn: 202831
2014-03-04 11:57:25 +00:00
Dmitry Vyukov
54a0303fa8
tsan: add concurrent hashmap for standalone deadlock detector
...
llvm-svn: 202826
2014-03-04 11:39:56 +00:00
Dmitry Vyukov
e69df1f928
tsan: fix pthread_cond interceptors
...
currently tsan hangs when linked with a shared library linked against an old version of pthread
this change is another attempt to fix pthread_cond interceptors in different scenarios
see the comment for implementation details
llvm-svn: 202820
2014-03-04 11:11:40 +00:00
Tim Northover
d3405cbb5d
ARM: fix built-bots trying to use Thumb2 code on armv6m
...
llvm-svn: 202819
2014-03-04 11:10:58 +00:00
Dmitry Vyukov
975b02ad71
tsan: move all pthread_cond interceptors into sanitizer_common
...
llvm-svn: 202813
2014-03-04 10:17:40 +00:00
Tim Northover
1683caab3a
ARM: implement __sync_fetch_and_* operations
...
Since these are primarily useful for deeply embedded targets where code size is
very important, they are each in a separate file making use of infrastructure
in sync-ops.h. This allows a linker to include just the functions that are
actually used.
rdar://problem/14736665
llvm-svn: 202812
2014-03-04 10:10:17 +00:00
Alexey Samsonov
a7c602ac29
A set of trivial changes to support sanitizers on FreeBSD.
...
Patch by Viktor Kutuzov!
llvm-svn: 202801
2014-03-04 08:55:41 +00:00
Alexey Samsonov
a79696d9bf
[CMake] Port add_sanitizer_rt_symbols to CMake 3.0
...
Patch by Brad King.
Our add_sanitizer_rt_symbols macro reads the LOCATION property of a
library to compute the location of the "lib<name>.a.syms" file to
generate next to the corresponding "lib<name>.a" library file. CMake
3.0 introduces policy CMP0026 to disallow reading of the LOCATION target
property from non-imported targets in favor of the more powerful
$<TARGET_FILE> generator expression.
Teach add_sanitizer_rt_symbols to use the $<TARGET_FILE> generator
expression to compute the location of the symbols file to generate
with a custom command. CMake 3.0 also adds support for generator
expressions to install(FILES) so use it when available to simplify
installation of the symbols file of the proper configuration.
llvm-svn: 202797
2014-03-04 08:32:43 +00:00
Alexey Samsonov
72f17afd48
[CMake] Fix add_sanitizer_rt_symbols on multi-config CMake generators.
...
Patch by Brad King.
When using a multi-config generator with CMake, such as for VS or Xcode,
the LOCATION target property value contains a placeholder such as
"$(Configuration)" that is meant for substitution by the native build
tool. The install(FILES) command does not understand this name and will
not install the symbols file correctly when using these generators.
Teach add_sanitizer_rt_symbols to read the more-specific target property
LOCATION_<CONFIG> that has a per-configuration value and no placeholder.
On single-configuration generators (Makefile, Ninja), CMAKE_BUILD_TYPE
contains the name of the one configuration to be built. On multi-config
generators (VS, Xcode), CMAKE_CONFIGURATION_TYPES contains the list of
possible configurations. In the latter case, loop over the configs and
add a configuration-specific install(FILES) rule for each one.
Place the code block inside an if(TRUE) block so it can be made
conditional in a following change without updating indentation.
llvm-svn: 202796
2014-03-04 08:28:43 +00:00
Evgeniy Stepanov
2821fb7d18
[asan] Fix Android configure/make build.
...
Mirror recent cmake changes in the configure/make build system.
llvm-svn: 202793
2014-03-04 07:17:38 +00:00
Evgeniy Stepanov
f7abc8dff6
[msan] Tests for X86 SIMD bitshift intrinsic support.
...
llvm-svn: 202713
2014-03-03 13:52:36 +00:00
Dmitry Vyukov
530fb9414b
tsan: replace deadlock detector custom build script with cmake file
...
llvm-svn: 202708
2014-03-03 13:15:12 +00:00
Dmitry Vyukov
0df3a5688c
tsan: remove autogenerated file
...
llvm-svn: 202704
2014-03-03 12:46:02 +00:00
Joerg Sonnenberger
7e6a314d7c
Move __clzti2 into 128bit fragment.
...
llvm-svn: 202593
2014-03-01 15:57:30 +00:00
Joerg Sonnenberger
31a6db3eab
Avoid type pruning.
...
llvm-svn: 202592
2014-03-01 15:32:05 +00:00
Joerg Sonnenberger
6e99daab4c
Consistently use COMPILER_RT_ABI for all public symbols.
...
Move prototypes into headers and fix a few inconsistencies.
llvm-svn: 202591
2014-03-01 15:30:50 +00:00
Dmitry Vyukov
512a18e518
tsan: add standalone deadlock detector
...
llvm-svn: 202505
2014-02-28 14:52:20 +00:00
Dmitry Vyukov
9cffc9550b
tsan: allow to force use of __libc_malloc in sanitizer_common
...
llvm-svn: 202504
2014-02-28 14:46:53 +00:00
Dmitry Vyukov
7210cdd473
tsan: add include guards
...
llvm-svn: 202503
2014-02-28 14:46:05 +00:00
Dmitry Vyukov
811d16c953
tsan: prevent actual deadlock in deadlock detector test
...
llvm-svn: 202502
2014-02-28 14:34:25 +00:00
Kostya Serebryany
eae464f911
[sanitizer] speedup deadlock detector for the case when we acquire the first lock in a thread
...
llvm-svn: 202492
2014-02-28 11:56:14 +00:00
Kostya Serebryany
afc4f2af76
[sanitizer] speedup deadlock detector for the case when we destroy a mutex that has never been locked
...
llvm-svn: 202487
2014-02-28 10:59:33 +00:00
Dmitry Vyukov
6cfab724ec
tsan: refactor deadlock detector
...
Introduce DDetector interface between the tool and the DD itself.
It will help to experiment with other DD implementation,
as well as reuse DD in other tools.
llvm-svn: 202485
2014-02-28 10:48:13 +00:00
Dmitry Vyukov
371639ea1f
tsan: deflake test
...
llvm-svn: 202484
2014-02-28 10:47:07 +00:00
Kostya Serebryany
261993ad1a
[sanitizer] a test for recursive rwlock and deadlock detector (currently fails)
...
llvm-svn: 202480
2014-02-28 10:03:51 +00:00
Kostya Serebryany
b86b56c0db
[tsan] one more test for deadlock detector
...
llvm-svn: 202476
2014-02-28 09:17:16 +00:00
Alexey Samsonov
6c282b4149
[CMake] Fix PR18987: discard /MD flag if we're adding /MT
...
llvm-svn: 202472
2014-02-28 08:04:30 +00:00
Dmitry Vyukov
6403c34c2a
tsan: add new line at the end of error message
...
llvm-svn: 202470
2014-02-28 06:29:42 +00:00
Alexander Potapenko
e8c311a40c
[ASan] Make sure IOC_DIRMASK is undefined before redefining it.
...
llvm-svn: 202410
2014-02-27 16:46:06 +00:00
Dmitry Vyukov
d8c2fbd57f
tsan: another attempt to fix the tls_get_addr crash
...
llvm-svn: 202405
2014-02-27 15:07:45 +00:00
Dmitry Vyukov
46ebecc1fe
tsan: work around known bug in libstdc++
...
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58066
llvm-svn: 202403
2014-02-27 14:43:31 +00:00
Alexey Samsonov
247eb8e52e
Rewrite compiler-rt.llvm.org to make it relevant
...
llvm-svn: 202402
2014-02-27 14:39:48 +00:00
Kostya Serebryany
2ff42d98fa
[sanitizer] do not acquire a global mutex in deadlock detector when dealing with Unlock (it is essentially a thread-local operation)
...
llvm-svn: 202401
2014-02-27 14:38:42 +00:00
Dmitry Vyukov
a12923e265
tsan: intercept vfork
...
this fixes obscure false positives
see the comments and the test for details
llvm-svn: 202400
2014-02-27 14:36:16 +00:00
Kostya Serebryany
796f6557bf
[asan] *experimental* implementation of invalid-pointer-pair detector (finds when two unrelated pointers are compared or subtracted). This implementation has both false positives and false negatives and is not tuned for performance. A bug report for a proper implementation will follow.
...
llvm-svn: 202389
2014-02-27 12:45:36 +00:00
Timur Iskhodzhanov
a0091be449
Add myself as a c-rt owner of ASan/Win
...
llvm-svn: 202380
2014-02-27 12:07:43 +00:00
Dmitry Vyukov
17ca4d06c7
tsan: 2 more deadlock detector benchmarks
...
llvm-svn: 202379
2014-02-27 12:05:17 +00:00
Alexey Samsonov
6482bfedf2
Fix Howard's e-mail
...
llvm-svn: 202378
2014-02-27 11:00:21 +00:00
Alexey Samsonov
929a3080e9
Add CODE_OWNERS.TXT
...
llvm-svn: 202377
2014-02-27 10:51:48 +00:00
Evgeniy Stepanov
037c271f41
[sanitizer] Fix iOS build.
...
llvm-svn: 202374
2014-02-27 10:09:21 +00:00
Dmitry Vyukov
8a0813d944
tsan: fix deadlock detector lit test output
...
llvm-svn: 202368
2014-02-27 09:18:08 +00:00
Dmitry Vyukov
511118c762
tsan: add another deadlock detector benchmark
...
llvm-svn: 202366
2014-02-27 09:05:07 +00:00
Dmitry Vyukov
6fd67f9c7a
tsan: fix internal deadlock detector for external deadlock detector
...
we must go deeper!
llvm-svn: 202365
2014-02-27 09:02:58 +00:00
Evgeniy Stepanov
a16f327c27
[sanitizer] Sizes and layouts for sanitizers on FreeBSD.
...
Patch by Viktor Kutuzov.
llvm-svn: 202364
2014-02-27 09:02:08 +00:00
Evgeniy Stepanov
322e89c4e2
[asan] Install asan_device_setup to bin/ when targetting Android.
...
asan_device_setup is a utility that prepares a device to run code built with
ASan. Essentially, it installs ASan runtime library into the system. For this
reason, it has to be at a predictable relative path from the runtime library
itself. We also plan to distribute this utility, packaged with runtime library
and maybe llvm-symbolizer, to the users.
llvm-svn: 202362
2014-02-27 08:41:40 +00:00
Dmitry Vyukov
794500ae4e
tsan: add recursive deadlock detector benchmark
...
llvm-svn: 202361
2014-02-27 08:33:52 +00:00
Evgeniy Stepanov
6edfad4811
[asan] Don't disable SEGV handler on Android by default.
...
This is done mostly for consistency, because this setting is normally overridden in cmake.
llvm-svn: 202359
2014-02-27 08:23:00 +00:00
Dmitry Vyukov
c546943b6a
tsan: improve deadlock detector test
...
- allow to specify which test to run
- allow to specify number of iterations
- specify number of threads required in the test itself
llvm-svn: 202358
2014-02-27 08:04:20 +00:00
Alexey Samsonov
4cced3e19b
[CMake] Make sure add_compiler_rt_resource_file doesn't do unnecessary work
...
llvm-svn: 202356
2014-02-27 07:22:59 +00:00
Alexey Samsonov
8c4c09786a
Add accidentally removed -D
...
llvm-svn: 202355
2014-02-27 07:03:32 +00:00
Alexey Samsonov
e3e2a11ad9
Move COMPILER_RT_HAS_FUNC check from r202303 to config-ix.cmake
...
llvm-svn: 202353
2014-02-27 06:52:41 +00:00
Reid Kleckner
0140ce483f
Append -D__func__=__FUNCTION__ to SANITIZER_COMMON_CFLAGS
...
This way it gets picked up for all sanitizer libs, both sanitizer_common
and asan. I believe those are the only libs that build with asan.
There should be no need to set the __func__ definition inside
clang_compile.
llvm-svn: 202303
2014-02-26 21:54:39 +00:00
Joerg Sonnenberger
3d7afbb945
Undef helper macros after using them.
...
llvm-svn: 202298
2014-02-26 20:38:24 +00:00
Joerg Sonnenberger
9d09e2fe90
Reapply r201910. MSVC gets __func__ defined explicitly, even though it
...
can't build anything here.
llvm-svn: 202297
2014-02-26 20:33:22 +00:00
Joerg Sonnenberger
2b41390c89
Emulate C99/C++11 __func__ for Visual C++.
...
llvm-svn: 202296
2014-02-26 20:31:17 +00:00
Dmitry Vyukov
0f34a3ba8c
tsan: fix deadlock detector test so that it does not force contention in runtime
...
llvm-svn: 202278
2014-02-26 17:06:58 +00:00
Alexey Samsonov
14e061d7cc
Support 'q' length modifier in scanf/printf interceptors
...
llvm-svn: 202268
2014-02-26 14:42:38 +00:00
Alexander Potapenko
4b1a7fe33a
[ASan] Split interception-in-shared-lib-test.cc into two tests with platform-specific RUN commands.
...
Get rid of a TestCases/SharedLibs/shared-lib-test-so.cc dependency in these tests.
llvm-svn: 202267
2014-02-26 14:05:57 +00:00
Kostya Serebryany
78443cfda6
[asan] remove UB (comparison of two unrelated pointers) from a test
...
llvm-svn: 202266
2014-02-26 13:53:23 +00:00
Evgeniy Stepanov
f4dcf77623
[asan] Fix printing of long reports to logcat on Android.
...
__android_log_write has an implicit message length limit.
Print one line at a time.
llvm-svn: 202250
2014-02-26 09:39:55 +00:00
Evgeniy Stepanov
e23add20ae
[sanitizer] Add a flag to enable/disable report colorization.
...
llvm-svn: 202249
2014-02-26 09:06:59 +00:00
Evgeniy Stepanov
3ff723f373
[asan] asan_device_setup: fix a typo in usage text
...
llvm-svn: 202246
2014-02-26 08:12:28 +00:00
Evgeniy Stepanov
84610ed7bf
[asan] Remove .sh extension from asan_device_setup.
...
llvm-svn: 202245
2014-02-26 08:10:03 +00:00
Alexey Samsonov
10d0003a21
Revert r201783 until all FreeBSD fixes are submitted.
...
llvm-svn: 202244
2014-02-26 07:50:28 +00:00
NAKAMURA Takumi
9cd9ad6b9d
[CMake] Introduce cmake_policy(CMP0022) for target_link_libraries(INTERFACE|PRIVATE).
...
For now, use both keywords, INTERFACE and PRIVATE via the variable,
- ${cmake_2_8_12_INTERFACE}
- ${cmake_2_8_12_PRIVATE}
They could be cleaned up when we introduce 2.8.12.
llvm-svn: 202239
2014-02-26 06:45:11 +00:00
Richard Trieu
a170f08109
Remove 'tctx->name' from a logical statement since it is a pointer and always
...
is converted to a true value. Detected by Clang's improved -Wbool-conversion
llvm-svn: 202223
2014-02-26 03:12:51 +00:00
Evgeniy Stepanov
6697dc6aa3
[asan] Remove extra sonames from libraries in tests.
...
llvm-svn: 202156
2014-02-25 15:25:37 +00:00
Kostya Serebryany
67968cbf93
[sanitizer] minimal support for recursive locks indeadlock detector
...
llvm-svn: 202153
2014-02-25 14:02:01 +00:00
Evgeniy Stepanov
e4d8577c69
[asan] Reenable waitid test on Android.
...
waitid() is present since API level 9 (Android 2.3). That's old enough.
llvm-svn: 202149
2014-02-25 13:24:42 +00:00
Alexey Samsonov
98aa08c0e9
Update sanitizers' bash scripts.
...
* Fix bash scripts to work on FreeBSD (patch by Viktor Kutuzov)
* Update locations of lit tests in check_lint script.
llvm-svn: 202145
2014-02-25 12:09:25 +00:00
Alexander Potapenko
2d4b60f9a3
[ASan] Don't set rpath when building ASan runtime libraries.
...
This should fix the issues with `make check-asan` on OS X.
llvm-svn: 202144
2014-02-25 11:54:25 +00:00
Kostya Serebryany
01be296dbb
[sanitizer] support pthread_rwlock_rd* in deadlock detector
...
llvm-svn: 202132
2014-02-25 10:33:37 +00:00
Kostya Serebryany
fd88edfddb
[sanitizer] partially support pthread_rwlock_* (no rd* form yet)
...
llvm-svn: 202128
2014-02-25 09:33:10 +00:00
Kostya Serebryany
a1a6391d19
[asan] Fix for size_t in Asan's new and delete operators on x64 FreeBSD in 32-bit mode, only for FreeBSD <= 9.2; patch by Viktor Kutuzov
...
llvm-svn: 202124
2014-02-25 08:45:59 +00:00
Kostya Serebryany
8f240ec03f
[tsan] add deadlock detector tests for pthread_spin_lock
...
llvm-svn: 202123
2014-02-25 08:42:34 +00:00
Alexey Samsonov
97c22f79e1
Enable UBSan on FreeBSD. Patch by Viktor Kutuzov.
...
llvm-svn: 202122
2014-02-25 08:29:36 +00:00
Kostya Serebryany
11f4f30fa7
[sanitizer] add support for try_lock in deadlock detector
...
llvm-svn: 202120
2014-02-25 08:24:15 +00:00
Kostya Serebryany
6d54611fd4
[sanitizer] fix epoch handling in deadlock detector (before the fix, we could have had edges from locks in the previous epoch to locks in the current epoch)
...
llvm-svn: 202118
2014-02-25 07:34:41 +00:00
Evgeniy Stepanov
4bf7a268e0
[asan] Add a test for interceptors in shared libraries.
...
llvm-svn: 202037
2014-02-24 14:31:28 +00:00
Kostya Serebryany
cc92c79531
[asan] simplify the code that compute the shadow offset; get rid of two internal flags that allowed to override it. The tests pass, but still this change might break asan on some platform not covered by tests. If you see this, please submit a fix with a test.
...
llvm-svn: 202033
2014-02-24 13:40:24 +00:00
Kostya Serebryany
d77dfcb384
[tsan] one more test for deadlock detector
...
llvm-svn: 202026
2014-02-24 11:45:47 +00:00
Evgeniy Stepanov
c0ae3dfc3a
[asan] A test was reverted, but not "svn rm"-ed in r202016.
...
llvm-svn: 202025
2014-02-24 11:43:47 +00:00
Alexey Samsonov
a2fee5d907
[CMake] Better support for COMPILER_RT_ENABLE_WERROR. Make sure compiler-rt libraries are build by 'make all' command
...
llvm-svn: 202023
2014-02-24 11:32:49 +00:00
Dmitry Vyukov
a661a13c0f
tsan: fix SIGRTMAX handling
...
llvm-svn: 202022
2014-02-24 11:28:59 +00:00
Alexey Samsonov
2f27f0b0ee
[CMake] Introduce COMPILER_RT_ENABLE_WERROR option
...
llvm-svn: 202021
2014-02-24 11:22:39 +00:00
Evgeniy Stepanov
4c32d16c76
Revert r202014.
...
Failing on the bots for an unknown reason.
llvm-svn: 202016
2014-02-24 10:21:44 +00:00
Evgeniy Stepanov
567e0eef4c
[asan] Add a test for interceptors in shared libraries.
...
llvm-svn: 202014
2014-02-24 10:04:42 +00:00
Evgeniy Stepanov
d512234d7e
[asan] Avoid hardcoding library path in test binary.
...
llvm-svn: 202013
2014-02-24 10:03:33 +00:00
Kostya Serebryany
cf5d8e4f29
AdjustStackSizeLinux() is used in Lsan, Tsan and Msan non-Linux-specific code so it seems it should have more generic name and moved to a common scope.
...
Renamed to AdjustStackSize.
Patch by Viktor Kutuzov.
llvm-svn: 202011
2014-02-24 08:53:26 +00:00
Kostya Serebryany
04f2bf0f07
[sanitizer] Interception macros for sanitizers on FreeBSD; patch by Viktor Kutuzov
...
llvm-svn: 202009
2014-02-24 08:37:41 +00:00
Dmitry Vyukov
249cd9af9c
tsan: fix compiler warning
...
error: address of array 'tctx->name' will always evaluate to 'true'
llvm-svn: 202008
2014-02-24 08:19:53 +00:00
Reid Kleckner
324eee45a7
Revert "Replace __FUNCTION__ with __func__, the latter being standard C99/C++11."
...
This reverts commit r201910.
While __func__ may be standard in C++11, it was only recently added to
MSVC in 2013 CTP, and LLVM supports MSVC 2012. __FUNCTION__ may not be
standard, but it's *very* portable.
llvm-svn: 201916
2014-02-22 00:37:45 +00:00
Joerg Sonnenberger
b15779f307
Replace __FUNCTION__ with __func__, the latter being standard C99/C++11.
...
llvm-svn: 201910
2014-02-21 23:55:15 +00:00
Joerg Sonnenberger
938b0df72d
Introduce CRT_HAS_128BIT, currently for all __LP64__ platforms.
...
Use it to enable the various functions for TI mode.
llvm-svn: 201909
2014-02-21 23:53:03 +00:00
Joerg Sonnenberger
e245715fca
Add Matt Thomas and myself.
...
llvm-svn: 201908
2014-02-21 23:51:38 +00:00
Kostya Serebryany
0548c79859
[tsan] add coarse-grained lock around the DeadlockDetector. We can do better than that, but that's a start.
...
llvm-svn: 201861
2014-02-21 15:07:18 +00:00
Tim Northover
23a2fb59b6
Darwin: use the compiler-provided linker
...
When actually compiling we use clang for the final .dylib creation stage, so we
should ask it what linker it'll use when detecting support for our
architectures.
llvm-svn: 201845
2014-02-21 10:19:22 +00:00
Bob Wilson
96e99556ad
Add an environment variable to override the default profile output file.
...
Also rename the default output file from "pgo-data" to "default.profdata".
The ".profdata" suffix is consistent with the name of the new llvm-profdata
tool.
llvm-svn: 201808
2014-02-20 19:52:32 +00:00
Alexey Samsonov
b106f2c0ac
[FreeBSD] Enable building a few runtime libraries on FreeBSD.
...
Patch by Viktor Kutuzov!
llvm-svn: 201783
2014-02-20 13:14:05 +00:00
Alexey Samsonov
04e7ad29ea
[CMake] Introduce check-all command for standalone compiler-rt build
...
llvm-svn: 201780
2014-02-20 12:36:26 +00:00
Alexey Samsonov
35a66d15d4
Move config for sanitizer_common tests under test/ for consistency
...
llvm-svn: 201779
2014-02-20 12:18:08 +00:00
Alexey Samsonov
11705b2f10
[CMake] break dependency between unit tests and runtimes in standalone build
...
llvm-svn: 201778
2014-02-20 12:03:56 +00:00
Evgeniy Stepanov
e0e980c748
[msan] Remove stubs for non-instrumented code from msan interface header.
...
llvm-svn: 201777
2014-02-20 11:43:00 +00:00
Alexey Samsonov
5e6d83258e
[CMake] lit tests shouldn't depend on runtimes in standalone build
...
llvm-svn: 201771
2014-02-20 09:47:18 +00:00
Evgeniy Stepanov
0f56a71859
[asan] Changes to asm instrumentation must be done through the generator script.
...
llvm-svn: 201766
2014-02-20 07:56:58 +00:00
Evgeniy Stepanov
8126e76a8a
[asan] Do all calls to __asan_report_* through PLT.
...
This matters when runtime is built as a shared library. Even though calling
code is itself part of the same library, these symbols are public and can
(theoretically) be interposed.
It might be better to declare hidden aliases for asan_report_* and call them
directly, but
(a) they are (noreturn), so performance does not matter, and
(b) it may be potentially less portable.
llvm-svn: 201764
2014-02-20 07:54:29 +00:00
Alexey Samsonov
31043152d3
Add rudimentary support for running compiler-rt lit tests with GCC
...
llvm-svn: 201680
2014-02-19 15:13:14 +00:00
Kostya Serebryany
699b975014
[tsan] improve the test that checks for lock inversion with 3 locks
...
llvm-svn: 201676
2014-02-19 14:24:31 +00:00
Kostya Serebryany
b51f8d4990
[tsan] when printing a mutex, also print its address. Properly print the deadlock report.
...
llvm-svn: 201675
2014-02-19 14:17:25 +00:00
Alexey Samsonov
8067448dfe
[CMake] Use host compiler to run lit tests in standalone mode
...
llvm-svn: 201674
2014-02-19 13:45:49 +00:00
Evgeniy Stepanov
cba008e9c5
[asan] A different way of detectinb stack overflow.
...
Instead of checking stack limits that are not well defined for the main thread,
we rely on siginfo::si_code and distance from SP.
llvm-svn: 201673
2014-02-19 13:40:41 +00:00
Alexey Samsonov
150d62aa2a
[CMake] Use host compiler to build unittests in standalone mode
...
llvm-svn: 201672
2014-02-19 13:01:03 +00:00
Evgeniy Stepanov
cc8e58bc46
[asan] Ensure that stack is limited before attempting to overflow it.
...
Very bad things happen otherwise.
llvm-svn: 201670
2014-02-19 12:43:27 +00:00
Alexey Samsonov
cd8535a96d
[CMake] Introduce COMPILER_RT_INCLUDE_TESTS option
...
llvm-svn: 201666
2014-02-19 11:18:47 +00:00
Evgeniy Stepanov
2274ba7716
[asan] Improve stack overflow detection.
...
There are more cases when those manifest as an access below SP.
llvm-svn: 201664
2014-02-19 11:02:46 +00:00
Alexey Samsonov
aa980c760b
[CMake] Add the way to run tests in standalone build.
...
1) Depend on llvm-config (configured in LLVM_CONFIG_PATH) to
get necessary LLVM source/binary directories.
2) Add basic support for running lit tests (check-xsan commands).
For now this "support" is far from what we want:
* unit tests are not built currently.
* lit tests use Clang/compiler-rt from LLVM build directory,
not the host compiler or just-built compiler-rt libraries.
We should make a choice on the way we intend ti run compiler-rt lit testsuite:
a) use either Clang from LLVM build tree, or the host compiler.
b) use either just-built runtimes, or the runtimes shipped with the
host compiler.
Using just-built runtimes is tricky - we have to know where to put them, so that
Clang/GCC driver would pick them up (and not overwrite the existing runtimes).
Using a host compiler instead of Clang from LLVM build tree will give us a chance to
run lit tests under GCC (which already has support for several sanitizers).
That is, I tend to make the following choice: if we're in a standalone compiler-rt
build, use host compiler with its set of runtime libraries to run lit tests.
This will effectively decouple "make compiler-rt" and "make check-compiler-rt" in
a standalone build - the latter wouldn't invoke the former. Note that if we decide
to fix LLVM/Clang/compiler-rt build system so that it would configure/build
compiler-rt with just-built Clang (as we do in Makefile-based build), this will not
be a problem - we can add a dependency to ensure that clang/compiler-rt are rebuilt
before running compiler-rt tests.
llvm-svn: 201656
2014-02-19 10:04:29 +00:00
Evgeniy Stepanov
caaaac8c30
[asan] Disable asm instrumentation and tests on Mac.
...
Move asm tests to their own file.
llvm-svn: 201653
2014-02-19 09:14:39 +00:00
Evgeniy Stepanov
182319f7ba
[asan] Fix build on ARM.
...
llvm-svn: 201652
2014-02-19 09:01:14 +00:00
Evgeniy Stepanov
2169c6bba4
[asan] Added assembly functions for x86/amd64 asan.
...
These are runtime support functions for inline assembly instrumentation.
This is a re-submit of r201402.
Patch by Yuri Gorshenin.
llvm-svn: 201650
2014-02-19 08:30:39 +00:00
Alexey Samsonov
de4ef2a066
[CMake] Rudimentary support for standalone CompilerRT build system.
...
This change allows to build compiler-rt libraries separately from
LLVM/Clang (path to LLVM build directory should be specified at
configure time). Running tests is not yet supported.
llvm-svn: 201647
2014-02-19 07:49:16 +00:00
Timur Iskhodzhanov
cb9dc67a5e
[ASan/Win] Add a couple more DLL thunks
...
llvm-svn: 201580
2014-02-18 15:31:29 +00:00
Kostya Serebryany
37ce26cb16
[sanitizer] when reporting a deadlock also report the lock cycle
...
llvm-svn: 201576
2014-02-18 14:56:19 +00:00
Alexey Samsonov
1181a104e6
[CMake] Rename several variables
...
llvm-svn: 201575
2014-02-18 14:28:53 +00:00
Kostya Serebryany
bd86a29a2a
[sanitizer] make sure the deadlock detector survives the change of epochs; add a test and a comment
...
llvm-svn: 201572
2014-02-18 13:41:49 +00:00
Evgeniy Stepanov
b036778bdb
[asan] Relax stack-overflow test.
...
llvm-svn: 201571
2014-02-18 13:11:40 +00:00
Kostya Serebryany
aa416c39cd
[tsan] in deadlock detector do not register locks on their creation and unregister them on destruction; added a relevant test
...
llvm-svn: 201568
2014-02-18 12:50:31 +00:00
Evgeniy Stepanov
a50abe6656
[asan] Disable stack-overflow test on main thread.
...
Failing on some bots.
llvm-svn: 201567
2014-02-18 12:29:39 +00:00
Alexey Samsonov
1dbe6e071f
[CMake] Don't build ASan for iossim if -mmacosx-version-min is specified
...
llvm-svn: 201566
2014-02-18 12:01:24 +00:00
Evgeniy Stepanov
65b959afad
[asan] Stack overflow detection.
...
Report segmentation faults near or below stack bottom as stack-overflow
(not stack-buffer-overflow!).
llvm-svn: 201565
2014-02-18 11:49:52 +00:00
Evgeniy Stepanov
1b16a9d3b0
[asan] Fix one test on OSX.
...
llvm-svn: 201564
2014-02-18 11:32:24 +00:00
Evgeniy Stepanov
50bef914a6
[asan] Override default sigaltstack setting on Android.
...
Android libc always sets altstack on non-main threads, but it is too small for
our unwinder. With use_sigaltstack=1, override this setting with a larger one.
llvm-svn: 201557
2014-02-18 11:14:30 +00:00
Alexey Samsonov
63a4af7346
[CMake] Add top-level target for each compiler-rt library, and add 'compiler-rt' target encompassing them all.
...
llvm-svn: 201556
2014-02-18 09:33:45 +00:00
Kostya Serebryany
67bf8bd124
[tsan] one more lit test for deadlock detector; more to come
...
llvm-svn: 201554
2014-02-18 09:08:03 +00:00
Alexey Samsonov
2769570556
Simplify lit test configs for LSan and UBSan by using a generic config
...
llvm-svn: 201553
2014-02-18 08:56:49 +00:00
Alexey Samsonov
eb6ef12203
Drop test/asan/GenericConfig directory
...
llvm-svn: 201552
2014-02-18 08:24:28 +00:00
Alexey Samsonov
878a9a5de2
[CMake] Check for -fPIE and -ffreestanding flags for consistency
...
llvm-svn: 201549
2014-02-18 08:07:09 +00:00
Evgeniy Stepanov
77d9ae6c0f
[asan] Replace rand_r with rand in test.
...
llvm-svn: 201548
2014-02-18 08:03:44 +00:00
Alexey Samsonov
b73db72a17
[CMake] Simplify setting compile flag disabling RTTI
...
llvm-svn: 201547
2014-02-18 07:52:40 +00:00
Evgeniy Stepanov
2eea2850a4
[asan] Make __cxa_demangle non-weak symbol on Android.
...
This fixes global-demangle.cc test on Android.
https://code.google.com/p/address-sanitizer/issues/detail?id=264
llvm-svn: 201545
2014-02-18 07:34:52 +00:00
Alexey Samsonov
4dcbe7e959
Remove debug print
...
llvm-svn: 201544
2014-02-18 07:30:37 +00:00
Alexey Samsonov
9a1ffce25a
[CMake] Simplify code for detecting/setting compiler flags
...
llvm-svn: 201543
2014-02-18 07:26:58 +00:00
Kostya Serebryany
6774f2241d
[sanitizer] add tests for DeadlockDetector, minor fix in onLock
...
llvm-svn: 201514
2014-02-17 14:57:49 +00:00
Alexey Samsonov
1c9b9bcb5c
Simplify defining Clang compile flags in lit configs
...
llvm-svn: 201513
2014-02-17 13:08:10 +00:00
Evgeniy Stepanov
9e629abf1e
[asan] Add a test for stack unwinding in new and delete.
...
llvm-svn: 201511
2014-02-17 11:52:29 +00:00
Evgeniy Stepanov
fba430d299
Update license.txt to point to the new code in third_party/android.
...
Also remove a reference to mach_override code that is long gone.
llvm-svn: 201510
2014-02-17 11:41:22 +00:00
Kostya Serebryany
73325589dc
[sanitizer] implement node removal in Deadlock graph
...
llvm-svn: 201509
2014-02-17 11:21:52 +00:00
Alexey Samsonov
599290e1ca
[compiler-rt] Fix CompilerTargetTriple for non-English locales.
...
When the locale of a shell is set other than English locales or the C locale,
The word 'Target' may be translated. Thus, with e.g. ja_JP locale, compiler-rt
couldn't be built properly. Forcing LANG=C fixes the problem.
Patch by Ogino Masanori.
llvm-svn: 201506
2014-02-17 09:14:01 +00:00
Kostya Serebryany
ec68429c5d
[sanitizer] simplify DeadlockDetectorTLS
...
llvm-svn: 201505
2014-02-17 08:47:48 +00:00
Kostya Serebryany
46177baddb
[sanitizer] add one more test for deadlock detection stuff
...
llvm-svn: 201503
2014-02-17 07:39:44 +00:00
Alexey Samsonov
f1b7d05558
LSan: Print warning about dynamic linker only in verbose mode
...
llvm-svn: 201421
2014-02-14 15:12:46 +00:00
Evgeniy Stepanov
6c34935292
[asan] Replace posix_memalign with memalign in test.
...
Android does not provide posix_memalign.
llvm-svn: 201420
2014-02-14 15:02:36 +00:00
Alexey Samsonov
9a70077b47
[ASan] Rename asan_runtime_libraries to asan. Re-enable tests on Android.
...
llvm-svn: 201417
2014-02-14 14:45:13 +00:00
Evgeniy Stepanov
cbb2d5eee4
[asan] Disabled one more test on Android.
...
llvm-svn: 201416
2014-02-14 14:37:13 +00:00
Evgeniy Stepanov
44f5d8a49f
[asan] Change stack uar test to not use ulimit.
...
Because of how Android test runner is implemented, ulimit in RUN: line
gets executed on the host machine and does not affect the test.
llvm-svn: 201415
2014-02-14 14:36:42 +00:00
Alexey Samsonov
e6a6183e9b
Move TSan lit-tests under test/tsan
...
llvm-svn: 201414
2014-02-14 14:35:48 +00:00
Alexey Samsonov
9f20d67034
Move ASan lit-tests under test/asan
...
llvm-svn: 201413
2014-02-14 14:06:10 +00:00
Alexey Samsonov
8434e60f7e
Move MSan lit-tests under test/msan
...
llvm-svn: 201412
2014-02-14 13:02:58 +00:00
Evgeniy Stepanov
0de2b9b1e2
[asan] Revert r201402, r201404.
...
Test fails in bootstrap build.
llvm-svn: 201411
2014-02-14 12:37:41 +00:00
Evgeniy Stepanov
a21280307f
[sanitizer] Fix getpwuid_r (and similar) interceptors missing one of the arguments.
...
llvm-svn: 201410
2014-02-14 12:32:15 +00:00
Alexey Samsonov
7eeef85bd4
Move LSan test suite under test/
...
llvm-svn: 201408
2014-02-14 12:26:05 +00:00
Kostya Serebryany
a63632a5c6
[tsan] rudimentary support for deadlock detector in tsan (nothing really works yet except for a single tiny test). Also rename tsan's DeadlockDetector to InternalDeadlockDetector
...
llvm-svn: 201407
2014-02-14 12:20:42 +00:00
Alexey Samsonov
127e93e4dc
Delete LSan unit tests
...
llvm-svn: 201406
2014-02-14 12:13:59 +00:00
Kostya Serebryany
e233d8618d
[sanitizer] add iterators to bit vectors; make bit vector operations use little stack; add common flag 'detect_deadlocks'
...
llvm-svn: 201405
2014-02-14 12:08:23 +00:00
Evgeniy Stepanov
d2821f5af0
[asan] Disable assembly on windows.
...
llvm-svn: 201404
2014-02-14 12:07:22 +00:00
Alexey Samsonov
f6cf6ab53b
Move DFSan test suite under test/
...
llvm-svn: 201403
2014-02-14 12:05:41 +00:00
Evgeniy Stepanov
f335bd9c69
[asan] Added assembly functions for x86/amd64 asan.
...
These are runtime support functions for inline assembly instrumentation.
Patch by Yuri Gorshenin.
llvm-svn: 201402
2014-02-14 11:55:53 +00:00
Alexey Samsonov
ba869e79a0
Move UBSan test suite under test/
...
llvm-svn: 201401
2014-02-14 11:42:22 +00:00
Evgeniy Stepanov
05938a23f5
[sanitizer] Use mmap to zero-fill large shadow regions.
...
This is covered by existing ASan test.
This does not change anything for TSan by default (but provides a flag to
change the threshold size).
Based on a patch by florent.bruneau here:
https://code.google.com/p/address-sanitizer/issues/detail?id=256
llvm-svn: 201400
2014-02-14 11:41:26 +00:00
Alexey Samsonov
81a2b466e9
Move shared configs for lit test suites to test/ and unittests/ directories
...
llvm-svn: 201399
2014-02-14 11:00:07 +00:00
Evgeniy Stepanov
fb74ea80dc
[msan] Replicate mmap-below-shadow check in mmap64 interceptor.
...
llvm-svn: 201397
2014-02-14 09:49:29 +00:00
Alexey Samsonov
8c1441f860
Move tests for BlocksRuntime and builtins to corresponding directories under test/
...
llvm-svn: 201396
2014-02-14 09:47:31 +00:00
Evgeniy Stepanov
aa9d74cc5d
[asan] Android test runner for ASan lit tests.
...
This change replaces 32- and 64- bit config.in-s with a single config template
that is used to generate both 32 and 64 bits configs as well as the new
arm-android config. Arm-android config is special because it can run tests on
a remote device over adb (android debug bridge).
We replace %clang with a script that run the compiler, upload the result to
the device, and replaces it with another script. The second script runs the
binary on the device and delivers stdout/stderr/exitcode back.
llvm-svn: 201394
2014-02-14 09:22:10 +00:00
Alexey Samsonov
a6b264b51d
Move original compiler-rt functions (libgcc replacement) to lib/builtins directory
...
llvm-svn: 201393
2014-02-14 09:20:33 +00:00
Alexander Potapenko
0b28ea9c47
[libsanitizer] Create SanitizerCommonDecorator which provides the Warning() and EndWarning() methods
...
(needed for SEGV handling in sanitizer_common)
llvm-svn: 201392
2014-02-14 08:59:42 +00:00
Alexey Samsonov
b8665226ec
Move BlocksRuntime to lib/ directory
...
llvm-svn: 201390
2014-02-14 08:38:30 +00:00
Kostya Serebryany
efe2f7e2c8
[sanitizer] replace MostSignificantSetBitIndex with LeastSignificantSetBitIndex in bit vector (to iterate bits in increasing order)
...
llvm-svn: 201339
2014-02-13 15:59:00 +00:00
Kostya Serebryany
67d419736a
[sanitizer] optimize TwoLevelBitVector::intersectsWith, extend tests, fix a check
...
llvm-svn: 201338
2014-02-13 15:45:20 +00:00
Evgeniy Stepanov
5cb24b8ca9
[asan] Disable 1 test on Android.
...
llvm-svn: 201332
2014-02-13 14:37:25 +00:00
Evgeniy Stepanov
4e6096b859
[asan] Remove extra clone() arguments in test.
...
Android headers define clone() as a 4-argument function without ellipsis.
llvm-svn: 201331
2014-02-13 14:37:04 +00:00
Evgeniy Stepanov
f79669a323
[asan] Enable signal and sigaction interceptors on Android.
...
Fixes AddressSanitizer.SignalTest breakage.
llvm-svn: 201330
2014-02-13 14:33:24 +00:00
Evgeniy Stepanov
8978389a32
[asan] Enable SEGV handler on Android by default.
...
Seems stable enough.
Fixes null_deref.cc test.
llvm-svn: 201326
2014-02-13 13:43:47 +00:00
Evgeniy Stepanov
3bec7a9c77
[sanitizer] Fix off-by-one-line in SEGV reports on Android.
...
This will be covered by null_deref.cc test (requires one more fix to pass).
llvm-svn: 201325
2014-02-13 13:32:24 +00:00
Evgeniy Stepanov
391f0234eb
[asan] Fix null_deref test with zero base shadow.
...
With zero base shadow, shadow for near-zero access is itself at near-zero
location. As a result, this test crashes on the shadow access, and not on the
app access.
Relax a check to match this behavior.
llvm-svn: 201324
2014-02-13 13:04:39 +00:00
Kostya Serebryany
07526fb4a0
[sanitizer] address some of the dvyukov's comments on previous commits
...
llvm-svn: 201322
2014-02-13 12:39:21 +00:00
Evgeniy Stepanov
788527d9cd
Remove a check from strerror_r test.
...
It's not always true: on Android, strerror_r with invalid errno
prints "Unknown error ..." to the buffer and returns 0.
This test now only checks that strerror_r does not crash.
llvm-svn: 201321
2014-02-13 12:24:10 +00:00
Kostya Serebryany
f6cb35abb4
[sanitizer] findPath for deadlock detector
...
llvm-svn: 201306
2014-02-13 09:52:15 +00:00
Evgeniy Stepanov
14ca0627d5
[asan] Avoid deadlock in CovDump.
...
llvm-svn: 201304
2014-02-13 08:50:36 +00:00
Kostya Serebryany
c98ce28533
[sanitizer] AArch64 sanitizer support; patch by Christophe Lyon and Yvan Roux
...
llvm-svn: 201303
2014-02-13 07:50:20 +00:00
Kostya Serebryany
5e52d48e3a
[sanitizer] more code for deadlock detector, nothing really works yet (except for small unit tests).
...
llvm-svn: 201302
2014-02-13 07:44:51 +00:00
Sergey Matveev
2a01b2f86f
[sanitizer] Intercept capget()/capset().
...
Also, fix incorrect syscall hooks for the corresponding syscalls.
llvm-svn: 201252
2014-02-12 19:29:49 +00:00
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