summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/sanitizer_common
Commit message (Collapse)AuthorAgeFilesLines
...
* [compiler-rt] Fix warnings in interception codeEtienne Bergeron2016-07-271-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch is re-introducing the code to fix the dynamic hooking on windows and to fix a compiler warning on Apple. Related patches: * https://reviews.llvm.org/D22641 * https://reviews.llvm.org/D22610 * https://reviews.llvm.org/rL276311 * https://reviews.llvm.org/rL276490 Both architecture are using different techniques to hook on library functions (memchr, strcpy,...). On Apple, the function is not dynamically hooked and the symbol always points to a valid function (i.e. can't be null). The REAL macro returns the symbol. On windows, the function is dynamically patch and the REAL(...) function may or may not be null. It depend on whether or not the function was hooked correctly. Also, on windows memcpy and memmove are the same. ``` #if !defined(__APPLE__) [...] # define REAL(x) __interception::PTR_TO_REAL(x) # define ASSIGN_REAL(dst, src) REAL(dst) = REAL(src) [...] #else // __APPLE__ [...] # define REAL(x) x # define ASSIGN_REAL(x, y) [...] #endif // __APPLE__ Reviewers: rnk Subscribers: kcc, hans, kubabrecka, llvm-commits, bruno, chrisha Differential Revision: https://reviews.llvm.org/D22758 llvm-svn: 276885
* [asan] Remove zero FSR check on ARM.Evgeniy Stepanov2016-07-261-4/+0
| | | | | | | | | | The kernel on Nexus 5X returns error_code in ucontext which has correct FSR_WRITE flag, but empty (zero) abort type field. Removing the checks means that we will report all SEGVs as READ on very old kernels, but will properly distinguish READ vs WRITE on moderately old ones. llvm-svn: 276803
* [asan] Hardcode page size 4096 on Android.Evgeniy Stepanov2016-07-261-2/+3
| | | | | | | EXEC_PAGESIZE lies. sysconf() is broken in .preinit_array. llvm-svn: 276802
* [sanitizer] Try to fix LargeMmapAllocator test on WindowsReid Kleckner2016-07-261-2/+4
| | | | | | | | | | | | | This test attempts to allocate 100 512MB aligned pages of memory. This is implemented in the usual way by allocating size + alignment bytes and aligning the result. As a result, this test allocates 51.2GB of memory. Windows allocates swap for all memory allocated, and our bots do not have this much swap available. Avoid the failure by using a more reasonable alignment, like 16MB, as we do on 32-bit. llvm-svn: 276779
* Revert r276539 "Silence -Wpointer-bool-conversion warning after r276324"Bruno Cardoso Lopes2016-07-241-1/+1
| | | | | | | Some bots are not happy with the change. This reverts commit d307ca28083065851ad969444f3c063562f2d4bd. llvm-svn: 276541
* Silence -Wpointer-bool-conversion warning after r276324Bruno Cardoso Lopes2016-07-241-1/+1
| | | | | | | | sanitizer_common_interceptors.inc:667:12: warning: address of function 'memchr' will always evaluate to 'true' [-Wpointer-bool-conversion] if (REAL(memchr)) { ~~ ^~~~~~ llvm-svn: 276539
* [sanitizer] revert r276383 while investigating failures on botKostya Serebryany2016-07-224-40/+34
| | | | llvm-svn: 276456
* Try to fix more Windows portability issues in sanitizer testsReid Kleckner2016-07-221-2/+6
| | | | | | | | | | | | | | Add a %stdcxx11 lit substitution for -std=c++11. Windows defaults to -std=c++14 when VS 2015 is used because the STL requires it. Harcoding -std=c++11 in the ASan tests actually downgrades the C++ standard level, leading to test failures. Relax a FileCheck pattern in use-after-scope-types.cc. Disable the sanitizer_common OOM tests. They fail on bots with low swap, and cause other concurrently running tests to OOM. llvm-svn: 276454
* [sanitizer] refactor TransferBatch to hide the implementation. NFCKostya Serebryany2016-07-224-34/+40
| | | | llvm-svn: 276383
* [sanitizer] allocator: introduce kUseSeparateSizeClassForBatch (false by ↵Kostya Serebryany2016-07-223-10/+52
| | | | | | default). When true, it will cause all TransferBatches to be allocated on a separate dedicated size class, which improves security and may potentially simplify memory reclamation. However in the current state this may cause up to 3% extra memory usage. Subsequent changes should bring this overhead down llvm-svn: 276377
* [sanitizer] trying to fix Mac botsKostya Serebryany2016-07-211-0/+3
| | | | llvm-svn: 276346
* [sanitizer] better allocator stats (with rss)Kostya Serebryany2016-07-213-2/+24
| | | | llvm-svn: 276343
* [compiler-rt] Fix interception of memcpy/memmove on win64Etienne Bergeron2016-07-212-8/+6
| | | | | | | | | | | | | | Summary: This patch is fixing running interception unittests for memcpy/memmove on windows 64. Reviewers: rnk Subscribers: llvm-commits, wang0109, kubabrecka, chrisha Differential Revision: https://reviews.llvm.org/D22641 llvm-svn: 276324
* [sanitizer] allocator: remove kPopulateSize and only use ↵Kostya Serebryany2016-07-215-24/+28
| | | | | | SizeClassMap::MaxCached; ensure that TransferBatch size is a power of two, refactor TransferBatch creation/destruction into separate functions. llvm-svn: 276318
* Fix clang-cl warning and crash in sanitizersReid Kleckner2016-07-211-4/+6
| | | | | | | | | | Make kStderrFd a macro to avoid dynamic initialization of the report_file global. This actually causes a crash at runtime, because ASan initializes before static initializers run. Remove an unused variable in asan_win.cc. llvm-svn: 276314
* [compiler-rt] Fix broken SymInitialize unittestEtienne Bergeron2016-07-211-0/+2
| | | | | | | | | | | | | | | | Summary: By adding the initialisation of the symbolisation library (DbgHelp) we are swapping the order in which both warnings are produced. We can't use CHECK-NEXT as the dbghelp warning is multiline. Reviewers: rnk Subscribers: kubabrecka, llvm-commits, wang0109, chrisha Differential Revision: https://reviews.llvm.org/D22586 llvm-svn: 276228
* [sanitizers] split sanitizer_allocator.h into a number of smaller .h files; NFCKostya Serebryany2016-07-2011-1437/+1587
| | | | llvm-svn: 276195
* tsan: fix windows buildDmitry Vyukov2016-07-201-3/+3
| | | | | | It's only asan that installs vectored SEH handler to map memory lazily. llvm-svn: 276112
* tsan: fix windows buildDmitry Vyukov2016-07-201-0/+14
| | | | | | | | | | | | Currently fails as: gotsan.cc: In function 'void* __sanitizer::__libc_memalign(__sanitizer::uptr, __sanitizer::uptr)': gotsan.cc:6194:50: error: 'posix_memalign' was not declared in this scope uptr error = posix_memalign(&p, alignment, size); Windows does not provide posix_memalign. llvm-svn: 276107
* fix compiler warnings [NFC]Etienne Bergeron2016-07-191-3/+3
| | | | llvm-svn: 275984
* revert https://reviews.llvm.org/D22393Etienne Bergeron2016-07-181-2/+0
| | | | | | It is breaking build 32-bit build bots. llvm-svn: 275816
* [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] llvm-svn: 275792
* [asan] trying to fix the windows build Kostya Serebryany2016-07-151-1/+2
| | | | llvm-svn: 275644
* [sanitizers] add interceptor for memmem; add weak hooks for strncasecmp, ↵Kostya Serebryany2016-07-153-2/+55
| | | | | | strcasecmp, strstr, strcasestr, memmem llvm-svn: 275621
* TestCase null_deref was failing in Win64:Etienne Bergeron2016-07-153-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | 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 llvm-svn: 275580
* [asan] Avoid hooking memchr() on Windows64Etienne Bergeron2016-07-141-2/+1
| | | | | | | | | | | | | | | 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 llvm-svn: 275494
* [compiler-rt] Add internal wcslen to avoid crashing on windows 64-bitsEtienne Bergeron2016-07-142-0/+7
| | | | | | | | | | | | | | | | | | 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 llvm-svn: 275488
* [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 llvm-svn: 275486
* [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. llvm-svn: 275209
* [compiler-rt] Fix VisualStudio virtual folders layoutEtienne Bergeron2016-07-111-3/+3
| | | | | | | | | | | | | | | | | | | | 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 llvm-svn: 275111
* [asan] Add exception handler to map memory on demand on Win64.Etienne Bergeron2016-07-111-3/+10
| | | | | | | | | | 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 llvm-svn: 275107
* [compiler-rt] Fix minimal stack reserved for unittest on MSVC buildEtienne Bergeron2016-07-072-4/+7
| | | | | | | | | | | | | | Summary: Some unittest were not able to run in 64-bit because they need more than 2MB of stack and the default allocated stack with MSVC linker is 1MB. Reviewers: rnk Subscribers: wang0109, chrisha, llvm-commits, kubabrecka Differential Revision: http://reviews.llvm.org/D22101 llvm-svn: 274785
* [compiler-rt] Fix sanitizer memory allocator on win64.Etienne Bergeron2016-07-073-4/+13
| | | | | | | | | | | | | | | | | | | | | | | Summary: This patch is fixing unittests for sanitizer memory allocator. There was two issues: 1) The VirtualAlloc can't reserve twice a memory range. The memory space used by the SizeClass allocator is reserved with NoAccess and pages are commited on demand (using MmapFixedOrDie). 2) The address space is allocated using two VirtualAlloc calls. The first one for the memory space, the second one for the AdditionnalSpace (after). On windows, they need to be freed separately. Reviewers: rnk Subscribers: llvm-commits, wang0109, kubabrecka, chrisha Differential Revision: http://reviews.llvm.org/D21900 llvm-svn: 274772
* [compiler-rt] Fix AllocatorCacheDeallocNewThread unittestEtienne Bergeron2016-07-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The unittest was not freeing the mapped memory. ``` Repeating all tests (iteration 1) . . . Note: Google Test filter = Allocator.AllocatorCacheDeallocNewThread [==========] Running 1 test from 1 test case. [----------] Global test environment set-up. [----------] 1 test from Allocator [ RUN ] Allocator.AllocatorCacheDeallocNewThread [ OK ] Allocator.AllocatorCacheDeallocNewThread (3 ms) [----------] 1 test from Allocator (4 ms total) [----------] Global test environment tear-down [==========] 1 test from 1 test case ran. (5 ms total) [ PASSED ] 1 test. Repeating all tests (iteration 2) . . . Note: Google Test filter = Allocator.AllocatorCacheDeallocNewThread [==========] Running 1 test from 1 test case. [----------] Global test environment set-up. [----------] 1 test from Allocator [ RUN ] Allocator.AllocatorCacheDeallocNewThread ==4504==WARNING: SanitizerTool failed to mprotect 0x010000003000 (1099511640064) bytes at 0x010000000000 (error code: 48 7) ==4504==Sanitizer CHECK failed: D:/src/llvm/llvm/projects/compiler-rt/lib\sanitizer_common/sanitizer_allocator.h:329 ((kSpaceBeg)) == ((reinterpret_cast<uptr>( MmapFixedNoAccess(kSpaceBeg, TotalSpaceSize)))) (1099511627776, 0) ``` Reviewers: rnk Subscribers: llvm-commits, kubabrecka, chrisha Differential Revision: http://reviews.llvm.org/D22094 llvm-svn: 274764
* [esan|wset] Ensure SIGSEGV is not blockedDerek Bruening2016-07-062-0/+16
| | | | | | | | | | | | | | | | | | | | Summary: Adds interception of sigprocmask and pthread_sigmask to esan so that the working set tool can prevent SIGSEGV from being blocked. A blocked SIGSEGV results in crashes due to our lazy shadow page allocation scheme. Adds new sanitizer helper functions internal_sigemptyset and internal_sigismember. Adds a test to workingset-signal-posix.cpp. Reviewers: aizatsky Subscribers: vitalybuka, zhaoqin, kcc, eugenis, llvm-commits, kubabrecka Differential Revision: http://reviews.llvm.org/D22063 llvm-svn: 274672
* [sanitizer] Handle null in internal_sigaction_syscallDerek Bruening2016-07-061-0/+2
| | | | | | | | | | | | | | Summary: Adds support for nullptr as the action parameter to internal_sigaction_syscall(). Reviewers: aizatsky Subscribers: kubabrecka, vitalybuka, zhaoqin, kcc, eugenis, llvm-commits Differential Revision: http://reviews.llvm.org/D22061 llvm-svn: 274665
* [asan Win64] Implement atomic_compare_exchange_strong for 8 bitEtienne Bergeron2016-07-061-7/+9
| | | | | | | Patch by: Wei Wang Differential Revision: http://reviews.llvm.org/D21950 llvm-svn: 274634
* [compiler-rt] Re-active unittest previously broken on windows.Etienne Bergeron2016-06-301-4/+0
| | | | | | | | | | | | Summary: These tests are working fine. Reviewers: rnk Subscribers: kubabrecka, wang0109, llvm-commits, chrisha Differential Revision: http://reviews.llvm.org/D21905 llvm-svn: 274265
* [compiler-rt] Fix TLS resource leaking in unittestEtienne Bergeron2016-06-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The thread specific key wasn't not released. Running the unittest in loop will fail after 1024 iteraions. ``` ./projects/compiler-rt/lib/sanitizer_common/tests/Sanitizer-i386-Test --gtest_filter=SanitizerCommon.PthreadDestructorIterations --gtest_repeat=2000 --gtest_break_on_failure ``` ``` Repeating all tests (iteration 1023) . . . Note: Google Test filter = SanitizerCommon.PthreadDestructorIterations [==========] Running 1 test from 1 test case. [----------] Global test environment set-up. [----------] 1 test from SanitizerCommon [ RUN ] SanitizerCommon.PthreadDestructorIterations /usr/local/google/home/etienneb/llvm/llvm/projects/compiler-rt/lib/sanitizer_common/tests/sanitizer_posix_test.cc:54: Failure Value of: pthread_key_create(&key, &destructor) Actual: 11 Expected: 0 Aborted (core dumped) ``` Reviewers: rnk Subscribers: kubabrecka, llvm-commits, chrisha Differential Revision: http://reviews.llvm.org/D21902 llvm-svn: 274264
* [compiler-rt] Fix broken (flaky) unittests based on FlagParser.Etienne Bergeron2016-06-301-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The FlagParser is populating a static global class with the unrecognized flags when parsing. That global class has a dcheck that limit the number of unrecognized flag to 20. ``` class UnknownFlags { static const int kMaxUnknownFlags = 20; const char *unknown_flags_[kMaxUnknownFlags]; int n_unknown_flags_; [...] void Report() { if (!n_unknown_flags_) return; Printf("WARNING: found %d unrecognized flag(s):\n", n_unknown_flags_); for (int i = 0; i < n_unknown_flags_; ++i) Printf(" %s\n", unknown_flags_[i]); n_unknown_flags_ = 0; } }; UnknownFlags unknown_flags; ``` Unittests based on that class must reset the counter 'n_unknown_flags_' or the next usage of that class may fail arbitrary. This can be done by reporting the pending unknown flags. Reviewers: rnk Subscribers: llvm-commits, wang0109, kubabrecka, chrisha Differential Revision: http://reviews.llvm.org/D21896 llvm-svn: 274234
* [compiler-rt] Reset global variables in ThreadRegistryThreadedTestEtienne Bergeron2016-06-301-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The unittest 'ThreadRegistryThreadedTest' is failing when running in loop. There are global variables that need to be cleared. To repro: ``` projects\compiler-rt\lib\sanitizer_common\tests\Release\Sanitizer-x86_64-Test.exe --gtest_filter=SanitizerCommon.ThreadRegistryThreadedTest --gtest_repeat=2 ``` Output: ``` Repeating all tests (iteration 1) . . . Note: Google Test filter = SanitizerCommon.ThreadRegistryThreadedTest [==========] Running 1 test from 1 test case. [----------] Global test environment set-up. [----------] 1 test from SanitizerCommon [ RUN ] SanitizerCommon.ThreadRegistryThreadedTest [ OK ] SanitizerCommon.ThreadRegistryThreadedTest (1 ms) [----------] 1 test from SanitizerCommon (1 ms total) [----------] Global test environment tear-down [==========] 1 test from 1 test case ran. (2 ms total) [ PASSED ] 1 test. Repeating all tests (iteration 2) . . . Note: Google Test filter = SanitizerCommon.ThreadRegistryThreadedTest [==========] Running 1 test from 1 test case. [----------] Global test environment set-up. [----------] 1 test from SanitizerCommon [ RUN ] SanitizerCommon.ThreadRegistryThreadedTest C:/src/llvm/llvm/projects/compiler-rt/lib/sanitizer_common/tests/sanitizer_thread_registry_test.cc(216): error: Value of: num_created[0] Actual: 2 Expected: 1 C:/src/llvm/llvm/projects/compiler-rt/lib/sanitizer_common/tests/sanitizer_thread_registry_test.cc(217): error: Value of: num_started[0] Actual: 2 Expected: 1 C:/src/llvm/llvm/projects/compiler-rt/lib/sanitizer_common/tests/sanitizer_thread_registry_test.cc(220): error: Value of: num_created[i] [...] [ FAILED ] SanitizerCommon.ThreadRegistryThreadedTest (294 ms) [----------] 1 test from SanitizerCommon (294 ms total) [----------] Global test environment tear-down [==========] 1 test from 1 test case ran. (299 ms total) [ PASSED ] 0 tests. [ FAILED ] 1 test, listed below: [ FAILED ] SanitizerCommon.ThreadRegistryThreadedTest 1 FAILED TEST ``` Reviewers: rnk Subscribers: llvm-commits, wang0109, kubabrecka, chrisha Differential Revision: http://reviews.llvm.org/D21886 llvm-svn: 274231
* [compiler-rt] Fix Sanitizer-common Unittests on win64Etienne Bergeron2016-06-292-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch is fixing unittests that are broken on windows (64-bits). Tests under 'SANITIZER_CAN_USE_ALLOCATOR64' are disabled. A custom allocator for windows based on WinHeap API will replace these tests. Tested on Win32/Win64 (Ninja and MSVC). Tested on Linux 32-bit/64-bit clang. ``` C:\src\llvm\build64\projects\compiler-rt>lib\sanitizer_common\tests\Release\Sanitizer-x86_64-Test.exe [==========] Running 101 tests from 12 test cases. [----------] Global test environment set-up. [----------] 51 tests from SanitizerCommon [ RUN ] SanitizerCommon.DefaultSizeClassMap [ OK ] SanitizerCommon.DefaultSizeClassMap (1 ms) [ RUN ] SanitizerCommon.CompactSizeClassMap [ OK ] SanitizerCommon.CompactSizeClassMap (1 ms) [ RUN ] SanitizerCommon.InternalSizeClassMap [ OK ] SanitizerCommon.InternalSizeClassMap (1 ms) [ RUN ] SanitizerCommon.SizeClassAllocator32Compact [ OK ] SanitizerCommon.SizeClassAllocator32Compact (828 ms) [ RUN ] SanitizerCommon.SizeClassAllocator32CompactMetadataStress [ OK ] SanitizerCommon.SizeClassAllocator32CompactMetadataStress (914 ms) [ RUN ] SanitizerCommon.SizeClassAllocator32MapUnmapCallback [...] [----------] 4 tests from Symbolizer [ RUN ] Symbolizer.ExtractToken [ OK ] Symbolizer.ExtractToken (0 ms) [ RUN ] Symbolizer.ExtractInt [ OK ] Symbolizer.ExtractInt (0 ms) [ RUN ] Symbolizer.ExtractUptr [ OK ] Symbolizer.ExtractUptr (0 ms) [ RUN ] Symbolizer.ExtractTokenUpToDelimiter [ OK ] Symbolizer.ExtractTokenUpToDelimiter (0 ms) [----------] 4 tests from Symbolizer (24 ms total) [----------] Global test environment tear-down [==========] 101 tests from 12 test cases ran. (5090 ms total) [ PASSED ] 101 tests. ``` Reviewers: rnk Subscribers: chrisha, wang0109, llvm-commits, kubabrecka Differential Revision: http://reviews.llvm.org/D21817 llvm-svn: 274174
* [compiler-rt] Fix passing debug information to unittest.Etienne Bergeron2016-06-291-0/+4
| | | | | | | | | | | | | | | | | | | | Summary: On windows, the debug information was not present in the unittest executables, which make them hard to debug. The Sanitizer Unittests are compiled with a local clang build. The link pass is also done by calling clang. This pass is adding the appropriate flags to bring the right debug information to these executables. Reviewers: rnk Subscribers: kubabrecka, llvm-commits, wang0109, chrisha Differential Revision: http://reviews.llvm.org/D21838 llvm-svn: 274153
* [msan] Fix handling of padding in sendmsg control data.Evgeniy Stepanov2016-06-281-1/+29
| | | | llvm-svn: 274074
* Adding a comment to explain r273886 ("Stop unwinding the stack when a ↵Kuba Brecka2016-06-282-0/+6
| | | | | | close-to-zero PC is found"). NFC. llvm-svn: 274010
* [sanitizer] Stop unwinding the stack when a close-to-zero PC is foundKuba Brecka2016-06-275-8/+25
| | | | | | | | On OS X, we often get stack trace in a report that ends with a 0x0 frame. To get rid of it, let's trim the stack trace when we find a close-to-zero value, which is obviously not a valid PC. Differential Revision: http://reviews.llvm.org/D14656 llvm-svn: 273886
* [msan] Intercept eventfd_read, eventfd_write.Evgeniy Stepanov2016-06-242-0/+31
| | | | llvm-svn: 273748
* [sanitizer] Add syscall handlers for sigaction and rt_sigaction.Evgeniy Stepanov2016-06-241-0/+34
| | | | llvm-svn: 273746
* [msan] Fix syscall handlers for pipe, pipe2, socketpair.Evgeniy Stepanov2016-06-241-12/+8
| | | | | | These syscalls write two file descriptors into the output buffer, not one. llvm-svn: 273728
* Use CreateFileA and add a FIXME to switch to the wide variantReid Kleckner2016-06-231-5/+6
| | | | | | | No functional change. Required to build with -DUNICODE, as is done in http://reviews.llvm.org/D21643 llvm-svn: 273571
OpenPOWER on IntegriCloud