Kostya Serebryany
ec87e785a3
[msan] don't check shadow inside interceptors if we are inside symbolizer; add weak function __msan_default_options that overrides default options
...
llvm-svn: 175040
2013-02-13 07:19:47 +00:00
Kostya Serebryany
4681fbf002
[tsan] simplify tsan-vs-gvn test since gvn vs tsan is now fixed; fix lint
...
llvm-svn: 175037
2013-02-13 06:07:50 +00:00
Richard Smith
60261eadbd
Highlight caret in bold green, to match Clang diagnostics.
...
llvm-svn: 175013
2013-02-12 22:12:10 +00:00
Evgeniy Stepanov
71a4ab7141
[sanitizer] Tests for scanf parser in allowGnuMalloc=false mode.
...
llvm-svn: 174971
2013-02-12 14:37:55 +00:00
Evgeniy Stepanov
e676f66fe3
[msan] Allow zero buf pointer in getcwd() interceptor.
...
llvm-svn: 174970
2013-02-12 14:36:22 +00:00
Evgeniy Stepanov
b5ec3a2d55
[sanitizer] More accurate scanf parsing without GNU extensions.
...
In __isoc99_*scanf we don't have to worry about GNUisms, and can parse
%a accurately.
Patch by Jakub Jelinek.
llvm-svn: 174969
2013-02-12 14:29:34 +00:00
Evgeniy Stepanov
a73704c0f8
[asan] Add new __isoc99_*scanf to ASan intercepted functions list.
...
llvm-svn: 174965
2013-02-12 12:45:29 +00:00
Evgeniy Stepanov
d8cfb99a71
[sanitizer] Missing changes from r174960.
...
llvm-svn: 174962
2013-02-12 12:02:49 +00:00
Evgeniy Stepanov
5fa8fb7d91
[sanitizer] Intercept __isoc99_*scanf.
...
llvm-svn: 174960
2013-02-12 11:34:52 +00:00
Kostya Serebryany
2659e96e4b
[asan] change the default mapping offset on x86_64 to 0x7fff8000. This gives roughly 5% speedup. Since this is an ABI change, bump the asan ABI version by renaming __asan_init to __asan_init_v1. compiler-rt part
...
llvm-svn: 174958
2013-02-12 11:11:58 +00:00
Alexey Samsonov
93686fc6f1
[MSan] symbolize correct PC when printing Summary message
...
llvm-svn: 174956
2013-02-12 10:46:39 +00:00
Evgeniy Stepanov
154faa6ded
[sanitizer] clang-format pass over scanf code.
...
llvm-svn: 174888
2013-02-11 15:22:34 +00:00
Evgeniy Stepanov
455c72d25e
[sanitizer] scanf: don't report stores that did not happen.
...
Respect REAL(scanf) return value and don't report memory stores that
could potentially happen, but did not.
llvm-svn: 174887
2013-02-11 15:16:48 +00:00
Evgeniy Stepanov
5eb25e8d39
[sanitizer] Remove an extra va_copy.
...
llvm-svn: 174883
2013-02-11 14:08:12 +00:00
Evgeniy Stepanov
7e0430fe4f
[sanitizer] Scanf parser improvements.
...
Handle %a in cases when it is unambiguous.
Handle %m.
Patch by Jakub Jelinek.
llvm-svn: 174882
2013-02-11 14:04:24 +00:00
Evgeniy Stepanov
257274e754
[msan] Lit tests for MemorySanitizer.
...
Build system setup for MSan lit tests (build with freshly-built clang, run,
check output) - a nearly exact copy from ASan.
First 2 lit tests for MSan.
llvm-svn: 174876
2013-02-11 11:34:26 +00:00
Kostya Serebryany
53e37ef74f
[tsan] added tsan-vs-gvn test
...
llvm-svn: 174875
2013-02-11 11:28:03 +00:00
Evgeniy Stepanov
9f9d79f3ad
[sanitizer] Fix line numbers in a sanitizer lit test.
...
llvm-svn: 174861
2013-02-11 07:19:24 +00:00
Evgeniy Stepanov
0b805cc75c
[asan] Fix off-by-one in AddrIsAtRight.
...
llvm-svn: 174710
2013-02-08 12:59:42 +00:00
Evgeniy Stepanov
60a8e5b9b7
[sanitizer] Fix lint.
...
llvm-svn: 174708
2013-02-08 12:13:43 +00:00
Timur Iskhodzhanov
167f9e4395
[ASan] Switch Windows to allocator v2, also fixing some build errors
...
llvm-svn: 174707
2013-02-08 12:02:00 +00:00
Timur Iskhodzhanov
659bca56a7
[ASan] Move functions using BitScan/clzl to sanitizer_common
...
llvm-svn: 174706
2013-02-08 11:45:04 +00:00
Evgeniy Stepanov
e6045b4603
[sanitizer] Add 2 random tests for the scanf implementation.
...
llvm-svn: 174705
2013-02-08 11:19:23 +00:00
Evgeniy Stepanov
87c43537df
[sanitizer] Improve scanf interceptor
...
This a rewrite of the scanf parser. The new implementation is pretty close to
the spec, with a few shortcuts taken here and there. It is conservative, i.e.
it gives up parsing if it does not understand some part of the format string,
or runs into an ambiguous % spec. It does not handle some rarely used parts of
the spec, like %n$ - for now.
I'm also moving parser call to after the original *scanf function completes,
so that we can find out the store size of %s directive by the use of strlen()
on the target buffer.
llvm-svn: 174704
2013-02-08 11:17:20 +00:00
Alexey Samsonov
5cb7860129
[CMake] set -mmacosx-version-min to 10.7 if compiler-rt is built with -stdlib=libc++
...
llvm-svn: 174699
2013-02-08 07:39:25 +00:00
Dmitry Vyukov
e679798315
tsan: fix suppress_java logic
...
llvm-svn: 174635
2013-02-07 17:12:28 +00:00
Alexander Potapenko
c192af29f5
[ASan] Remove the replace_cfallocator flag, which is used no more.
...
See https://code.google.com/p/address-sanitizer/issues/detail?id=10 for the context.
llvm-svn: 174629
2013-02-07 15:59:37 +00:00
Alexander Potapenko
dc91edad59
[ASan] Enable alloc_dealloc_mismatch by default on Darwin.
...
Enable AddressSanitizer.AllocDeallocMismatch tests.
llvm-svn: 174628
2013-02-07 15:55:21 +00:00
Alexander Potapenko
4fb43438d9
[ASan] Enable the new and delete wrappers on Darwin.
...
Also fix large_func_test.cc, which got broken when we switched to allocator2: the OOB access was too far from the original allocation, so ASan decided to describe the next one.
llvm-svn: 174626
2013-02-07 15:33:56 +00:00
Dmitry Vyukov
effd98b0f4
tsan: intercept libc __res_iclose
...
this is required to catch close of file descriptors created in getaddrinfo()
llvm-svn: 174624
2013-02-07 15:27:45 +00:00
Dmitry Vyukov
e94f4c048e
tsan: fix Go build
...
llvm-svn: 174622
2013-02-07 15:26:55 +00:00
Kostya Serebryany
39675fe9c8
[sanitizer] always allocate 16-byte aligned chunks of memory
...
llvm-svn: 174617
2013-02-07 15:04:06 +00:00
Alexander Potapenko
109aa04ea9
[sanitizer_common] Fix lint warnings.
...
llvm-svn: 174616
2013-02-07 14:58:04 +00:00
Alexander Potapenko
07c740e213
[ASan] Fix a compilation warning.
...
llvm-svn: 174604
2013-02-07 12:00:40 +00:00
Alexander Potapenko
f444a49310
[ASan] Implement asan_mz_size(), asan_mz_force_lock() and asan_mz_force_unlock() for allocator2.
...
Switch to allocator2 on Darwin.
llvm-svn: 174603
2013-02-07 11:40:03 +00:00
Evgeniy Stepanov
4ea6816247
[sanitizer] OFF_T on Mac is u64.
...
llvm-svn: 174600
2013-02-07 09:52:43 +00:00
Kostya Serebryany
df2f0bff37
[tsan] race_on_write test
...
llvm-svn: 174599
2013-02-07 09:48:17 +00:00
Evgeniy Stepanov
44f083d49b
[sanitizer] Exclude off64_t test on mac.
...
llvm-svn: 174598
2013-02-07 09:34:08 +00:00
Alexey Samsonov
b788512d11
[Sanitizer] include stddef.h for ptrdiff_t in interception type test
...
llvm-svn: 174597
2013-02-07 09:03:01 +00:00
Zonr Chang
2d5d8168ff
Implement aeabi_{f,d}cmp*.
...
Special thanks to Anton for the review.
llvm-svn: 174596
2013-02-07 08:29:47 +00:00
Kostya Serebryany
7b0b9b3b65
[msan] add strip_path_prefix flag; print error summary; don't crash while printing summary if debug info is missing. The tests will follow later once we establish the lit-like tests for msan.
...
llvm-svn: 174595
2013-02-07 08:04:56 +00:00
Evgeniy Stepanov
3e3d0be7de
[sanitizer] Add a missing header.
...
llvm-svn: 174594
2013-02-07 07:43:41 +00:00
Evgeniy Stepanov
8268785f44
[sanitizer] Fix wrong size of OFF_T on 32-bit platforms.
...
This broke pread/pwrite interceptors when building without
-D_FILE_OFFSET_BITS=64, and always on Android.
llvm-svn: 174593
2013-02-07 07:37:12 +00:00
Alexey Samsonov
85cc9b655d
[TSan] skip multiple internal frames, if necessary
...
llvm-svn: 174516
2013-02-06 16:28:05 +00:00
Alexander Potapenko
09aba10499
[ASan] fix the interceptor for siglongjmp. As we're using dylib interposition, we must intercept both siglongjmp and longjmp on Darwin.
...
llvm-svn: 174510
2013-02-06 15:45:43 +00:00
Alexander Potapenko
d895ae94f9
Use 64-bit inodes in file operations. ASan is now built with -mmacosx-version-min=10.5, thus the default inode
...
size is 32 bits. However the supported client code is going to target 10.6 and higher, where 64-bit inodes will be used.
llvm-svn: 174507
2013-02-06 14:41:15 +00:00
Kostya Serebryany
21bedab7a1
[tsan] improve FrameIsInternal
...
llvm-svn: 174506
2013-02-06 14:32:16 +00:00
Kostya Serebryany
4fb340d972
[tsan] print error summary line
...
llvm-svn: 174505
2013-02-06 14:24:00 +00:00
Kostya Serebryany
b4c2c5c8a6
[asan] print a short one-line report summary after the full report. Currently, works only if symbolization happens in-process.
...
llvm-svn: 174501
2013-02-06 12:36:49 +00:00
Alexander Potapenko
34157fc33f
[ASan] Delete the code related to static runtime on OS X.
...
Nuke lib/interception/mach_override.
llvm-svn: 174383
2013-02-05 15:57:12 +00:00