Alexey Samsonov
0c8b755839
Flag -ccc-clang-cxx was removed in r166986, remove it from compiler-rt lit configs
...
llvm-svn: 167010
2012-10-30 10:06:42 +00:00
Richard Smith
8f4d7eb518
Consistently declare 'extern "C"' variable in namespace __ubsan. No functionality change.
...
llvm-svn: 166966
2012-10-29 21:01:59 +00:00
Richard Smith
f0aac0b99e
Don't define an extern "C" variable in its first declaration, to appease a
...
bogus gcc warning. Take this opportunity to move the declaration to the header,
since it's part of the API of this file.
llvm-svn: 166965
2012-10-29 20:54:34 +00:00
Alexander Potapenko
dda4f0b593
Fix a compiler warning in internal_memmove.
...
llvm-svn: 166775
2012-10-26 13:47:36 +00:00
Alexander Potapenko
2a1925852d
Fix the internal_memmove() implementation that used to skip src[0] if dst < src.
...
llvm-svn: 166774
2012-10-26 13:24:20 +00:00
Alexey Samsonov
23b9199776
[ASan] don't run hacky test for __asan_get_free_bytes() on 32-bits
...
llvm-svn: 166771
2012-10-26 12:10:24 +00:00
Alexander Potapenko
99843d3a29
In the dynamic runtime on Mac OS, do not call internal_strdup() before __asan_init().
...
This may result in a crash at startup.
Fixes http://code.google.com/p/address-sanitizer/issues/detail?id=123 .
llvm-svn: 166768
2012-10-26 11:31:14 +00:00
Richard Smith
2f0d7d564c
-fcatch-undefined-behavior checking for appropriate vptr value: library side.
...
llvm-svn: 166660
2012-10-25 02:07:02 +00:00
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