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
Alexander Potapenko
c5adb8a700
Two minor changes:
...
-- exit from infinite recursion in CHECK()
-- print a verbose message if mapping of the shadow memory has failed.
llvm-svn: 163391
2012-09-07 15:34:40 +00:00
Evgeniy Stepanov
6e6817a823
[asan] Raise quarantine size a bit with ASAN_LOW_MEMORY.
...
Our tests expect that a 16M block will fit in the quarantine.
llvm-svn: 163384
2012-09-07 12:13:52 +00:00
Alexey Samsonov
f42e860c51
[ASan] hack initialization-bug test so that it stably passes on both Linux and Mac: make the bug appear independent of the translation unit order
...
llvm-svn: 163381
2012-09-07 09:24:29 +00:00
Alexey Samsonov
0f5f1d5bfa
[ASan] add Linux-specific test for initialization order that checks that we find a bug independently of translation units order
...
llvm-svn: 163379
2012-09-07 09:04:31 +00:00
Alexey Samsonov
cd66d97799
[Sanitizer] add --demangle option to llvm-symbolizer (for now just assume that __cxa_demangle option is available)
...
llvm-svn: 163376
2012-09-07 07:26:35 +00:00
Dmitry Vyukov
23ecb4acd9
tsan: fix code style
...
llvm-svn: 163326
2012-09-06 16:11:30 +00:00
Dmitry Vyukov
c87e7280b8
tsan: increase max shadow stack size + reduce memory consumption at the same time (by not memorizing full stacks in traces)
...
llvm-svn: 163322
2012-09-06 15:18:14 +00:00
Dmitry Vyukov
50d49238a6
tsan: fix Go build script
...
llvm-svn: 163320
2012-09-06 15:10:19 +00:00
Alexander Potapenko
35bc23ce58
Fix two compiler warnings: must use at least one argument for "..." in a variadic macros, signed vs. unsigned comparison.
...
llvm-svn: 163314
2012-09-06 13:31:13 +00:00
Evgeniy Stepanov
65fb0a5425
[asan] Use __ANDROID__ guard in asan_test.
...
llvm-svn: 163313
2012-09-06 12:50:28 +00:00
Alexander Potapenko
3ecf916c33
Use the return value of dladdr() to avoid Clang warning.
...
llvm-svn: 163311
2012-09-06 12:18:45 +00:00
Kostya Serebryany
f9caa28ccf
[asan] increase max stack size to 256 (+test)
...
llvm-svn: 163308
2012-09-06 10:57:03 +00:00
Alexander Potapenko
447ff70280
Add "movsbl %dh, %ecx" and "testb %r8, %r8" to mach_override.
...
This should fix http://code.google.com/p/address-sanitizer/issues/detail?id=105
llvm-svn: 163301
2012-09-06 09:38:27 +00:00
Alexey Samsonov
36853a7a3b
[ASan] actually remove old makefile
...
llvm-svn: 163300
2012-09-06 09:30:09 +00:00
Alexey Samsonov
fdff4a8e0b
[TSan] add support for running external symbolizer other than addr2line (for testing purposes)
...
llvm-svn: 163297
2012-09-06 08:48:43 +00:00
Alexey Samsonov
3ebf2fa654
[Sanitizer] remove unused field
...
llvm-svn: 163296
2012-09-06 08:47:38 +00:00