Kuba Brecka
bb39671516
[compiler-rt] Make MaybeReexec properly process DYLD_INSERT_LIBRARIES when using non-absolute paths
...
MaybeReexec() in asan_mac.cc checks for presence of the ASan dylib in DYLD_INSERT_LIBRARIES, and if it is there, it will process this env. var. and remove the dylib from its value, so that spawned children don't have this variable set. However, the current implementation only works when using a canonical absolute path to the dylib, it fails to remove the dylib for example when using @executable_path.
This patch changes the processing of DYLD_INSERT_LIBRARIES to comparing values only based on filenames (ignoring directories).
Reviewed at http://reviews.llvm.org/D7160
llvm-svn: 228392
2015-02-06 12:07:29 +00:00
Yury Gribov
55aae51325
[UBSan] Enable -Wglobal-constructors.
...
llvm-svn: 228384
2015-02-06 05:53:08 +00:00
Alexander Potapenko
1c4d621556
[ASan] Fix interface_symbols_darwin.c test
...
by manually adding __asan_mz_* to the generated interface functions list.
Declaring these functions in asan_interface_internal.h doesn't work quite well:
their prototypes must match the prototypes of zone functions in malloc/malloc.h,
but some of the types (e.g. malloc_zone_t and size_t) aren't available in
asan_interface_internal.h
llvm-svn: 228290
2015-02-05 13:07:50 +00:00
Juergen Ributzka
6e25858b5c
Revert "[ASan] Add the new __asan_mz_* symbols to asan_interface_internal.h"
...
Reverting r228137 to unbreak the build bots.
llvm-svn: 228172
2015-02-04 19:14:35 +00:00
Alexander Potapenko
42fa73cef0
[ASan] Add the new __asan_mz_* symbols to asan_interface_internal.h
...
to fix the interface_symbols_darwin.c test.
llvm-svn: 228137
2015-02-04 12:42:12 +00:00
Viktor Kutuzov
2ea54bcb28
[Msan] Fix the pthread_attr_get unit test to build on FreeBSD
...
Differential Revision: http://reviews.llvm.org/D7342
llvm-svn: 228125
2015-02-04 09:08:00 +00:00
Kostya Serebryany
77cc729ad7
[sanitizer] add another workaround for PR 17409: when over a threshold emit coverage instrumentation as calls.
...
llvm-svn: 228102
2015-02-04 01:21:45 +00:00
Renato Golin
b61cd95431
Revert "Enabling testing ASAN on AArch64"
...
This reverts commit r227966, which turned ASAN on on AArhc64 and may be the
cause of the bots never finishing the check-all. I'll re-apply once we're
sure that bot can cope with it.
llvm-svn: 228023
2015-02-03 20:23:00 +00:00
Kostya Serebryany
cc0c773f76
[sanitizer] move the coverage interface into a separate header, <sanitizer/coverage_interface.h>. NFC, except for the header name change. This may break existing users, but in this case it's better this way (not too many users so far)
...
llvm-svn: 228017
2015-02-03 19:40:53 +00:00
Alexey Samsonov
9cea2c1035
[ASan] Run tests with both static and dynamic runtime on Windows by default.
...
llvm-svn: 228001
2015-02-03 18:40:34 +00:00
Alexander Potapenko
270000c194
[ASan] Remove ifdefs for MAC_OS_X_VERSION_10_6, as ASan assumes OSX >= 10.6
...
llvm-svn: 227968
2015-02-03 12:47:15 +00:00
Alexander Potapenko
f203ba35f1
[ASan] Add __asan_ prefix for "mz_*" allocation/deallocation functions
...
and make them global so that they're not removed by `strip -x`.
llvm-svn: 227967
2015-02-03 12:38:10 +00:00
Renato Golin
af1f7d759f
Enabling testing ASAN on AArch64
...
Also, disabling BuiltinLongJmpTest, as it fails for ARM and PPC as well.
Patch by Christophe Lyon.
llvm-svn: 227966
2015-02-03 11:26:52 +00:00
Yury Gribov
8f848ff5ed
[ASan] Add use_madv_dontdump flag.
...
Differential Revision: http://reviews.llvm.org/D7294
llvm-svn: 227959
2015-02-03 10:15:15 +00:00
Stephen Hines
4e52d78767
Remove invalid const qualifier for r0, since it is written by svc.
...
Summary: This causes an invalid lvalue error when building for Android.
Reviewers: danalbert
Reviewed By: danalbert
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D7306
llvm-svn: 227907
2015-02-03 01:35:39 +00:00
Alexey Samsonov
ec80d97c77
[TSan] Fix remaining bashism in buildgo.sh script.
...
llvm-svn: 227893
2015-02-02 23:14:46 +00:00
Alexey Samsonov
d45837155d
[TSan] Update check_analyze.sh expectations to match trunk Clang output.
...
llvm-svn: 227877
2015-02-02 22:17:23 +00:00
Alexey Samsonov
1270c530e8
[TSan] Fix Go sanity check script.
...
llvm-svn: 227870
2015-02-02 22:07:39 +00:00
Alexey Samsonov
46fe4a640d
[TSan] Add Go runtime sanity check to CMake build.
...
llvm-svn: 227852
2015-02-02 20:37:28 +00:00
Alexey Samsonov
1ad375d034
[Sanitizer] Fix checking for weak function presence.
...
llvm-svn: 227851
2015-02-02 20:37:26 +00:00
Alexey Samsonov
c91ffd2c8f
[TSan] Build runtime with -msse3 flag.
...
llvm-svn: 227850
2015-02-02 20:37:25 +00:00
Timur Iskhodzhanov
e5935ef0c4
[ASan/Win] Add some diagnostics to help investigate Mprotect failures
...
llvm-svn: 227803
2015-02-02 15:04:23 +00:00
Timur Iskhodzhanov
82cd135738
[ASan/Win] Add a test case for r208215 [stack buffer overflow in <iostream>]
...
The issue re-appears if one uses the -fsanitize-blacklist= flag,
so it's time to have a test case.
llvm-svn: 227799
2015-02-02 12:31:11 +00:00
Viktor Kutuzov
4cd3ee38e4
Fix missed #endif in rL227790.
...
llvm-svn: 227797
2015-02-02 10:48:38 +00:00
Viktor Kutuzov
1f83bbb6fe
[Sanitizers] Intercept ether functions on FreeBSD
...
Committed unreviewed with permission.
llvm-svn: 227795
2015-02-02 10:00:23 +00:00
Viktor Kutuzov
1a3889da34
[Sanitizers] Intercept memrchr() on FreeBSD
...
Committed unreviewed with permission.
llvm-svn: 227794
2015-02-02 09:58:30 +00:00
Viktor Kutuzov
bb8bd90b06
[Sanitizers] Intercept getpwnam_r() on FreeBSD
...
Committed unreviewed with permission.
llvm-svn: 227793
2015-02-02 09:56:11 +00:00
Viktor Kutuzov
3ac0eb7480
[Sanitizers] Intercept getpwent_r() on FreeBSD
...
Committed unreviewed with permission.
llvm-svn: 227792
2015-02-02 09:53:02 +00:00
Viktor Kutuzov
fc44a096a9
[Sanitizers] Intercept getpwent() on FreeBSD
...
Committed unreviewed with permission.
llvm-svn: 227791
2015-02-02 09:49:28 +00:00
Viktor Kutuzov
0c0ebaa79f
[Msan] Disable unit tests for non-FreeBSD functions on FreeBSD
...
Differential Revision: http://reviews.llvm.org/D7252
llvm-svn: 227790
2015-02-02 09:46:07 +00:00
Viktor Kutuzov
7891c8c173
[Sanitizers] Re-apply the fix ordering initialization of coverage and guard arrays
...
Original commit: http://reviews.llvm.org/rL226440
Related review: http://reviews.llvm.org/D6892
llvm-svn: 227789
2015-02-02 09:38:10 +00:00
Kumar Sukhani
14a4f24d2c
[asan][mips] Fix MIPS64 Asan mapping
...
llvm-svn: 227683
2015-01-31 09:13:58 +00:00
Alexey Samsonov
e41a26e4b4
Revert "Remove unused function."
...
This reverts commit r227633. SetEnv was prematurely deleted.
llvm-svn: 227665
2015-01-31 01:27:18 +00:00
Alexey Samsonov
a11a86b9ce
[TSan] Fix Go build.
...
llvm-svn: 227634
2015-01-30 23:04:57 +00:00
Alexey Samsonov
df0b22c5a8
Remove unused function.
...
llvm-svn: 227633
2015-01-30 23:04:54 +00:00
Viktor Kutuzov
6fe85cbb8e
[Sanitizers] Intercept gethost functions on FreeBSD
...
Committed unreviewed with permission.
llvm-svn: 227572
2015-01-30 12:58:37 +00:00
Viktor Kutuzov
c97b1e7c32
[Msan] Fix the shmctl unit tests to pass on FreeBSD
...
Differential Revision: http://reviews.llvm.org/D7253
llvm-svn: 227571
2015-01-30 12:55:40 +00:00
Viktor Kutuzov
07e6c00171
[Sanitizers] Introduce GET_LINK_MAP_BY_DLOPEN_HANDLE() macro
...
Differential Revision: http://reviews.llvm.org/D7233
llvm-svn: 227570
2015-01-30 12:43:52 +00:00
Yury Gribov
2bbad68617
[Sanitizer] Make BlockingMutex really linker initialized.
...
Differential Revision: http://reviews.llvm.org/D7171
llvm-svn: 227560
2015-01-30 06:20:43 +00:00
Yury Gribov
640017411c
Replace code dup with a macro.
...
Differential Revision: http://reviews.llvm.org/D7172
llvm-svn: 227559
2015-01-30 06:18:46 +00:00
Alexey Samsonov
8b3334d909
[TSan] Fix -Werror=sign-compare warning. NFC.
...
llvm-svn: 227527
2015-01-30 01:02:12 +00:00
Kuba Brecka
0f776b0905
[compiler-rt] OS X: Update the CMake and Make builds to explicitely use libc++, mmacosx-version-min and SDKs
...
In both CMake and Makefiles, we are inconsistent about the use of libstdc++ vs. libc++, SDKs and minimum deployment targets for OS X. Let's fix the detection of SDKs, and let's explicitely set that we link against libc++ and mmacosx-version-min is 10.7.
llvm-svn: 227509
2015-01-29 23:19:26 +00:00
Alexey Samsonov
807f1b539c
[CMake] Get rid of TARGET_64_BIT_CFLAGS: explicitly list required flags for each architecture.
...
llvm-svn: 227496
2015-01-29 21:32:34 +00:00
Evgeniy Stepanov
6037579926
[asan] Add one more wait-for-device in the Android setup script.
...
llvm-svn: 227473
2015-01-29 17:24:21 +00:00
Kostya Serebryany
3c052cc051
[asan] use getrusage as an alternative to reading /proc/self/statm. Also move GetRSS to sanitizer_linux_libcdep.cc (no change in the function itself)
...
llvm-svn: 227416
2015-01-29 02:54:39 +00:00
Alexey Samsonov
7f25a40550
[ASan] Generalize/simplify lit test configs generation.
...
llvm-svn: 227413
2015-01-29 02:28:53 +00:00
Kostya Serebryany
21a1a23790
[sanitizer] allow to reset the bb/edge coverage data inside the process while it is running (single-threaded). Also expose the current coverage set to the process.
...
llvm-svn: 227387
2015-01-28 22:39:44 +00:00
Nico Weber
64a74bf1cf
Fix indents on asan_symbolize.py's argument parsing code. No behavior change.
...
llvm-svn: 227327
2015-01-28 17:29:57 +00:00
Nico Weber
406f640a68
Make asan_symbolize.py not crash on Windows.
...
asan_symbolize.py isn't needed on Windows, but it's nice if asan has a unified
UI on all platforms. So rather than have asan_symolize.py die on startup due to
it importing modules that don't exist on Windows, let it just echo the input.
llvm-svn: 227326
2015-01-28 17:28:04 +00:00
Alexey Samsonov
605f2df106
[ASan] Fix test cases: don't assume that fast unwinder can't unwind through libc.
...
llvm-svn: 227265
2015-01-27 23:06:48 +00:00