Evgeniy Stepanov
64579da1a7
Build ASan runtime for ARM/Android.
...
llvm-svn: 166559
2012-10-24 14:03:41 +00:00
Alexander Potapenko
1eef2b813c
[ASan] Rename ReplaceCFAllocator to MaybeReplaceCFAllocator.
...
Replace the allocator only if the replace_cfallocator flag is set (in some cases it wasn't checked)
llvm-svn: 166550
2012-10-24 09:35:23 +00:00
Alexander Potapenko
faa9c86fd0
[ASan] Use internal_memmove() in both static and dynamic runtime libraries if asan_inited != 0.
...
llvm-svn: 166549
2012-10-24 09:19:16 +00:00
Alexey Samsonov
cea6239219
[ASan] Due to data races, ASan malloc stats are inaccurate, which may cause certain ASan interface functions returning negative values (casted to unsigned). Return a reasonable value if such a case is detected.
...
llvm-svn: 166548
2012-10-24 09:19:11 +00:00
Alexey Samsonov
555d1c5ab8
[ASan] add comment to blacklist file to test behavior introduced in r166283
...
llvm-svn: 166284
2012-10-19 15:26:48 +00:00
Alexey Samsonov
521309294f
[ASan] instrumented asan unit tests should depend on blacklist file
...
llvm-svn: 166282
2012-10-19 15:18:14 +00:00
Bob Wilson
201bf679b2
Fix comment typo.
...
llvm-svn: 166246
2012-10-18 23:08:23 +00:00
Evgeniy Stepanov
ad18287e56
[asan] Disable new/delete interceptors on Android and make them visible elsewhere.
...
llvm-svn: 166180
2012-10-18 15:22:08 +00:00
Alexey Samsonov
b9fdf27357
[Sanitizer] fall back to online symbolizer if user-provided callback failed
...
llvm-svn: 166177
2012-10-18 11:46:22 +00:00
Chandler Carruth
580916eacb
Re-enable this test now that r166172 has hacked around the terrible
...
limitations of the pass manager stack in the pass manager builder.
llvm-svn: 166173
2012-10-18 08:06:28 +00:00
Daniel Dunbar
e5e1c643df
build/clang_darwin: Don't try to build ARM contents on 10.6.
...
- The cctools' ranlib on 10.6 has a bug and can't understand our ARM object
files.
llvm-svn: 166114
2012-10-17 18:33:43 +00:00
Daniel Dunbar
b02dcec79e
build/make: There is no need to put timestamps into .dir files, and it just
...
makes trees less comparable.
llvm-svn: 166111
2012-10-17 18:21:21 +00:00
Alexey Samsonov
5f1a7589ad
[ASan] unit tests: Move main() to a separate file. Fix lint
...
llvm-svn: 166104
2012-10-17 14:04:57 +00:00
Kostya Serebryany
9ced62d195
[asan] added a test for a bug in asan at -O0 introduced by r165936 (making asan a FunctionPass). The test is not actually enabled for -O0 yet (since it fails)
...
llvm-svn: 166103
2012-10-17 13:42:04 +00:00
Alexey Samsonov
7b52cb9e6d
[ASan] Fix strchr/index tests for users who have 'char* strchr(char*,int)' instead of 'char* strchr(const char*, int)'
...
llvm-svn: 166101
2012-10-17 13:39:09 +00:00
Alexey Samsonov
4230a4a05a
[ASan] don't use attribute no_address_safety_analysis if it's unknown to compiler
...
llvm-svn: 166099
2012-10-17 13:19:59 +00:00
Alexey Samsonov
68791d162a
[Sanitizer] symbolizer: increase the maximal number of shared libraries to 16K
...
llvm-svn: 166098
2012-10-17 13:12:23 +00:00
Kostya Serebryany
05a3b01d4f
[asan] fix gcc warnings while building asan-rt
...
llvm-svn: 166093
2012-10-17 08:50:53 +00:00
Alexander Potapenko
e3e80d607f
Do not call ReplaceCFAllocator() before __CFInitialize(), otherwise crashes are possible on 10.8.
...
Fixes http://code.google.com/p/address-sanitizer/issues/detail?id=122
llvm-svn: 166029
2012-10-16 16:58:10 +00:00
Alexander Potapenko
5109e3ef88
Commit a leftover file from r166026: Add MACOS_VERSION_MOUNTAIN_LION.
...
llvm-svn: 166028
2012-10-16 16:48:51 +00:00
Alexander Potapenko
4a78e1002d
Add MACOS_VERSION_MOUNTAIN_LION.
...
llvm-svn: 166026
2012-10-16 16:24:49 +00:00
Kostya Serebryany
278bd2e3a3
[asan] fix lint
...
llvm-svn: 166006
2012-10-16 04:50:32 +00:00
Daniel Dunbar
345b09cb80
platform/clang_darwin: Drop an x86_64 slice into cc_kext_ios5.
...
- This doesn't get used, but it is a simple workaround for PR14013.
llvm-svn: 165987
2012-10-15 22:23:34 +00:00
Daniel Dunbar
ccd312520b
Un-revert r164907 and r164902 (+ follow-ups), 10.6 build fix to follow.
...
llvm-svn: 165986
2012-10-15 22:23:32 +00:00
Nico Weber
926e072016
Revert r164907 and r164902 (+ follow-ups). They broke building on 10.6.
...
See PR14013.
llvm-svn: 165963
2012-10-15 20:37:13 +00:00
Alexander Potapenko
7b03290c43
Implement internal_memmove.
...
Use internal_memmove() and internal_memcpy() in the memcpy() and memmove() wrappers
when building the dynamic runtime (OS X only), to work around a bug in resolver functions wrapping.
See also http://code.google.com/p/address-sanitizer/issues/detail?id=116
llvm-svn: 165939
2012-10-15 15:34:41 +00:00
Kostya Serebryany
ee112b5d7f
[asan] fix more tests
...
llvm-svn: 165934
2012-10-15 13:30:38 +00:00
Kostya Serebryany
16205cd4fa
[asan] change the asan output slightly to avoid user confusion: a) add ':' after 'AddressSanitizer' and b) changed 'crashed' to 'SEGV'
...
llvm-svn: 165932
2012-10-15 13:04:58 +00:00
Richard Smith
feea5d6fb4
Provide a slightly more helpful diagnostic if -fcatch-undefined-behavior finds
...
a problem with __int128 arithmetic but the runtime was not built with __int128
support.
llvm-svn: 165913
2012-10-14 23:53:37 +00:00
Richard Smith
130b748b72
Use a better test for __int128 support, which works on old GCC versions.
...
llvm-svn: 165912
2012-10-14 23:28:55 +00:00
Chandler Carruth
eea8a48218
Fix the bootstrap of CompilerRT with host compilers that don't support
...
emulating 128-bit arithmetic on 32-bit x86 targets. This should get the
bootstrap back for GCC 4.6 at least.
Suggestions on better ways to do the detection here are welcome...
llvm-svn: 165863
2012-10-13 02:30:10 +00:00
Richard Smith
7247b23efc
-fcatch-undefined-behavior: Runtime library support for trapping conversions to or
...
from a floating-point type where the source value is not in the range of
representable values of the destination type.
llvm-svn: 165844
2012-10-12 22:57:15 +00:00
Richard Smith
22cc16462e
-fcatch-undefined-behavior: handler for VLA bound which evaluates to a non-positive value.
...
llvm-svn: 165582
2012-10-10 01:10:59 +00:00
Richard Smith
b6fb381dba
-fcatch-undefined-behavior: store the type name directly at the end of a type descriptor. 5% binary size reduction due to fewer relocations.
...
llvm-svn: 165571
2012-10-09 23:55:18 +00:00
Richard Smith
68b3014cd3
Add a runtime diagnostics library for Clang's -fcatch-undefined-behavior.
...
llvm-svn: 165533
2012-10-09 19:34:32 +00:00
Alexey Samsonov
7b6ce747d6
Determine supported archs for compiler-rt libraries on Linux by trying to compile a simple executable
...
llvm-svn: 165504
2012-10-09 16:05:50 +00:00
Alexey Samsonov
83ecabe6e6
[Sanitizer] Remove unneeded returns after UNIMPLEMENTED macro
...
llvm-svn: 165493
2012-10-09 08:51:08 +00:00
Alexey Samsonov
3a0a88fe0a
[Sanitizer] Add UNREACHABLE(msg) macro
...
llvm-svn: 165492
2012-10-09 08:42:07 +00:00
Alexey Samsonov
480477c0e1
[ASan] use llvm-symbolizer for ASan lit-style tests on Mac
...
llvm-svn: 165391
2012-10-08 13:11:18 +00:00
Alexey Samsonov
0111f55eac
llvm-symbolizer for Mac: add support for reading DWARF from separate object file in resource directory generated by dsymutil. Fix minor symbol table lookup issues.
...
llvm-svn: 165389
2012-10-08 10:17:44 +00:00
Dmitry Vyukov
19ba50a8b9
tsan: better message about found races for Go ThreadSanitizer
...
llvm-svn: 165376
2012-10-07 14:21:24 +00:00
Dmitry Vyukov
90c9cbfed4
tsan: cache pc's that cause suppressions (this way we do not need to symbolize the reports)
...
llvm-svn: 165317
2012-10-05 15:51:32 +00:00
Alexander Potapenko
b4db79fc7d
If !asan_inited, call internal versions of libc functions where available.
...
This is to remove unnecessary #if directives.
llvm-svn: 165307
2012-10-05 12:11:06 +00:00
Dmitry Vyukov
6d5bd599c2
tsan for Go: support mallocs before __tsan_init() (required to support cgo code)
...
llvm-svn: 165229
2012-10-04 13:54:49 +00:00
Alexander Potapenko
d2f6b97417
Avoid calling __asan_init from memcpy(), memmove(), memset() during libSystem initialization.
...
Fixes http://code.google.com/p/address-sanitizer/issues/detail?id=117 .
llvm-svn: 165227
2012-10-04 13:41:28 +00:00
Alexey Samsonov
3197f8e6cb
[ASan] don't build 64-bit runtime on 32-bit Linux platforms
...
llvm-svn: 165222
2012-10-04 12:22:33 +00:00
Dmitry Vyukov
b96a7b5aa5
tsan: add atomic_fetch_sub() and atomic_signal_fence() functions
...
llvm-svn: 165218
2012-10-04 10:08:23 +00:00
Kostya Serebryany
cb13fff13d
[asan] properly report mmap failure
...
llvm-svn: 165214
2012-10-04 07:21:09 +00:00
Bill Wendling
836d53015e
I'm getting these errors with r165159:
...
/Users/void/llvm/llvm-tot.src/projects/compiler-rt/lib/arm/eqdf2vfp.S:22:2: error: instruction requires: VFP2
vmov d6, r0, r1
^
/Users/void/llvm/llvm-tot.src/projects/compiler-rt/lib/arm/eqdf2vfp.S:23:2: error: instruction requires: VFP2
vmov d7, r2, r3
^
/Users/void/llvm/llvm-tot.src/projects/compiler-rt/lib/arm/eqdf2vfp.S:24:2: error: instruction requires: VFP2
vcmp.f64 d6, d7
^
/Users/void/llvm/llvm-tot.src/projects/compiler-rt/lib/arm/eqdf2vfp.S:25:2: error: instruction requires: VFP2
vmrs apsr_nzcv, fpscr
^
llvm-svn: 165191
2012-10-04 01:44:41 +00:00
Bob Wilson
1ff65860e4
Back out my temporary workaround for Apple buildbots.
...
--- Reverse-merging r164909 into '.':
U make/platform/clang_darwin.mk
llvm-svn: 165159
2012-10-03 21:03:42 +00:00
Alexander Potapenko
0f0a50da56
Set ASAN_NEEDS_SEGV=0 on Android only.
...
llvm-svn: 165120
2012-10-03 15:09:17 +00:00
Dmitry Vyukov
be6878365d
tsan: prepare for migration to new memory_order enum values (ABI compatible)
...
llvm-svn: 165106
2012-10-03 13:00:13 +00:00
Alexey Samsonov
c561ce0e01
Build ASan runtime on Linux for both x86_64 and i386, same as we do with full compiler_rt and libprofile
...
llvm-svn: 165096
2012-10-03 07:16:31 +00:00
Alexander Potapenko
77c0ac2336
Do not patch the instruction address when symbolizing the reports.
...
Instead, print the correct address at runtime.
llvm-svn: 165018
2012-10-02 15:42:24 +00:00
Alexey Samsonov
30c01f25f1
[Sanitizer] fix line width
...
llvm-svn: 165009
2012-10-02 14:09:20 +00:00
Alexey Samsonov
78c340d205
[ASan] Change __asan_set_on_error_callback to weak overridable __asan_on_error, so that ASan would call the latter even if it finds the error early (i.e. during module initialization)
...
llvm-svn: 165008
2012-10-02 14:06:39 +00:00
Evgeniy Stepanov
49e8576a09
[*San]: handle EINTR.
...
llvm-svn: 165006
2012-10-02 13:41:40 +00:00
Dmitry Vyukov
56faa551b9
tsan: fix mac build
...
llvm-svn: 165004
2012-10-02 12:58:14 +00:00
Alexey Samsonov
298e237d7e
[ASan] Add extern C for __asan_symbolize on Windows
...
llvm-svn: 165003
2012-10-02 12:35:42 +00:00
Alexey Samsonov
e29c6731aa
[Sanitizer/ASan] Simplify the code that prints and symbolizes stack traces. Fall back to module+offset if user-provided symbolizer failed. Use weak function __asan_symbolize instead of __asan_set_symbolize_callback in ASan interface, so that we're able to symbolize reports for errors that happen before the main() is called, for example, during module initialization.
...
llvm-svn: 165000
2012-10-02 12:11:17 +00:00
Dmitry Vyukov
a2c1c7a78e
tsan: wait for pending reports before exit
...
llvm-svn: 164999
2012-10-02 12:07:16 +00:00
Dmitry Vyukov
27d5b37c38
tsan: output tid's in reports
...
llvm-svn: 164998
2012-10-02 11:52:05 +00:00
Dmitry Vyukov
0c40a5600c
tsan: run output tests in parallel
...
llvm-svn: 164997
2012-10-02 11:51:40 +00:00
Bob Wilson
dda435bcef
Temporarily comment out some new arm variants to try to fix buildbots.
...
llvm-svn: 164909
2012-09-30 05:34:28 +00:00
Bob Wilson
a4cefbdc87
Add compiler-rt support for Swift.
...
llvm-svn: 164903
2012-09-29 23:37:01 +00:00
Bob Wilson
0e039bee0d
Add support for iOS6.
...
llvm-svn: 164902
2012-09-29 23:25:48 +00:00
Alexey Samsonov
c3f61d8eec
[ASan] Fix unit test headers. Add an option to change substitute asan_test_config.h file
...
llvm-svn: 164821
2012-09-28 12:24:23 +00:00
Alexey Samsonov
2d9899b2ce
[ASan] use llvm-symbolizer (in offline mode) in ASan output tests on Linux
...
llvm-svn: 164819
2012-09-28 11:05:41 +00:00
Evgeniy Stepanov
9792396a06
[asan] Change defaults for Android target.
...
This way building without -DASAN_* in CFLAGS produces working binaries.
llvm-svn: 164816
2012-09-28 10:07:53 +00:00
Evgeniy Stepanov
cb9cf0f907
Add a missing const qualifier.
...
llvm-svn: 164773
2012-09-27 13:21:08 +00:00
Evgeniy Stepanov
f7f616ba66
Quick fix data/bss detection in TSan.
...
The old way breaks when a module's bss is adjacent to the [heap] vm area.
Both ways are not very reliable, though.
llvm-svn: 164772
2012-09-27 13:20:40 +00:00
Alexey Samsonov
b6879ce94c
[TSan] move replacement for new/delete back into tsan_interceptors
...
llvm-svn: 164764
2012-09-27 09:50:19 +00:00
Alexander Potapenko
3f6a5c1b2d
Fixed a number of gpylint warnings, added binary names filtering (useful for Chrome), minor fixes.
...
llvm-svn: 164695
2012-09-26 13:16:42 +00:00
Alexander Potapenko
59cc8776c4
Encapsulate the main loop into a class to allow reusing it.
...
llvm-svn: 164694
2012-09-26 12:12:41 +00:00
Alexander Potapenko
fa2a964540
Set --use-symbol-table=true as Alexey has already resolved the FIXME.
...
llvm-svn: 164693
2012-09-26 11:36:14 +00:00
Alexey Samsonov
789d4b2cd0
[TSan] fork external symbolizer before starting internal threads
...
llvm-svn: 164600
2012-09-25 12:35:47 +00:00
Alexey Samsonov
351d486df0
[TSan] one more attempt to fix sleep_sync test: call sleep in the spawned thread so that sleep-synchronization will be detected even if child thread is started late.
...
llvm-svn: 164488
2012-09-24 13:35:46 +00:00
Alexey Samsonov
313014694f
[TSan] Provide replacements for operators new/delete instead of declaring extern C functions with weirdly mangled names (same strategy is used in ASan).
...
llvm-svn: 164487
2012-09-24 13:19:47 +00:00
Alexey Samsonov
a555b3faf4
[ASan] Apply some ASan-relevant pieces of patch by Ruben Van Boxem. In the same time, remove ASan from CMake build on Windows after conversation with Timur. We don't want to support building ASan on Windows until it is in a working state.
...
llvm-svn: 164486
2012-09-24 11:43:40 +00:00
Alexey Samsonov
0659f72f7b
[TSan] increase sleep time in test to ensure correct event ordering
...
llvm-svn: 164483
2012-09-24 08:57:41 +00:00
Michael J. Spencer
c774095d44
[CMake][tsan] Compile .S files for tsan as C instead of CXX.
...
Using CXX breaks if you add -stdlib=libc++ to CMAKE_CXX_FLAGS.
llvm-svn: 164422
2012-09-21 22:39:39 +00:00
Alexey Samsonov
9e769a8d59
[Sanitizer] llvm-symbolizer: enable accessing symbol table (libObject is fixed in r164365) and replace string with std::string
...
llvm-svn: 164367
2012-09-21 10:54:14 +00:00
Eric Christopher
8539af7bbb
Both OpenBSD and Bitrig need to include machine/endian.h to get the
...
_BYTE_ORDER define.
Patch by David Hill.
llvm-svn: 164286
2012-09-20 06:19:20 +00:00
Alexey Samsonov
bc0b3f43d1
[ASan] Include ASan into CMake build only on Linux, Mac and Windows
...
llvm-svn: 164224
2012-09-19 14:15:30 +00:00
Alexey Samsonov
1fba97d22d
[TSan] Add tsan to cmake build of compiler-rt only on Linux
...
llvm-svn: 164217
2012-09-19 13:11:13 +00:00
Alexey Samsonov
ea2fb08545
[ASan] make asan_symbolize script work if there is no llvm-symbolizer available
...
llvm-svn: 164214
2012-09-19 11:43:41 +00:00
Alexey Samsonov
52565d5491
[ASan] fix offline python symbolizer script to use llvm-symbolizer if possible
...
llvm-svn: 164209
2012-09-19 08:49:53 +00:00
Alexey Samsonov
11b9e97cd9
[ASan] cleanup: fix headers and lint warnings
...
llvm-svn: 164205
2012-09-19 07:07:46 +00:00
Dmitry Vyukov
8d8639bc55
tsan: fix gcc4.2.1 warning
...
llvm-svn: 164200
2012-09-19 04:45:14 +00:00
Dmitry Vyukov
c7bcaf8512
tsan: fix Go build
...
llvm-svn: 164198
2012-09-19 04:39:36 +00:00
Alexander Potapenko
431ea19327
Intercept signal() and sigaction() within the dynamic runtime on Mac.
...
Add a test that ensures that ASan does not allow to override the signal handlers.
llvm-svn: 164118
2012-09-18 12:49:51 +00:00
Alexey Samsonov
848abbd236
[TSan] s/uintptr_t/intptr_t in TSan test and enforce stack size limit in one of TSan output tests that somewhy fails otherwise
...
llvm-svn: 164116
2012-09-18 09:09:35 +00:00
Alexey Samsonov
3040830fcd
[TSan] fix a typo in test dependencies. Silence few remaining pedantic gcc warnings in TSan tests.
...
llvm-svn: 164115
2012-09-18 08:33:37 +00:00
Alexey Samsonov
731219551e
[Sanitizer] llvm-symbolizer: turn off symbol table lookup by default while getSymbolAddress from libObject returns wrong values
...
llvm-svn: 164113
2012-09-18 08:00:21 +00:00
Alexey Samsonov
8661465edd
[ASan] Move printing descriptions of heap addresses in error report from allocator internals to asan_report.cc.
...
llvm-svn: 164112
2012-09-18 07:38:10 +00:00
Alexey Samsonov
5a42ac5b0e
[Sanitizer] update lint checker script
...
llvm-svn: 164111
2012-09-18 07:26:51 +00:00
Alexey Samsonov
341e5bcb45
[TSan] port all output tests to lit and move them to lit_tests directory. This makes 'make check-tsan' command test both unit and output TSan tests. Old custom makefiles for running TSan tests are still functional as well.
...
llvm-svn: 164110
2012-09-18 07:23:54 +00:00
Kostya Serebryany
0a31ed1417
[tsan] fix the tsan allocator to handle any alignment
...
llvm-svn: 164107
2012-09-18 06:00:59 +00:00
Bill Wendling
b556d5f13c
Remove debugging code.
...
llvm-svn: 164052
2012-09-17 20:43:11 +00:00
Benjamin Kramer
7aa5b663ea
Update linux stdio.h to support the recent additions to GCDAProfiling.
...
Hopefully unbreaks compiler-rt build on linux.
llvm-svn: 164025
2012-09-17 10:23:05 +00:00
Alexey Samsonov
0fa3ea69e2
[TSan] move: rtl_tests->tests/rtl unit_tests->tests/unit to make a single root for gtest-based tests. Support running these tests from lit via check-tsan command.
...
llvm-svn: 164022
2012-09-17 10:02:17 +00:00
Alexey Samsonov
ff3f173e87
[TSan] If we detect an unlimited stack, try to re-exec with limited stack
...
llvm-svn: 164021
2012-09-17 09:14:11 +00:00
Alexey Samsonov
97ca306641
[Sanitizer] Hoist functions to get/set stack size and re-exec from memory-sanitizer branch to sanitizer_common
...
llvm-svn: 164020
2012-09-17 09:12:39 +00:00
Alexey Samsonov
3869b4b35a
[ASan] increase sleep time if ASan finds two bugs simultaneously to make sure full error report is printed
...
llvm-svn: 164018
2012-09-17 08:02:19 +00:00
Dmitry Vyukov
40c19aaf84
tsan: increase internal memory block limit 1GB->4GB
...
llvm-svn: 164011
2012-09-17 03:18:45 +00:00
Dmitry Vyukov
4d743f5346
tsan: reserve msb in stack depot id's (required for msan)
...
llvm-svn: 164010
2012-09-17 03:14:15 +00:00
Bill Wendling
06fb5f0cc2
Remove unused variable.
...
llvm-svn: 163930
2012-09-14 20:23:31 +00:00
Bill Wendling
66429fe1c7
Add support for reading the GCDA file and merging the arc information.
...
With the advent of the __llvm_gcov_flush function, we need to be able to merge
counts into the .gcda files in an intelligent manner. This involves reading the
file if it exists, adding the counts together, and then writing the results.
<rdar://problem/12185886>
llvm-svn: 163923
2012-09-14 18:55:32 +00:00
Evgeniy Stepanov
6c0850afa4
Remove some debugging code.
...
llvm-svn: 163881
2012-09-14 08:57:50 +00:00
Kostya Serebryany
5b0a8f3f53
[asan] fix the va_arg usage
...
llvm-svn: 163879
2012-09-14 06:52:46 +00:00
Kostya Serebryany
45d849c4bd
[asan] add asan option log_path=PATH to let users redirect asan reports to a file PATH.PID instead of stderr
...
llvm-svn: 163872
2012-09-14 04:35:14 +00:00
Alexey Samsonov
2b8de6a753
[TSan] support building TSan unittests in CMake
...
llvm-svn: 163797
2012-09-13 14:04:57 +00:00
Alexey Samsonov
a7df554138
[TSan] fix a typo in CMakeLists
...
llvm-svn: 163796
2012-09-13 14:02:40 +00:00
Alexey Samsonov
f0aa9148a2
[TSan] Use interface attribute for weak functions that may be overriden by user
...
llvm-svn: 163795
2012-09-13 13:34:09 +00:00
Alexey Samsonov
255f6a5f1a
[TSan] Add initial support for buidling ThreadSanitizer runtime library with CMake (currently the only supported platfrom is 64-bit Linux). This patch makes 'clang++ -fthread-sanitizer' work for both clang in the build tree and installed clang
...
llvm-svn: 163789
2012-09-13 12:18:41 +00:00
Alexey Samsonov
046248c509
[TSan] fix a bunch of warnings reported by pedantic gcc
...
llvm-svn: 163788
2012-09-13 11:54:41 +00:00
Alexey Samsonov
ddcb77f287
[Sanitizer] don't use -Werror as default compile flag for sanitizer runtimes - people may use too many distinct/old host compilers
...
llvm-svn: 163784
2012-09-13 10:23:45 +00:00
Alexander Potapenko
c7a7522f83
Pass -std=c99 when compiling mach_override.c
...
llvm-svn: 163717
2012-09-12 15:44:56 +00:00
Alexander Potapenko
f3a96894a6
Give more accurate malloc statistics to malloc_zone_statistics().
...
Fix a warning in macros instantiation.
llvm-svn: 163716
2012-09-12 15:29:50 +00:00
Alexander Potapenko
dff254c534
Fix compiler warnings: remove __attribute__((visibility)) for static functions, use unsigned char instead of char.
...
llvm-svn: 163707
2012-09-12 14:14:08 +00:00
Alexey Samsonov
4787d0fbef
[ASan] more macro/casting magic to suppress warnings
...
llvm-svn: 163706
2012-09-12 14:10:14 +00:00
Alexey Samsonov
26d7a06da3
[ASan] fix compiler warnings for unit test on Android
...
llvm-svn: 163704
2012-09-12 12:07:36 +00:00
Alexey Samsonov
e413ad99ac
[Sanitizer] Fix compiler warnings (including void* arithmetic) in mach_override
...
llvm-svn: 163698
2012-09-12 10:45:36 +00:00
Alexey Samsonov
a81d268acd
[ASan] fix interception macro for Android build
...
llvm-svn: 163692
2012-09-12 09:42:23 +00:00
Alexander Potapenko
814451909a
Initial support for malloc_zone_statistics. All counters are set to zero now.
...
This is required to overcome a crash in mstats() (http://code.google.com/p/address-sanitizer/issues/detail?id=109 )
llvm-svn: 163690
2012-09-12 09:38:51 +00:00
Alexey Samsonov
3d53c4ecf6
[Sanitizer] Please Android build. Re-check the availability of -Wno-variadic-macros flag.
...
llvm-svn: 163688
2012-09-12 08:06:15 +00:00
Alexey Samsonov
694633e19b
[Sanitizer] first effort to start building ASan runtime with -Werror in CMake build
...
llvm-svn: 163686
2012-09-12 07:38:47 +00:00
Alexey Samsonov
788eaeb35b
[Sanitizer] get rid of empty DEFAULT_CONVENTION in interception lib to remove empty macro arguments
...
llvm-svn: 163622
2012-09-11 15:02:20 +00:00
Alexey Samsonov
100150f59d
[Sanitizer] test 64-bit allocator only on suitable targets
...
llvm-svn: 163615
2012-09-11 12:19:18 +00:00
Alexander Potapenko
ab7a4ea485
Revert the lockf() support.
...
llvm-svn: 163614
2012-09-11 11:59:05 +00:00
Evgeniy Stepanov
1a8f8fa6c0
CMake build rules for ASan Android runtime and tests.
...
llvm-svn: 163613
2012-09-11 11:55:45 +00:00
Evgeniy Stepanov
af0f6c8991
Fox a typo.
...
llvm-svn: 163611
2012-09-11 11:35:18 +00:00
Alexey Samsonov
894069796e
[Sanitizer] Add new lit testsuite: check-sanitizer that runs unit tests for sanitizer_common runtime (shared between ASan and TSan)
...
llvm-svn: 163610
2012-09-11 10:50:32 +00:00
Alexey Samsonov
c21f901b2f
[Sanitizer] fix warnings reported by gcc. Update the list of targets to check lint for
...
llvm-svn: 163608
2012-09-11 10:31:28 +00:00
Alexey Samsonov
eeec3c11b5
[compiler-rt] Install support for CMake build of compiler-rt
...
llvm-svn: 163607
2012-09-11 10:26:54 +00:00
Alexey Samsonov
fcbc97a13f
[Sanitizer] remove custom Die/CheckFailed from allocator testlib
...
llvm-svn: 163604
2012-09-11 09:48:52 +00:00
Alexey Samsonov
5c6b93bc33
[Sanitizer] Get rid of dependency between sanitizer_common and asan/tsan runtimes: implement tool-specific Die and CheckFailed functions via callbacks
...
llvm-svn: 163603
2012-09-11 09:44:48 +00:00
Alexander Potapenko
1a471772b0
Interceptors for lockf and lockf64, minor calloc() fix.
...
llvm-svn: 163602
2012-09-11 09:26:35 +00:00
Chandler Carruth
b156b56a28
Revert r163411 based on review discussion.
...
In code review, it looked like these warnings do not actually fire with
modern Clang or GCC. However, the pragma is flat out rejected by GCC in
many configurations (-Werror) so it ended up causing more problems than
it fixed.
Daniel agreed with reverting this, but I think didn't have time to get
to it.
llvm-svn: 163583
2012-09-11 01:13:51 +00:00
Daniel Dunbar
256ea4e4f3
build/clang_darwin: Add the ASAN dynamic library.
...
- Now with spelling fix for -lstdc++.
llvm-svn: 163527
2012-09-10 18:26:38 +00:00
Chad Rosier
ca8b950317
Revert r163415 in an attempt to bring back the buildbots.
...
llvm-svn: 163522
2012-09-10 17:26:42 +00:00
Evgeniy Stepanov
6f66ed1329
[asan] There is no __libc_malloc on Android.
...
llvm-svn: 163498
2012-09-10 10:18:49 +00:00
Alexander Potapenko
67192d41ee
Allow to call strchr() from __asan_init().
...
Fixes PR13794.
llvm-svn: 163493
2012-09-10 08:35:12 +00:00
Daniel Dunbar
6eae4ce2b8
build/clang_darwin: Add the ASAN dynamic library.
...
llvm-svn: 163415
2012-09-07 19:57:35 +00:00
Daniel Dunbar
9d098bc09a
[asan] Use a relative include path instead of requiring build system involvement.
...
llvm-svn: 163414
2012-09-07 19:57:32 +00:00
Daniel Dunbar
44b3474b0e
build: Teach Makefile build system about asan/dynamic subdir.
...
llvm-svn: 163413
2012-09-07 19:57:28 +00:00
Daniel Dunbar
c053c2bcda
build: Add support for building dylibs.
...
llvm-svn: 163412
2012-09-07 19:57:23 +00:00
Daniel Dunbar
04ab17b0cd
[asan] Suppress some bogus -Winvalid-noreturn diagnostics.
...
llvm-svn: 163411
2012-09-07 19:57:20 +00:00
Dmitry Vyukov
7ea4c2ccfb
tsan: ignore destruction of global mutexes (causes a lot of non-interesting reports)
...
llvm-svn: 163400
2012-09-07 18:08:02 +00:00
Alexander Potapenko
38c3f9ef2f
Remove the infinite recursion check for now, as we don't have __thread on Mac, and TSD is an overkill.
...
llvm-svn: 163393
2012-09-07 15:50:19 +00:00