summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* [ARM|RT] Merging r24766 into 3.9.1release_39Renato Golin2016-12-021-2/+17
| | | | | | | Fixes a bug encountered in RC2 validation. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/branches/release_39@288513 91177308-0d34-0410-b5e6-96231b3b80d8
* [3.9.1] Merging r287359:Renato Golin2016-11-192-0/+66
| | | | | | | | | | | | | | | | | | | | | builtins: repair the builtins build with clang 3.8 When the C unwinding personality was corrected to match the ARM EHABI specification, the unwind header in clang was updated with necessary declarations. However, when building with an older compiler, we would not have the necessary declarations. This would result in a build failure. Provide a supplementary header to ensure that the necessary declarations are present for the build of the C unwinding personality. Note that this is NOT an ABI break. It merely is a compile time failure due to the constants not being present. The constants here are reproduced equivalently. This header should permit building with clang[<3.9] as well as gcc. Addresses PR31035! git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/branches/release_39@287441 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r279352:Hans Wennborg2016-08-221-0/+8
| | | | | | | | | | | ------------------------------------------------------------------------ r279352 | eugenis | 2016-08-19 17:38:55 -0700 (Fri, 19 Aug 2016) | 1 line [msan] Disable prlimit test on glibc < 2.13. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/branches/release_39@279471 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r278454:Hans Wennborg2016-08-153-5/+36
| | | | | | | | | | | | | ------------------------------------------------------------------------ r278454 | cbieneman | 2016-08-11 18:29:26 -0700 (Thu, 11 Aug 2016) | 3 lines [CMake] If the compiler supports _Atomic include atomic.c in builtins libraries This fixes a long-standing TODO by implementing a compiler check for supporting the _Atomic keyword. If the _Atomic keyword is supported by the compiler we should include it in the builtin library sources. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/branches/release_39@278679 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove test/asan/TestCases/Darwin/dead-strip.cHans Wennborg2016-08-111-22/+0
| | | | | | | | The test is gated on OS version, but actually depends on what SDK is used, see PR28743. Deleting to unblock 3.9. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/branches/release_39@278427 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r277300:Dimitry Andric2016-08-021-0/+2
| | | | | | | | | | | | | | | ------------------------------------------------------------------------ r277300 | dim | 2016-07-31 22:16:59 +0200 (Sun, 31 Jul 2016) | 5 lines Fix ASan alloca_constant_size.cc test on FreeBSD. On FreeBSD <alloca.h> does not exist: alloca(3) is defined in <stdlib.h> instead. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/branches/release_39@277424 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r277297:Dimitry Andric2016-08-021-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r277297 | dim | 2016-07-31 21:27:46 +0200 (Sun, 31 Jul 2016) | 21 lines XFAIL one sanitizer symbolizer test for FreeBSD Summary: Due to a QoI issuse in FreeBSD's libcxxrt-based demangler, one sanitizer symbolizer test consistently appears to fail: Value of: DemangleSwiftAndCXX("foo") Actual: "float" Expected: "foo" This is because libcxxrt's __cxa_demangle() incorrectly demangles the "foo" identifier to "float". It should return an error instead. For now, XFAIL this particular test for FreeBSD, until we can fix libcxxrt properly (which might take some time to coordinate with upstream). Reviewers: rnk, zaks.anna, emaste Subscribers: emaste, llvm-commits, kubabrecka Differential Revision: https://reviews.llvm.org/D23001 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/branches/release_39@277423 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r275946 and r275948:Hans Wennborg2016-07-209-19/+50
| | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r275946 | bruening | 2016-07-18 22:03:38 -0700 (Mon, 18 Jul 2016) | 5 lines [esan] Fix sideline thread flaky assert Fixes an esan sideline thread CHECK that failed to account for the sideline thread reaching its code before the internal_clone() return value was assigned in the parent. ------------------------------------------------------------------------ ------------------------------------------------------------------------ r275948 | bruening | 2016-07-18 22:06:48 -0700 (Mon, 18 Jul 2016) | 4 lines [esan|wset] Fix flaky sampling tests Adds a new esan public interface routine __esan_get_sample_count() and uses it to ensure that tests of sampling receive the minimum number of samples. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/branches/release_39@276114 91177308-0d34-0410-b5e6-96231b3b80d8
* Creating release_39 branch off revision 275826Hans Wennborg2016-07-180-0/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/branches/release_39@275831 91177308-0d34-0410-b5e6-96231b3b80d8
* revert https://reviews.llvm.org/D22393Etienne Bergeron2016-07-181-2/+0
| | | | | | | | It is breaking build 32-bit build bots. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@275816 91177308-0d34-0410-b5e6-96231b3b80d8
* Code refactoring: extract path prefix handling codeXinliang David Li2016-07-183-36/+74
| | | | | | | | | .. into reusable interfaces. No functional change is expected. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@275807 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] Enable 48-bit VMA support on aarch64Adhemerval Zanella2016-07-181-0/+2
| | | | | | | | | | | | | | | | This patch adds 48-bits VMA support for asan on aarch64. The current 47-bit mask is not suffice since on aarch64 kernel with 48-bit vma (default on ubuntu 16.04) the process may use full VMA range as: [...] ffffa39a7000-ffffa39a8000 r--p 00000000 00:00 0 [vvar] ffffa39a8000-ffffa39a9000 r-xp 00000000 00:00 0 [vdso] ffffa39a9000-ffffa39aa000 r--p 0001c000 08:02 13631554 /lib/aarch64-linux-gnu/ld-2.23.so ffffa39aa000-ffffa39ac000 rw-p 0001d000 08:02 13631554 /lib/aarch64-linux-gnu/ld-2.23.so ffffc2227000-ffffc2248000 rw-p 00000000 00:00 0 [stack] git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@275792 91177308-0d34-0410-b5e6-96231b3b80d8
* [Compiler-rt][MIPS] Fix simple test failure when using gccMohit K. Bhakkad2016-07-181-2/+2
| | | | | | | | | | Reviewers: dsanders Subscribers: slthakur, jaydeep, llvm-commits, Sanitizers Differential Revision: https://reviews.llvm.org/D22453 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@275780 91177308-0d34-0410-b5e6-96231b3b80d8
* [compiler-rt] Change all asm directives to __asm__ in cpu_model.Alina Sbirlea2016-07-171-36/+36
| | | | | | | | | | | | | | Summary: Aiming to resolve failure in sanitizer bot by changning all asm directives to __asm__. Also, consistency. Reviewers: llvm-commits, echristo, vitalybuka Subscribers: mehdi_amini Differential Revision: https://reviews.llvm.org/D22446 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@275740 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] trying to fix the windows build Kostya Serebryany2016-07-152-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@275644 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a typeo.George Burgess IV2016-07-151-1/+1
| | | | | | | (obligatory s/typeo/typo) git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@275632 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizers] add interceptor for memmem; add weak hooks for strncasecmp, ↵Kostya Serebryany2016-07-156-2/+169
| | | | | | strcasecmp, strstr, strcasestr, memmem git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@275621 91177308-0d34-0410-b5e6-96231b3b80d8
* [Profile] instroduce portability macro for dir separator(sXinliang David Li2016-07-153-4/+24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@275597 91177308-0d34-0410-b5e6-96231b3b80d8
* [compiler-rt] Fix 64-bits exception handlers in ASAN 64-bits runtimeEtienne Bergeron2016-07-152-5/+21
| | | | | | | | | | | | | | Summary: This is adding the appropriate suport for exception handling for 64-bits ASAN on windows. Reviewers: rnk Subscribers: kubabrecka, llvm-commits, wang0109, chrisha Differential Revision: https://reviews.llvm.org/D22395 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@275585 91177308-0d34-0410-b5e6-96231b3b80d8
* [compiler-rt] Fix incorrect handling of indirect load.Etienne Bergeron2016-07-151-15/+3
| | | | | | | | | | | | | | | | | | | | | | Summary: Indirect load are relative offset from RIP. The current trampoline implementation is incorrectly copying these instructions which make some unittests crashing. This patch is not fixing the unittests but it's fixing the crashes. The functions are no longer hooked. Patches will come soon to fix these unittests. Reviewers: rnk Subscribers: llvm-commits, wang0109, chrisha Differential Revision: https://reviews.llvm.org/D22410 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@275584 91177308-0d34-0410-b5e6-96231b3b80d8
* TestCase null_deref was failing in Win64:Etienne Bergeron2016-07-154-5/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | c:\lipo\work\asan\b_llvm>c:\lipo\work\asan\b_llvm\projects\compiler-rt\test\asan\X86_64WindowsConfig\TestCases\Output\null_deref.cc.tmp ================================================================= ==5488==ERROR: AddressSanitizer: access-violation on unknown address 0x000000000028 (pc 0x7ff701f91067 bp 0x000c8cf8fbf0 sp 0x000c8cf8fbb0 T0) ==5488==The signal is caused by a READ memory access. ==5488==Hint: address points to the zero page. #0 0x7ff701f91066 in NullDeref(int *) C:\lipo\work\asan\llvm\projects\compiler-rt\test\asan\TestCases\null_deref.cc:15:10 #1 0x8a0388830a67 (<unknown module>) The reason was symbols was not initilized. In fact, it was first inited with a call to stack.Print(), which calls WinSymbolizerTool::SymbolizePC, then InitializeDbgHelpIfNeeded(). Since the StackWalk was performed before the stack.Print(), stack frames where not gathered correctly. There should be a better place to initialize symbols. For now, this patch makes the test happy. Patch by Wei Wang Differential Revision: https://reviews.llvm.org/D22410 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@275580 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] Reduce flakiness of halt_on_error-torture.cc testcase.Maxim Ostapenko2016-07-151-6/+2
| | | | | | | | | | It seems in some situations we have clashes on very first error so test only prints "nested bug in the same thread, aborting" rather than "use-after-poison", so remove corresponding " RUN: FileCheck %s < 10.txt" line. Also, the two last " RUN: FileCheck --check-prefix=CHECK-COLLISION %s < 1.txt || FileCheck --check-prefix=CHECK-NO-COLLISION %s < 1.txt" look wrong, they should check 10.txt. Fix these lines too. Differential Revision: https://reviews.llvm.org/D22309 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@275539 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] Avoid hooking memchr() on Windows64Etienne Bergeron2016-07-142-2/+4
| | | | | | | | | | | | | | | | There is not enough padding in front of memchr(), and, the first 6 bytes contains a branch instruction. Basically the current interception will not work on memchr(). It was disabled before, but was missing the part to disable it for INTERCEPT_LIBRARY_FUNCTION. Patch by Wei Wang Differential Revision: https://reviews.llvm.org/D22371 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@275494 91177308-0d34-0410-b5e6-96231b3b80d8
* address comments in: https://reviews.llvm.org/D22363Etienne Bergeron2016-07-141-5/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@275492 91177308-0d34-0410-b5e6-96231b3b80d8
* [compiler-rt] Fix missing argument in asan unittestEtienne Bergeron2016-07-141-2/+2
| | | | | | | | | | | | | | | | Summary: Both test have the same command-line. The second test is missing the /GS-. Keep in mind that /GS is on by default. Reviewers: rnk Subscribers: llvm-commits, wang0109, kubabrecka, chrisha Differential Revision: https://reviews.llvm.org/D22339 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@275491 91177308-0d34-0410-b5e6-96231b3b80d8
* [compiler-rt] Add more assembly patterns for interceptionEtienne Bergeron2016-07-141-1/+7
| | | | | | | | | | | | | | | | Summary: These patterns are encounter when using instrumented DLL. Without this patch, asan lit test are crashing when trying to hook on RaiseException function. Reviewers: rnk Subscribers: llvm-commits, wang0109, chrisha Differential Revision: https://reviews.llvm.org/D22340 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@275489 91177308-0d34-0410-b5e6-96231b3b80d8
* [compiler-rt] Add internal wcslen to avoid crashing on windows 64-bitsEtienne Bergeron2016-07-143-0/+12
| | | | | | | | | | | | | | | | | | Summary: The function wcslen is incorrectly hooked on windows 64-bits. The interception library is not able to hook without breaking the code. The function is too small and the interception must be done with trampoline-hooking which turned out to be incorrect on a small loop (first few instructions have a backedge). Reviewers: rnk Subscribers: wang0109, chrisha, llvm-commits, kubabrecka Differential Revision: https://reviews.llvm.org/D22363 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@275488 91177308-0d34-0410-b5e6-96231b3b80d8
* [compiler-rt] Fix missing frame with stackwalking on windows 64-bitsEtienne Bergeron2016-07-141-1/+1
| | | | | | | | | | | | Summary: Fix missing frame with stackwalking on windows 64-bits Reviewers: rnk Subscribers: llvm-commits, wang0109, kubabrecka, chrisha Differential Revision: https://reviews.llvm.org/D22358 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@275486 91177308-0d34-0410-b5e6-96231b3b80d8
* Add runtime support for __cpu_model (__builtin_cpu_supports)Alina Sbirlea2016-07-143-1/+818
| | | | | | | | | | | | | | | | | | | | | Summary: This aims to add support for __cpu_model and address Bug 25510. It uses the code from lib/Support/Host.cpp for cpu detection, and creates __cpu_model with that info. Tested on OSX and built on Linux as well (though libgcc is the default). The use of "asm" required -std=gnu99, hence the cmake change. Corrections on better addressing this are welcome. Previously reverted, up for review again to iron out outstanding issues. Reviewers: llvm-commits, joerg, echristo, mehdi_amini Subscribers: mehdi_amini Differential Revision: http://reviews.llvm.org/D22181 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@275484 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace -mllvm -asan-use-after-scope=1 with -fsanitize-address-use-after-scopeVitaly Buka2016-07-1411-11/+11
| | | | | | | | | | | | | | Summary: When test was added we had no -fsanitize-address-use-after-scope in clang so we had to use -mllvm -asan-use-after-scope=1. Reviewers: eugenis Subscribers: kubabrecka Differential Revision: https://reviews.llvm.org/D22382 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@275475 91177308-0d34-0410-b5e6-96231b3b80d8
* Upgrade all the .arcconfigs to https.Benjamin Kramer2016-07-141-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@275409 91177308-0d34-0410-b5e6-96231b3b80d8
* [RT-ARM] Syntax unified for aeabi_mem* functionsRenato Golin2016-07-133-0/+3
| | | | | | | | | | | | | Use unified syntax for builtins/arm/aeabi_mem*.S. This makes these files consistent with the others. This fixes a problem on the linker, which can fail with the message "relocation truncated to fit: R_ARM_THM_JUMP11 against symbol" Patch by Kor Nielsen. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@275264 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizers] Allocate 12MB for stack instead of 134MBReid Kleckner2016-07-122-2/+4
| | | | | | | | | | The thread registry test was failing to allocate 25 threads with stack size 134MB, which is pretty reasonable. Also print the error code in our pthread wrappers in case this happens again. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@275209 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] Fix interception unittest on Windows64.Etienne Bergeron2016-07-122-0/+11
| | | | | | | | | | | | | | | mov edi,edi is _not_ NOP in 64-bit, use 66,90h instead. This bug was causing interception unittest to crash on Windows64 (windows 8 and windows 10). Credits to etienneb for finding the root cause. Patch by: Wei Wang Differential Revision: http://reviews.llvm.org/D22274 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@275207 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable the "gcd-io-race.mm" test to investigate bot hangs due to the test ↵Kuba Brecka2016-07-121-0/+2
| | | | | | being deadlocked. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@275182 91177308-0d34-0410-b5e6-96231b3b80d8
* [compiler-rt] Disable a test failing on windows.Etienne Bergeron2016-07-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The unittest is not working on windows. The "regexp.h" is not available and gtest-port won't support regexp with operator '|'. The test wasn't failing on 32-bits because of this check: ``` if (SANITIZER_WORDSIZE != 64 || ASAN_AVOID_EXPENSIVE_TESTS) return; ``` ``` [ RUN ] AddressSanitizer.HugeMallocTest C:/src/llvm/llvm/utils/unittest/googletest\src/gtest-port.cc(272): error: Failed Syntax error at index 30 in simple regular expression "is located 1 bytes to the left|AddressSanitizer failed to allocate": '|' is unsupported. C:/src/llvm/llvm/projects/compiler-rt/lib/asan/tests/asan_test.cc(308): error: Death test: Ident((char*)malloc(n_megs << 20))[-1] = 0 Result: died but not with expected error. Expected: is located 1 bytes to the left|AddressSanitizer failed to allocate ``` See gtest-port.h: ``` #elif GTEST_OS_WINDOWS // <regex.h> is not available on Windows. Use our own simple regex // implementation instead. # define GTEST_USES_SIMPLE_RE 1 ``` Reviewers: rnk Subscribers: llvm-commits, wang0109, kubabrecka, chrisha Differential Revision: http://reviews.llvm.org/D22257 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@275181 91177308-0d34-0410-b5e6-96231b3b80d8
* [compiler-rt] Enhance function padding detection for function interceptionEtienne Bergeron2016-07-121-1/+24
| | | | | | | | | | | | | | | | | Summary: Many CRT (64-bits) functions contains a "hint-nop". The current padding detection is not able to recognize the 10-bytes padding and the HotPatch hooking technique cannot be used. Other patterns may be discover and may be added later. Reviewers: rnk Subscribers: llvm-commits, wang0109, chrisha Differential Revision: http://reviews.llvm.org/D22258 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@275180 91177308-0d34-0410-b5e6-96231b3b80d8
* fix incorrect constant (from http://reviews.llvm.org/D22111)Etienne Bergeron2016-07-121-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@275136 91177308-0d34-0410-b5e6-96231b3b80d8
* missing modifications for http://reviews.llvm.org/D21952Etienne Bergeron2016-07-112-1/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@275124 91177308-0d34-0410-b5e6-96231b3b80d8
* [compiler-rt] Refactor the interception code on windows.Etienne Bergeron2016-07-113-340/+1079
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is a cleanup and refactoring of the interception code on windows Enhancement: * Adding the support for 64-bits code * Adding several hooking technique: * Detour * JumpRedirect * HotPatch * Trampoline * Adding a trampoline memory pool (64-bits) and release the allocated memory in unittests Cleanup: * Adding unittests for 64-bits hooking techniques * Enhancing the RoundUpInstruction by sharing common decoder Reviewers: rnk Subscribers: llvm-commits, wang0109, chrisha Differential Revision: http://reviews.llvm.org/D22111 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@275123 91177308-0d34-0410-b5e6-96231b3b80d8
* remove empty linesEtienne Bergeron2016-07-111-2/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@275112 91177308-0d34-0410-b5e6-96231b3b80d8
* [compiler-rt] Fix VisualStudio virtual folders layoutEtienne Bergeron2016-07-1129-47/+76
| | | | | | | | | | | | | | | | | | | | Summary: This patch is a refactoring of the way cmake 'targets' are grouped. It won't affect non-UI cmake-generators. Clang/LLVM are using a structured way to group targets which ease navigation through Visual Studio UI. The Compiler-RT projects differ from the way Clang/LLVM are grouping targets. This patch doesn't contain behavior changes. Reviewers: kubabrecka, rnk Subscribers: wang0109, llvm-commits, kubabrecka, chrisha Differential Revision: http://reviews.llvm.org/D21952 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@275111 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] Add exception handler to map memory on demand on Win64.Etienne Bergeron2016-07-116-4/+67
| | | | | | | | | | | Memory will be committed on demand when exception happens while accessing shadow memeory region. Patch by: Wei Wang Differential Revision: http://reviews.llvm.org/D21942 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@275107 91177308-0d34-0410-b5e6-96231b3b80d8
* [compiler-rt] Refactor the interception code on windows.Etienne Bergeron2016-07-111-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | [asan] Fix unittest Asan-x86_64-inline-Test crashing on Windows64 REAL(memcpy) was used in several places in Asan, while REAL(memmove) was not used. This CL chooses to patch memcpy() first, solving the crash for unittest. The crash looks like this: projects\compiler-rt\lib\asan\tests\default\Asan-x86_64-inline-Test.exe ================================================================= ==22680==ERROR: AddressSanitizer: access-violation on unknown address 0x000000000000 (pc 0x000000000000 bp 0x0029d555f590 sp 0x0029d555f438 T0) ==22680==Hint: pc points to the zero page. AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: access-violation (<unknown module>) ==22680==ABORTING Patch by: Wei Wang Differential Revision: http://reviews.llvm.org/D22232 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@275098 91177308-0d34-0410-b5e6-96231b3b80d8
* [tsan] Add support for GCD IO channels on DarwinKuba Brecka2016-07-117-9/+574
| | | | | | | | | | This patch adds interceptors for dispatch_io_*, dispatch_read and dispatch_write functions. This avoids false positives when using GCD IO. Adding several test cases. Differential Revision: http://reviews.llvm.org/D21889 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@275071 91177308-0d34-0410-b5e6-96231b3b80d8
* whitespaces + re-indentEtienne Bergeron2016-07-101-34/+34
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@275023 91177308-0d34-0410-b5e6-96231b3b80d8
* test: Use %clangxx in objc++ test filesSaleem Abdulrasool2016-07-098-9/+9
| | | | | | | | | | These test in this change are objc++, but are built using %clang, not %clangxx. The reason this works is the driver has been adding -lc++ for sanitizer enabled builds. By making these tests use %clangxx, they no longer depend on the driver linking to c++. Doing so will allow us to prevent overlinking of libc++ for applications. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@274989 91177308-0d34-0410-b5e6-96231b3b80d8
* [esan] Add __esan_report for mid-run dataDerek Bruening2016-07-0911-5/+166
| | | | | | | | | | | | | | | | | | | | | Summary: Adds a new public interface routine __esan_report() which can be used to request profiling results prior to abnormal termination (e.g., for a server process killed by its parent where the normal exit does not allow for normal result reporting). Implements this for the working-set tool. The cache frag tool is left unimplemented as it requires missing iteration capabilities. Adds a new test. Reviewers: aizatsky Subscribers: vitalybuka, zhaoqin, kcc, eugenis, llvm-commits, kubabrecka Differential Revision: http://reviews.llvm.org/D22098 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@274964 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Add runtime support for __cpu_model (__builtin_cpu_supports)"Alina Sbirlea2016-07-083-820/+1
| | | | | | This reverts commit r274873 until additional fixes are resolved. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@274944 91177308-0d34-0410-b5e6-96231b3b80d8
* Add runtime support for __cpu_model (__builtin_cpu_supports)Alina Sbirlea2016-07-083-1/+820
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This aims to add support for __cpu_model and address Bug 25510. It uses the code from lib/Support/Host.cpp for cpu detection, and creates __cpu_model with that info. Tested on OSX, it builts successfully, but the current version does *not* resolve Bug 25510. The __cpu_model symbol is present in the library but it only gets loaded with -all_load. This patch will not land until this issue is clarified. Built on Linux as well (though libgcc is the default). The use of "asm" required -std=gnu99, hence the cmake change. Corrections on better addressing this are welcome. Note: See additional comments on D20988 (committed as r271921). Reviewers: llvm-commits, joerg, echristo, mehdi_amini Subscribers: mehdi_amini Differential revision: http://reviews.llvm.org/D21033 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@274873 91177308-0d34-0410-b5e6-96231b3b80d8