summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merging r215295:release_35Renato Golin2014-08-192-7/+3
| | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r215295 | compnerd | 2014-08-09 21:17:37 +0100 (Sat, 09 Aug 2014) | 10 lines builtins: correct __umodsi3, __udivsi3 on ARM When building the builtins for a modern CPU (idiv support), __umodsi3 was completely incorrect as it would behave as __udivmosi3, which takes a tertiary parameter which is a pointer. __udivsi3 was also incorrect, returning the remainder in r1. Although this would not result in any crash or invalid behaviour as r1 is a caller saved register in AAPCS, this is unnecessary. Simply perform the division ignoring the remainder. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/branches/release_35@216035 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert renaming. Should rename tags instead.Bill Wendling2014-08-060-0/+0
|\ | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/branches/release_35@215015 91177308-0d34-0410-b5e6-96231b3b80d8
| * Renaming to coincide with updated tagging system.release_35@215014Bill Wendling2014-08-060-0/+0
|/ | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/branches/release_350@215005 91177308-0d34-0410-b5e6-96231b3b80d8
* Creating release_35 branchBill Wendling2014-07-220-0/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/branches/release_35@213601 91177308-0d34-0410-b5e6-96231b3b80d8
* [MSan] Fix strncpy interceptorAlexey Samsonov2014-07-222-4/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@213590 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] Fix __asan_describe_address and add a test for it.Alexey Samsonov2014-07-212-0/+22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@213583 91177308-0d34-0410-b5e6-96231b3b80d8
* Adjust gen_dynamic_list for PowerPC function descriptorsAlexey Samsonov2014-07-211-1/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@213577 91177308-0d34-0410-b5e6-96231b3b80d8
* [lsan] Allow using ucontext.h in the test on OSX.Alexander Potapenko2014-07-211-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@213523 91177308-0d34-0410-b5e6-96231b3b80d8
* [lsan] Define MAP_ANONYMOUS as MAP_ANON for OSX in the test.Alexander Potapenko2014-07-211-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@213518 91177308-0d34-0410-b5e6-96231b3b80d8
* [lsan] Use a more standard-conformant sched_yield() instead of pthread_yield().Alexander Potapenko2014-07-212-4/+6
| | | | | | | There's no pthread_yield() on OSX (only sched_yield() and pthread_yield_np()). git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@213516 91177308-0d34-0410-b5e6-96231b3b80d8
* Redo THUMB support.Joerg Sonnenberger2014-07-203-7/+76
| | | | | | | Discussed with and tested by: Saleem Abdulrasool git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@213481 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r213467, it breaks non-thumb mode.Joerg Sonnenberger2014-07-204-182/+20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@213479 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM: fix division in some casesSaleem Abdulrasool2014-07-204-20/+182
| | | | | | | | | | | | | | | | | | | | | | | | For ARM cores that are ARMv6T2+ but not ARMv7ve or ARMv7-r and not an updated ARMv7-a that has the idiv extension (chips with clz but not idiv), an incorrect jump would be calculated due to the preference to thumb instructions over ARM. Rather than computing the target at runtime, use a jumptable instead. This trades a bit of storage for performance. The overhead is 32-bytes for each of the three routines, but avoid the calculation of the offset. Because clz was introduced in ARMv6T2 and idiv in certain versions of ARMv7, the non-clz, non-idiv case implies a target which does not support Thumb-2, and thus we cannot use Thumb on those targets (as it is unlikely that the assembly will assemble). Take the opportunity to refactor the IT block macros into assembly.h rather than redefining them in the TUs where they are used. Existing tests cover the full change already, so no new tests are added. This effectively reverts SVN r213309. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@213467 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: fix Go runtime build with clangDmitry Vyukov2014-07-181-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@213384 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: expose atomic operations in Go runtimeDmitry Vyukov2014-07-184-49/+155
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@213382 91177308-0d34-0410-b5e6-96231b3b80d8
* Add FreeBSD support to the Asan symbolization scriptViktor Kutuzov2014-07-181-1/+1
| | | | | | | Differential Revision: http://reviews.llvm.org/D4560 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@213370 91177308-0d34-0410-b5e6-96231b3b80d8
* Add FreeBSD support to the address sanitizer's waitid.cc test caseViktor Kutuzov2014-07-181-0/+1
| | | | | | | Differential Revision: http://reviews.llvm.org/D4422 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@213368 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert Thumb-2 conversion of some ARM builtins.Stephen Hines2014-07-173-47/+8
| | | | | | | | | The udivmodsi4/modsi3/umodsi3 code computes jump targets based on ARM encodings (if CLZ is present and IDIV is not present). Reverts parts of r211032 and r211035. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@213309 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] Remove leftover debug printf.Evgeniy Stepanov2014-07-171-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@213264 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] Fix malloc interception on Android L Preview.Evgeniy Stepanov2014-07-171-39/+61
| | | | | | | | | Format of __libc_malloc_dispatch has changed in Android L. While we are moving towards a solution that does not depend on bionic internals, here is something to support both K* and L releases. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@213263 91177308-0d34-0410-b5e6-96231b3b80d8
* [compiler-rt] [asan] Refactor DescribeAddressIfStack to allow reuse for ↵Kuba Brecka2014-07-172-28/+39
| | | | | | | | | | | | debugging API Refactoring the DescribeAddressIfStack function in asan_report.cc to be able to reuse it for http://reviews.llvm.org/D4527. Reviewed at http://reviews.llvm.org/D4545. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@213215 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan/Win] Handle situations when the client app has used DbgHelp beforeTimur Iskhodzhanov2014-07-162-5/+35
| | | | | | Reviewed at http://reviews.llvm.org/D4533 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@213151 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] Adjust 'sed' invocation to work on OS XTimur Iskhodzhanov2014-07-162-2/+2
| | | | | | This is a follow-up to r213053 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@213144 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] Factor out SymbolizationLoop.process_line() function to let PythonAlexander Potapenko2014-07-161-25/+31
| | | | | | | | scripts that import asan_symbolize to symbolize their reports line by line. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@213136 91177308-0d34-0410-b5e6-96231b3b80d8
* Add FreeBSD support to the address sanitizer's ↵Viktor Kutuzov2014-07-161-2/+3
| | | | | | | | | assign_large_valloc_to_global.cc test case Differential Revision: http://reviews.llvm.org/D4525 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@213135 91177308-0d34-0410-b5e6-96231b3b80d8
* Add FreeBSD support to the address sanitizer's atexit_stats.cc test caseViktor Kutuzov2014-07-161-1/+1
| | | | | | | Differential Revision: http://reviews.llvm.org/D4524 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@213134 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove explicit references to libdl from Asan test casesViktor Kutuzov2014-07-166-13/+18
| | | | | | | Differential Revision: http://reviews.llvm.org/D4499 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@213131 91177308-0d34-0410-b5e6-96231b3b80d8
* Add FreeBSD support to the address sanitizer's null_deref.cc test caseViktor Kutuzov2014-07-161-7/+7
| | | | | | | Differential Revision: http://reviews.llvm.org/D4421 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@213130 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] Add ASan debugging API to get malloc/free stack traces and shadow ↵Kuba Brecka2014-07-156-0/+188
| | | | | | | | | | | memory mapping info Reviewed at http://reviews.llvm.org/D4466 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@213080 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: remove special handling of false reports coming from JVMDmitry Vyukov2014-07-154-47/+0
| | | | | | | | There is now a more common functionality in the form of called_from_lib suppressions. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@213057 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: remove compat mappingDmitry Vyukov2014-07-154-47/+2
| | | | | | | | There are no known usages anymore, so one less thing to support. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@213056 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] De-flake one test.Evgeniy Stepanov2014-07-151-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@213054 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] Only define macros in asan_init_version.h, move the __asan_init ↵Timur Iskhodzhanov2014-07-156-16/+13
| | | | | | | | | | declaration back to asan_interface_internal.h This fixes the issues we've uncovered after landing r212815. Reviewed at http://reviews.llvm.org/D4500 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@213053 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for intercepting thunks of the formEhsan Akhgari2014-07-141-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@212979 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan/Win] Add a test for the case when dll_thunk is linked twice to the ↵Timur Iskhodzhanov2014-07-142-0/+20
| | | | | | | | same DLL This is a test case for r212815. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@212959 91177308-0d34-0410-b5e6-96231b3b80d8
* [tsan] honour XFAIL in tsan/test_output.shKostya Serebryany2014-07-141-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@212952 91177308-0d34-0410-b5e6-96231b3b80d8
* [tsan] add a printf to a testKostya Serebryany2014-07-141-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@212951 91177308-0d34-0410-b5e6-96231b3b80d8
* [tsan] add a currently-failing test with a must-deadlockKostya Serebryany2014-07-141-0/+49
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@212944 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] Fix a couple of nits in NULL deref testsTimur Iskhodzhanov2014-07-142-3/+3
| | | | | | This is a follow-up to r212807 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@212943 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Intercept getpass.Evgeniy Stepanov2014-07-143-0/+51
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@212937 91177308-0d34-0410-b5e6-96231b3b80d8
* [msan] Stop demangling function name in the stack origin report.Evgeniy Stepanov2014-07-142-2/+21
| | | | | | | | | This was done by calling __cxa_demangle directly, which is bad when c++abi library is instrumented. The following line always contains the demangled name (when running with a symbolizer) anyway. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@212929 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] Remove XFAIL:android from 2 newly passing tests.Evgeniy Stepanov2014-07-142-6/+0
| | | | | | | Fixed in r212872. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@212926 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] Collect unmangled names of global variables in Clang to print them in ↵Alexey Samsonov2014-07-121-1/+1
| | | | | | | | | | | | | | | | | | error reports. Currently ASan instrumentation pass creates a string with global name for each instrumented global (to include global names in the error report). Global name is already mangled at this point, and we may not be able to demangle it at runtime (e.g. there is no __cxa_demangle on Android). Instead, create a string with fully qualified global name in Clang, and pass it to ASan instrumentation pass in llvm.asan.globals metadata. If there is no metadata for some global, ASan will use the original algorithm. This fixes https://code.google.com/p/address-sanitizer/issues/detail?id=264. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@212872 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] Improve ODR-violation error reports.Alexey Samsonov2014-07-112-9/+15
| | | | | | | Demangle names of involved globals. Print a more consistent summary line. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@212857 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] fix x32 build, patch by H.J. LuKostya Serebryany2014-07-111-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@212823 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan/Win] Don't apply dllexport to __asan_init in the DLL thunkTimur Iskhodzhanov2014-07-112-2/+6
| | | | | | | | This fixes '___asan_init_v4 already defined' errors when linking some of Chromium DLLs. Looks like one of the DLL is using a .lib produced while linking another DLL and it exploded after r212699. I'm trying to come up with a small testcase... git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@212815 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] Print register values in a consistent wayTimur Iskhodzhanov2014-07-112-6/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@212809 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan/Win] Catch NULL derefs and page faultsTimur Iskhodzhanov2014-07-116-9/+88
| | | | | | Reviewed at http://reviews.llvm.org/D4471 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@212807 91177308-0d34-0410-b5e6-96231b3b80d8
* [msan] A comment for the chained-origin-depot hash function.Evgeniy Stepanov2014-07-111-0/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@212801 91177308-0d34-0410-b5e6-96231b3b80d8
* [msan] Use real memset/memcpy/memmove in interceptors.Evgeniy Stepanov2014-07-111-51/+14
| | | | | | | | | | | | | Our versions are not exactly as fast as libc's, and MSan uses them heavily (even compared to other sanitizers). This will break if libc version of mem* are instrumented, but they never are, and if they are, we should be able to fix it on libc side. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@212799 91177308-0d34-0410-b5e6-96231b3b80d8