summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib
Commit message (Collapse)AuthorAgeFilesLines
* tsan: support mmap(MAP_32BIT)Dmitry Vyukov2014-10-248-198/+291
| | | | | | | | | Allow user memory in the first TB of address space. This also enabled non-pie binaries and freebsd. Fixes issue: https://code.google.com/p/thread-sanitizer/issues/detail?id=5 llvm-svn: 220571
* [Tsan] Do not intercept non-FreeBSD functions on FreeBSDViktor Kutuzov2014-10-241-25/+167
| | | | | | Differential Revision: http://reviews.llvm.org/D5858 llvm-svn: 220554
* [Tsan] Intercept pthread_set_name_np on FreeBSDViktor Kutuzov2014-10-242-1/+6
| | | | | | Differential Revision: http://reviews.llvm.org/D5932 llvm-svn: 220551
* [sanitizer] Add a bunch of sanity checks.Evgeniy Stepanov2014-10-231-1/+4
| | | | llvm-svn: 220528
* Appeasing an MSVC compile warning about "and"; NFC.Aaron Ballman2014-10-231-1/+1
| | | | llvm-svn: 220519
* [tsan] add a stub of another dynamic annotationKostya Serebryany2014-10-221-0/+2
| | | | llvm-svn: 220369
* [msan] Handle param-tls overflow.Evgeniy Stepanov2014-10-222-6/+7
| | | | | | | | ParamTLS (shadow for function arguments) is of limited size. This change makes all arguments that do not fit unpoisoned, and avoids writing past the end of a TLS buffer. llvm-svn: 220351
* [sanitizer] Fix build with _FILE_OFFSET_BITS=64.Evgeniy Stepanov2014-10-211-0/+8
| | | | | | | Sanitizer source is not affected by _FILE_OFFSET_BITS in general, but this one file must be built with 32-bit off_t. More details in the code. llvm-svn: 220328
* [Tsan] Add FreeBSD support to longjmp-related definitionsViktor Kutuzov2014-10-212-1/+25
| | | | | | Differential Revision: http://reviews.llvm.org/D5857 llvm-svn: 220292
* [Tsan] Fix sigaction_t to match system definition on FreeBSDViktor Kutuzov2014-10-211-0/+5
| | | | | | Differential Revision: http://reviews.llvm.org/D5856 llvm-svn: 220291
* Remove unused local variableAlexey Samsonov2014-10-201-5/+2
| | | | llvm-svn: 220247
* Fix checks for Android.Dan Albert2014-10-204-11/+11
| | | | | | | | | | | | __ANDROID__ is a define that comes from the toolchain when building for Android targets. ANDROID has a different meaning. ANDROID is defined for _every_ Android build, including those done for host modules. For host modules, we want to build the regular Linux sanitizers and builtins, not the one for Android devices. This hasn't been a problem until now because we only just started building the sanitizers for the host. llvm-svn: 220203
* [asan] the run-time part of intra-object-overflow detector ↵Kostya Serebryany2014-10-174-0/+44
| | | | | | (-fsanitize-address-field-padding=1). Note that all of this is still experimental; don't use unless you are brave. llvm-svn: 220013
* [asan] make sure coverage is dumped even if leaks are reportedKostya Serebryany2014-10-161-1/+4
| | | | llvm-svn: 219946
* [compiler-rt] compiler-rt's CMake append_if function clashes with LLVM's, ↵Kuba Brecka2014-10-159-33/+33
| | | | | | | | | | let's rename it to append_list_if Doing s/append_if/append_list_if/, no functional change. http://reviews.llvm.org/D5739 llvm-svn: 219860
* [compiler-rt] Enable ASAN for powerpc64le-linuxWill Schmidt2014-10-154-4/+12
| | | | | | | | | | | | | | | | | | Whitespace update for lint check by myself (Will). Otherwise code and comments by Peter Bergner, as previously seen on llvm-commits. The following patch gets ASAN somewhat working on powerpc64le-linux. It currently assumes the LE kernel uses 46-bit addressing, which is true, but it doesn't solve the case for BE where it may be 44 or 46 bits. That can be fixed with a follow on patch. There are some test suite fails even with this patch that I haven't had time to solve yet, but this is better than the state it is in now. The limited debugging of those test suite fails seems to show that the address map for 46-bit addressing has changed and so we'll need to modify the shadow memory location slightly. Again, that can be fixed with a follow on patch. llvm-svn: 219827
* tsan: fix false positive related to signalsDmitry Vyukov2014-10-153-10/+13
| | | | | | | Write interceptor calls malloc, which causes a false unsafe-call-in-signal-handler report. See the test. llvm-svn: 219784
* tsan: use a different dir for llvm buildDmitry Vyukov2014-10-151-4/+4
| | | | | | build is used as gtest temp build dir, and is cleared during every build llvm-svn: 219783
* tsan: remove dead codeDmitry Vyukov2014-10-151-60/+0
| | | | llvm-svn: 219779
* Fix compiler-rt build on FreeBSD 10.1Ed Maste2014-10-141-3/+7
| | | | | | | | | | | | | | | We have to #define _WANT_RTENTRY to get struct rtentry, and add headers that it depends on. SIOCADDRT and SIOCDELRT also do not exist in FreeBSD 10.1 and were removed in FreeBSD rev. 263203: Garbage collect long time obsoleted (or never used) stuff from routing API. Differential Revision: http://reviews.llvm.org/D5703 llvm-svn: 219722
* Add complex multiply/divide functions to arm64 iOS libclang_rt libraries.Bob Wilson2014-10-141-13/+0
| | | | | | | | Clang r219557 introduces libcalls to complex multiply/divide functions. Since these functions are not available in iOS for arm64 devices, add them to the static libraries. llvm-svn: 219715
* [sanitizer] Fix a crash in FP unwinder on ARM.Evgeniy Stepanov2014-10-142-11/+47
| | | | | | | | | | | | | This change fixes 2 issues in the fast unwinder from r217079: * A crash if a frame pointer points below current stack head, but inside the current thread stack limits. That memory may be unmapped. A check for this was lost in r217079. * The last valid stack frame (the first one with an invalid next frame pointer) is always interpreted as a GCC layout frame. This results in garbled last PC in the (expected) case when the last frame has LLVM layout. llvm-svn: 219683
* Fix silly commit to disable test on ARMRenato Golin2014-10-141-1/+1
| | | | llvm-svn: 219681
* Disable failing ASAN LongJump test on ARMRenato Golin2014-10-141-3/+3
| | | | | | | Updated the URL to reflect information on the problem as well as build the case for ARM. This seems to be a wider problem, not ARM or PPC specific. llvm-svn: 219680
* tsan: remove trailing whitespaceDmitry Vyukov2014-10-141-1/+1
| | | | llvm-svn: 219678
* [asan] Add fast_unwind_on_check flag.Evgeniy Stepanov2014-10-144-1/+15
| | | | | | | | | Allows to specify the unwinder to use for CHECK failures. Previous behaviour was to use the "fatal" unwinder. As compiler-rt is built without frame pointers, only the slow unwinder really makes sense here, and it is the default. llvm-svn: 219677
* tsan: refactor atexit handlingDmitry Vyukov2014-10-141-36/+53
| | | | | | | | | | The current handling (manual execution of atexit callbacks) is overly complex and leads to constant problems due to mutual ordering of callbacks. Instead simply wrap callbacks into our wrapper to establish the necessary synchronization. Fixes issue https://code.google.com/p/thread-sanitizer/issues/detail?id=80 llvm-svn: 219675
* Sanitize upcasts and conversion to virtual base.Alexey Samsonov2014-10-131-3/+3
| | | | | | | | | | | This change adds UBSan check to upcasts. Namely, when we perform derived-to-base conversion, we: 1) check that the pointer-to-derived has suitable alignment and underlying storage, if this pointer is non-null. 2) if vptr-sanitizer is enabled, and we perform conversion to virtual base, we check that pointer-to-derived has a matching vptr. llvm-svn: 219642
* tsan: better reporting for virtual-call-after-freeDmitry Vyukov2014-10-134-1/+8
| | | | | | | Previously we said that it's a data race, which is confusing if it happens in the same thread. llvm-svn: 219600
* [Tsan] Do not use INTERCEPT_FUNCTION_VER() on FreeBSDViktor Kutuzov2014-10-101-1/+5
| | | | | | Differential Revision: http://reviews.llvm.org/D5708 llvm-svn: 219483
* [Sanitizers] Intercept dlopen() and dlclose() on FreeBSDViktor Kutuzov2014-10-091-1/+2
| | | | | | Differential Revision: http://reviews.llvm.org/D5664 llvm-svn: 219396
* [Tsan] Fix references to libc entities in tsan_interceptors.cc on FreeBSDViktor Kutuzov2014-10-091-0/+14
| | | | | | Differential Revision: http://reviews.llvm.org/D5663 llvm-svn: 219395
* Remove bashisms and switch to /bin/shEd Maste2014-10-081-16/+16
| | | | | | | | | On a default FreeBSD install Bash is not installed and fdescfs is not mounted. Use plain sh functionality instead. Differential Revision: http://reviews.llvm.org/D5631 llvm-svn: 219333
* AArch64: add support for ARM64 iOS versions of compiler-rt.Tim Northover2014-10-084-1/+37
| | | | | | | | Just a dummy directory and a few sane choices in the Darwin SDK. rdar://problem/18575597 llvm-svn: 219323
* Custom wrappers for DFSanitizing sprintf & snprintf.Lorenzo Martignoni2014-10-084-4/+287
| | | | | | Differential Revision: http://reviews.llvm.org/D5561 llvm-svn: 219293
* Avoid bashisms and switch to /bin/shEd Maste2014-10-071-14/+23
| | | | | | | | Bash may not be installed on some systems by default, like FreeBSD. Differential Revision: http://reviews.llvm.org/D5654 llvm-svn: 219231
* builtins: add missed change from previous commitSaleem Abdulrasool2014-10-071-1/+1
| | | | | | | The macro rework was missing a trailing SEPARATOR for the .thumb_func, resulting in assembly failures. llvm-svn: 219183
* builtins: rework use of DEFINE_COMPILERRT_THUMB_FUNCTIONSaleem Abdulrasool2014-10-0711-8/+44
| | | | | | | | | | | | | | | This is simply to help clarity of the code. The functions are built as thumb only if Thumb2 is available (__ARM_ARCH_ISA_THUMB == 2). Sink the selection into the location of the definition and make DEFINE_COMPILERRT_THUMB_FUNCTION always define a thumb function while DEFINE_COMPILERRT_FUNCTION always selects the default. Since the .thumb_func directive is always available (at least on Linux, Windows, and BSD), sinking the macro right into the macro works just as well. No functional change intended. llvm-svn: 219182
* [asan] Minor tweak to asan_device_setup.Evgeniy Stepanov2014-10-061-1/+2
| | | | | | | Add another wait-for-device which may fix a flaky setup error. Fix output message. llvm-svn: 219117
* Try harder to fix ARM/Linux after r219040.Bob Wilson2014-10-041-1/+6
| | | | llvm-svn: 219066
* Attempt to fix ARM/Linux after r219040.Bob Wilson2014-10-041-1/+1
| | | | llvm-svn: 219064
* Fix the armv7 thumb builtins on darwinSteven Wu2014-10-0412-12/+24
| | | | | | | | | | The arm builtins converted into thumb in r213481 are not working on darwin. On apple platforms, .thumb_func directive is required to generated correct symbols for thumb functions. <rdar://problem/18523605> llvm-svn: 219040
* tsan: output stats about stackdepot in memory profilerDmitry Vyukov2014-10-031-1/+4
| | | | | | | | | | | quite amusing on some programs: RSS 9152 MB: shadow:2456 meta:1736 file:454 mmap:3442 trace:196 heap:866 other:0 stacks=176[1065994] nthr=157/159 ... RSS 30192 MB: shadow:613 meta:5550 file:1839 mmap:20487 trace:212 heap:1489 other:0 stacks=12870[1599445] nthr=162/165 ... RSS 42232 MB: shadow:599 meta:8199 file:2304 mmap:29420 trace:213 heap:1494 other:0 stacks=17794[1690645] nthr=162/165 llvm-svn: 218988
* [asan] Support Android/x86 in asan_device_setup.Evgeniy Stepanov2014-10-031-13/+28
| | | | llvm-svn: 218968
* [ASan] Don't use large stack buffer for local variable name in stack frame ↵Alexey Samsonov2014-10-011-17/+17
| | | | | | description llvm-svn: 218827
* [ASan] Make stack-buffer-overflow reports more robustAlexey Samsonov2014-10-014-46/+54
| | | | | | | | | | | | | | | | | | | | Summary: Fix the function that gets stack frame description by address in thread stack, so that it clearly indicates failures. Make this error non-fatal, and print as much information as we can in this case. Make all errors in ParseFrameDescription non-fatal. Test Plan: check-asan testsuite Reviewers: kcc Reviewed By: kcc Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D5554 llvm-svn: 218819
* [sanitizer] Add i686 arch to compiler-rt.Evgeniy Stepanov2014-10-013-3/+6
| | | | | | | | | | This is needed so we can produce -i686- named libraries for x86 Android (which is i686-linux-android). An alternative solution would be keeping the "i386" name internally and tweaking the OUTPUT_NAME of compiler-rt libraries. llvm-svn: 218761
* [asan] add a test for array cookie if the operator new is defined inside the ↵Kostya Serebryany2014-09-291-1/+2
| | | | | | class (the cookie should not be poisoned in such case); update the related comment in asan_poisoning.cc llvm-svn: 218620
* [sanitizer] Android build cleanup.Evgeniy Stepanov2014-09-298-86/+68
| | | | | | | | | | | | * Detect Android toolchain target arch and set correct runtime library name. * Merged a lot of Android and non-Android code paths. * Android is only supported in standalone build of compiler-rt now. * Linking lsan-common in ASan-Android (makes lsan annotations work). * Relying on -fsanitize=address linker flag when building tests (again, unification with non-Android path). * Runtime library moved from lib/asan to lib/linux. llvm-svn: 218605
* [compiler-rt] Do not use ldrexd or strexd on v7MOliver Stannard2014-09-2910-0/+20
| | | | | | | | | | | | | | | | The ldrexd and strexd instructions are undefined for the ARMv7M architecture, so we cannot use them to implement the __sync_fetch_and_*_8 builtins. There is no other way to implement these without OS support, so this patch #ifdef's these functions out for M-class architectures. There are no tests as I cannot find any existing tests for these builtins. I used the __ARM_ARCH_PROFILE predefine because __ARM_FEATURE_LDREX is deprecated and not set by clang. llvm-svn: 218601
OpenPOWER on IntegriCloud