summaryrefslogtreecommitdiffstats
path: root/compiler-rt
Commit message (Collapse)AuthorAgeFilesLines
* [sanitizer] Fix Android build.Evgeniy Stepanov2013-02-192-4/+10
| | | | llvm-svn: 175503
* [sanitizer] Add interceptors for localtime and friends.Evgeniy Stepanov2013-02-1911-51/+212
| | | | llvm-svn: 175499
* [tsan] use our own GetEnv instead of libc's getenvKostya Serebryany2013-02-193-3/+3
| | | | llvm-svn: 175498
* [asan] enable asan_prelink_test when gold is the default linker (gold and ↵Kostya Serebryany2013-02-181-4/+5
| | | | | | bfd linker have different flag syntax) llvm-svn: 175431
* [asan] added flag -d|--demangle to asan_symbolize.py, makes ↵Kostya Serebryany2013-02-181-2/+11
| | | | | | addr2line/llvm-symbolizer demangle the functions names llvm-svn: 175429
* [Sanitizer] Make temporary filename depend on user IDAlexey Samsonov2013-02-184-5/+16
| | | | llvm-svn: 175424
* [ASan] make variables unsigned to silence warnings - attempt 2Alexey Samsonov2013-02-151-3/+3
| | | | llvm-svn: 175285
* [ASan] make variable unsigned to silence the warningAlexey Samsonov2013-02-151-1/+1
| | | | llvm-svn: 175284
* [ASan] Fix https://code.google.com/p/address-sanitizer/issues/detail?id=159Alexander Potapenko2013-02-152-9/+111
| | | | | | | | | | | | | | | | | MaybeReexec() does now a tricky job to manage DYLD_INSERT_LIBRARIES in a safe way. Because we're using library interposition, it's critical for an instrumented app to be executed with the runtime library present in DYLD_INSERT_LIBRARIES list. Therefore if it's initially missing in that list, we append the runtime library name to the value of DYLD_INSERT_LIBRARIES and then exec() ourselves. On the other hand, some of the apps exec()ed by our program may not want to have ASan runtime library preloaded, so we remove the runtime library from the DYLD_INSERT_LIBRARIES if it's already there. Users may want to preload other libraries using DYLD_INSERT_LIBRARIES, so we preserve those. llvm-svn: 175276
* [asan] make asan work with 7fff8000 offset and prelinkKostya Serebryany2013-02-157-47/+237
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When prelink is installed in the system, prelink-ed libraries map between 0x003000000000 and 0x004000000000 thus occupying the shadow Gap, so we need so split the address space even further, like this: || [0x10007fff8000, 0x7fffffffffff] || HighMem || || [0x02008fff7000, 0x10007fff7fff] || HighShadow || || [0x004000000000, 0x02008fff6fff] || ShadowGap3 || || [0x003000000000, 0x003fffffffff] || MidMem || || [0x00087fff8000, 0x002fffffffff] || ShadowGap2 || || [0x00067fff8000, 0x00087fff7fff] || MidShadow || || [0x00008fff7000, 0x00067fff7fff] || ShadowGap || || [0x00007fff8000, 0x00008fff6fff] || LowShadow || || [0x000000000000, 0x00007fff7fff] || LowMem || Do it only if necessary. Also added a bit of profiling code to make sure that the mapping code is efficient. Added a lit test to simulate prelink-ed libraries. Unfortunately, this test does not work with binutils-gold linker. If gold is the default linker the test silently passes. Also replaced __has_feature(address_sanitizer) with __has_feature(address_sanitizer) || defined(__SANITIZE_ADDRESS__) in two places. Patch partially by Jakub Jelinek. llvm-svn: 175263
* [sanitizer] Get full argv and envp on glibc.Evgeniy Stepanov2013-02-141-3/+24
| | | | | | | /proc/$PID/cmdline is clipped to 4Kb. Locate argv and envp on the main thread stack. llvm-svn: 175163
* [ASan] Fixed the wrong placement of #includeAlexander Potapenko2013-02-141-1/+1
| | | | llvm-svn: 175157
* [ASan] Remove the 'alarm' script which isn't present on OS X by default.Alexander Potapenko2013-02-141-2/+2
| | | | | | The test may hang now if a regression occurs. llvm-svn: 175155
* tsan: fix bug in suppression reading (suppressions from file were discarded)Dmitry Vyukov2013-02-141-1/+1
| | | | llvm-svn: 175153
* [sanitizer] Raise argv limit for ReExec.Evgeniy Stepanov2013-02-141-1/+1
| | | | | | We are still limited by /proc/*/cmdline size (4Kb max on Linux!). llvm-svn: 175145
* [asan] use short path for sanitizer_common/tests/sanitizer_test_utils.h, add ↵Kostya Serebryany2013-02-142-1/+2
| | | | | | -I sanitizer_common/tests to asan/tests/CMakeLists.txt llvm-svn: 175142
* [asan] fix x32 build (H.J. Lu)Kostya Serebryany2013-02-141-2/+2
| | | | llvm-svn: 175140
* [tsan] disable a failing test until it gets fixed. fix lintKostya Serebryany2013-02-142-2/+4
| | | | llvm-svn: 175137
* ubsan: Add checking for invalid downcasts. Per [expr.static.cast]p2 and p11,Richard Smith2013-02-133-4/+14
| | | | | | | base-to-derived casts have undefined behavior if the object is not actually an instance of the derived type. Runtime library part. llvm-svn: 175079
* [ASan] When re-executing the process on OS X, make sure we update the ↵Alexander Potapenko2013-02-133-1/+50
| | | | | | | | | existing DYLD_INSERT_LIBRARIES correctly. Previously ASan used to hang in an exec loop, because it failed to overwrite the env var value (see https://code.google.com/p/address-sanitizer/issues/detail?id=159). llvm-svn: 175059
* tsan: do not imitate memory write on malloc() (Go)Dmitry Vyukov2013-02-133-5/+27
| | | | | | better memory range access functions (put only 1 event to trace) (Go) llvm-svn: 175056
* [asan] fix fixed mapping for mac (ASAN_FLEXIBLE_MAPPING_AND_OFFSET=0)Kostya Serebryany2013-02-131-1/+5
| | | | llvm-svn: 175049
* [msan] don't check shadow inside interceptors if we are inside symbolizer; ↵Kostya Serebryany2013-02-135-6/+42
| | | | | | add weak function __msan_default_options that overrides default options llvm-svn: 175040
* [tsan] simplify tsan-vs-gvn test since gvn vs tsan is now fixed; fix lint Kostya Serebryany2013-02-132-8/+6
| | | | llvm-svn: 175037
* Highlight caret in bold green, to match Clang diagnostics.Richard Smith2013-02-121-2/+7
| | | | llvm-svn: 175013
* [sanitizer] Tests for scanf parser in allowGnuMalloc=false mode.Evgeniy Stepanov2013-02-121-7/+30
| | | | llvm-svn: 174971
* [msan] Allow zero buf pointer in getcwd() interceptor.Evgeniy Stepanov2013-02-122-1/+8
| | | | llvm-svn: 174970
* [sanitizer] More accurate scanf parsing without GNU extensions.Evgeniy Stepanov2013-02-122-13/+15
| | | | | | | | | In __isoc99_*scanf we don't have to worry about GNUisms, and can parse %a accurately. Patch by Jakub Jelinek. llvm-svn: 174969
* [asan] Add new __isoc99_*scanf to ASan intercepted functions list.Evgeniy Stepanov2013-02-121-0/+14
| | | | llvm-svn: 174965
* [sanitizer] Missing changes from r174960.Evgeniy Stepanov2013-02-122-0/+12
| | | | llvm-svn: 174962
* [sanitizer] Intercept __isoc99_*scanf.Evgeniy Stepanov2013-02-122-66/+64
| | | | llvm-svn: 174960
* [asan] change the default mapping offset on x86_64 to 0x7fff8000. This gives ↵Kostya Serebryany2013-02-122-2/+6
| | | | | | 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
* [MSan] symbolize correct PC when printing Summary messageAlexey Samsonov2013-02-121-1/+2
| | | | llvm-svn: 174956
* [sanitizer] clang-format pass over scanf code.Evgeniy Stepanov2013-02-112-85/+86
| | | | llvm-svn: 174888
* [sanitizer] scanf: don't report stores that did not happen.Evgeniy Stepanov2013-02-113-20/+51
| | | | | | | Respect REAL(scanf) return value and don't report memory stores that could potentially happen, but did not. llvm-svn: 174887
* [sanitizer] Remove an extra va_copy.Evgeniy Stepanov2013-02-112-8/+5
| | | | llvm-svn: 174883
* [sanitizer] Scanf parser improvements.Evgeniy Stepanov2013-02-112-14/+63
| | | | | | | | | Handle %a in cases when it is unambiguous. Handle %m. Patch by Jakub Jelinek. llvm-svn: 174882
* [msan] Lit tests for MemorySanitizer.Evgeniy Stepanov2013-02-1110-22/+208
| | | | | | | | 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
* [tsan] added tsan-vs-gvn testKostya Serebryany2013-02-111-0/+40
| | | | llvm-svn: 174875
* [sanitizer] Fix line numbers in a sanitizer lit test.Evgeniy Stepanov2013-02-111-5/+5
| | | | llvm-svn: 174861
* [asan] Fix off-by-one in AddrIsAtRight.Evgeniy Stepanov2013-02-082-1/+47
| | | | llvm-svn: 174710
* [sanitizer] Fix lint.Evgeniy Stepanov2013-02-081-6/+8
| | | | llvm-svn: 174708
* [ASan] Switch Windows to allocator v2, also fixing some build errorsTimur Iskhodzhanov2013-02-085-6/+11
| | | | llvm-svn: 174707
* [ASan] Move functions using BitScan/clzl to sanitizer_commonTimur Iskhodzhanov2013-02-082-45/+53
| | | | llvm-svn: 174706
* [sanitizer] Add 2 random tests for the scanf implementation.Evgeniy Stepanov2013-02-081-0/+3
| | | | llvm-svn: 174705
* [sanitizer] Improve scanf interceptorEvgeniy Stepanov2013-02-083-140/+261
| | | | | | | | | | | | | | 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
* [CMake] set -mmacosx-version-min to 10.7 if compiler-rt is built with ↵Alexey Samsonov2013-02-082-1/+24
| | | | | | -stdlib=libc++ llvm-svn: 174699
* tsan: fix suppress_java logicDmitry Vyukov2013-02-071-7/+10
| | | | llvm-svn: 174635
* [ASan] Remove the replace_cfallocator flag, which is used no more.Alexander Potapenko2013-02-072-4/+0
| | | | | | See https://code.google.com/p/address-sanitizer/issues/detail?id=10 for the context. llvm-svn: 174629
* [ASan] Enable alloc_dealloc_mismatch by default on Darwin.Alexander Potapenko2013-02-072-5/+2
| | | | | | Enable AddressSanitizer.AllocDeallocMismatch tests. llvm-svn: 174628
OpenPOWER on IntegriCloud