Skip to content
This repository has been archived by the owner on May 21, 2019. It is now read-only.

Rebase Rust changes on LLVM head #15

Closed
wants to merge 68 commits into from
Closed

Rebase Rust changes on LLVM head #15

wants to merge 68 commits into from

Commits on Oct 23, 2015

  1. Fixup test/ubsan/TestCases/Misc/coverage-levels.cc, LLVM is smarter

    Fixing up this test case because LLVM is smarter now, and can better analyze:
    
      if ((argc << shift) == 16)
    
    in this test case.
    
    git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@251147 91177308-0d34-0410-b5e6-96231b3b80d8
    Hal Finkel committed Oct 23, 2015
    Configuration menu
    Copy the full SHA
    fb8112c View commit details
    Browse the repository at this point in the history

Commits on Oct 26, 2015

  1. [compiler-rt] Enable ptrace sanitizer for arm

    This patch enables the ptrace syscall interceptors for arm and adds support
    for both PTRACE_GETVFPREGS and PTRACE_SETVFPREGS used to get the VFP register
    from ARM.
    
    The ptrace tests is also updated with arm and PTRACE_GETVFPREGS tests.
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@251321 91177308-0d34-0410-b5e6-96231b3b80d8
    zatrazz committed Oct 26, 2015
    Configuration menu
    Copy the full SHA
    d1165cd View commit details
    Browse the repository at this point in the history
  2. [compiler-rt] Fix ptrace interceptor for aarch64

    This patch fixes the ptrace interceptor for aarch64. The PTRACE_GETREGSET
    ptrace syscall with with invalid memory might zero the iovec::iov_base
    field and then masking the subsequent check after the syscall (since it
    will be 0 and it will not trigger an invalid access). The fix is to copy
    the value on a local variable and use its value on the checks.
    
    The patch also adds more coverage on the Linux/ptrace.cc testcase by addding
    check for PTRACE_GETREGSET for both general and floating registers (aarch64
    definitions added only).
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@251331 91177308-0d34-0410-b5e6-96231b3b80d8
    zatrazz committed Oct 26, 2015
    Configuration menu
    Copy the full SHA
    80f1d25 View commit details
    Browse the repository at this point in the history
  3. [msan] Fix process_vm_readv test.

    The check for the glibc version was not working as expected (dlsym
    was finding the interceptor instead of the libc implementation).
    
    git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@251345 91177308-0d34-0410-b5e6-96231b3b80d8
    eugenis committed Oct 26, 2015
    Configuration menu
    Copy the full SHA
    303dfb2 View commit details
    Browse the repository at this point in the history
  4. asan_symbolize.py: Call llvm-symbolizer with --functions=linkage inst…

    …ead of --functions=short.
    
    git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@251356 91177308-0d34-0410-b5e6-96231b3b80d8
    vonosmas committed Oct 26, 2015
    Configuration menu
    Copy the full SHA
    be4b740 View commit details
    Browse the repository at this point in the history
  5. [asan] Don't use asanwrapper in 64-bit android tests.

    Asanwrapper is required on older android versions to work around undesired
    linker behavior. It is not required on L and newer, and does not fully
    support multiarch devices.
    
    git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@251359 91177308-0d34-0410-b5e6-96231b3b80d8
    eugenis committed Oct 26, 2015
    Configuration menu
    Copy the full SHA
    1e49033 View commit details
    Browse the repository at this point in the history
  6. [asan] Switch back to BFD linker in asan/android tests.

    We've switched to Gold earlier because of a minor misconfiguration
    of the BFD linker in Android NDK. It turns out, Gold has much bigger
    problems:
    
    https://sourceware.org/bugzilla/show_bug.cgi?id=19163
    (a bug is actually in the android runtime loader, but it means that
    gold does not work with android L and even M).
    
    Switching back to BFD and adding a workaround by explicitly linking
    libm to all tests.
    
    git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@251360 91177308-0d34-0410-b5e6-96231b3b80d8
    eugenis committed Oct 26, 2015
    Configuration menu
    Copy the full SHA
    cfdab24 View commit details
    Browse the repository at this point in the history
  7. [asan] Fix throw-call-test to properly XFAIL on android/aarch64.

    The test is sensitive to stack layout changes. Tweak it a bit to
    expose the bug on aarch64 as well as on arm.
    
    git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@251361 91177308-0d34-0410-b5e6-96231b3b80d8
    eugenis committed Oct 26, 2015
    Configuration menu
    Copy the full SHA
    0aea262 View commit details
    Browse the repository at this point in the history
  8. [asan] Mark 5 tests unsupported on Android.

    git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@251362 91177308-0d34-0410-b5e6-96231b3b80d8
    eugenis committed Oct 26, 2015
    Configuration menu
    Copy the full SHA
    db03c08 View commit details
    Browse the repository at this point in the history

Commits on Oct 27, 2015

  1. Configuration menu
    Copy the full SHA
    9a9266f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3b26b21 View commit details
    Browse the repository at this point in the history
  3. [asan] On OS X, tag mapped regions with VM_MEMORY_ANALYSIS_TOOL tag

    This will tag all mmapped memory sanitizers use with "Performance tool data"
    when viewed in vmmap. (Even though sanitizers are not performance tools, it's
    the best available match and better than having the unidentified objects.)
    
    http://reviews.llvm.org/D13609
    
    git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@251445 91177308-0d34-0410-b5e6-96231b3b80d8
    AnnaZaks committed Oct 27, 2015
    Configuration menu
    Copy the full SHA
    fcec98e View commit details
    Browse the repository at this point in the history
  4. [asan] Sort headers.

    git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@251446 91177308-0d34-0410-b5e6-96231b3b80d8
    AnnaZaks committed Oct 27, 2015
    Configuration menu
    Copy the full SHA
    6f70a3c View commit details
    Browse the repository at this point in the history
  5. [asan] On OS X, log reports to syslog and os_trace

    When ASan currently detects a bug, by default it will only print out the text
    of the report to stderr. This patch changes this behavior and writes the full
    text of the report to syslog before we terminate the process. It also calls
    os_trace (Activity Tracing available on OS X and iOS) with a message saying
    that the report is available in syslog. This is useful, because this message
    will be shown in the crash log.
    
    For this to work, the patch makes sure we store the full report into
    error_message_buffer unconditionally, and it also strips out ANSI escape
    sequences from the report (they are used when producing colored reports).
    
    I've initially tried to log to syslog during printing, which is done on Android
    right now. The advantage is that if we crash during error reporting or the
    produced error does not go through ScopedInErrorReport, we would still get a
    (partial) message in the syslog. However, that solution is very problematic on
    OS X. One issue is that the logging routine uses GCD, which may spawn a new
    thread on its behalf. In many cases, the reporting logic locks threadRegistry,
    which leads to deadlocks.
    
    Reviewed at http://reviews.llvm.org/D13452
    
    git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@251447 91177308-0d34-0410-b5e6-96231b3b80d8
    AnnaZaks committed Oct 27, 2015
    Configuration menu
    Copy the full SHA
    72f38c1 View commit details
    Browse the repository at this point in the history
  6. [mips][asan] XFAIL ptrace.cc

    It was recently enabled for non-x86 targets and doesn't seem to work for MIPS.
    The reason is currently unclear so XFAILing while I investigate.
    
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@251466 91177308-0d34-0410-b5e6-96231b3b80d8
    dsandersllvm committed Oct 27, 2015
    Configuration menu
    Copy the full SHA
    daaaf7a View commit details
    Browse the repository at this point in the history
  7. Revert "[asan] On OS X, log reports to syslog and os_trace"

    This reverts commit 251447.
    
    (Which caused failures on a Linux bot.)
    
    git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@251467 91177308-0d34-0410-b5e6-96231b3b80d8
    AnnaZaks committed Oct 27, 2015
    Configuration menu
    Copy the full SHA
    29e4171 View commit details
    Browse the repository at this point in the history

Commits on Oct 28, 2015

  1. sanitizer_common: be more verbose, when symbolizer is not found.

    Summary:
    I have othen been stuck when I got an ASAN report, but no symbols
    are resolved. The reasons might be different, and it always 
    requires a bit of detective work to track down.
    
    These more verbose error messages will help the users like me.
    
    Reviewers: samsonov
    
    Subscribers: llvm-commits
    
    Differential Revision: http://reviews.llvm.org/D14135
    
    git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@251553 91177308-0d34-0410-b5e6-96231b3b80d8
    Ivan Krasin committed Oct 28, 2015
    Configuration menu
    Copy the full SHA
    1a2a5a8 View commit details
    Browse the repository at this point in the history
  2. [asan] Disable a flaky test on Android.

    Bug: google/sanitizers#618
    
    git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@251554 91177308-0d34-0410-b5e6-96231b3b80d8
    eugenis committed Oct 28, 2015
    Configuration menu
    Copy the full SHA
    700dda1 View commit details
    Browse the repository at this point in the history
  3. [asan] Fix asan_device_setup script on KitKat.

    app_process32, when started via a shell script wrapper, needs a
    different security context to satisty SELinux.
    
    Patch by Abhishek Arya.
    
    git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@251572 91177308-0d34-0410-b5e6-96231b3b80d8
    eugenis committed Oct 28, 2015
    Configuration menu
    Copy the full SHA
    bd58cbc View commit details
    Browse the repository at this point in the history
  4. Reapply: [asan] On OS X, log reports to syslog and os_trace

            When ASan currently detects a bug, by default it will only print out the text
            of the report to stderr. This patch changes this behavior and writes the full
            text of the report to syslog before we terminate the process. It also calls
            os_trace (Activity Tracing available on OS X and iOS) with a message saying
            that the report is available in syslog. This is useful, because this message
            will be shown in the crash log.
    
            For this to work, the patch makes sure we store the full report into
            error_message_buffer unconditionally, and it also strips out ANSI escape
            sequences from the report (they are used when producing colored reports).
    
            I've initially tried to log to syslog during printing, which is done on Android
            right now. The advantage is that if we crash during error reporting or the
            produced error does not go through ScopedInErrorReport, we would still get a
            (partial) message in the syslog. However, that solution is very problematic on
            OS X. One issue is that the logging routine uses GCD, which may spawn a new
            thread on its behalf. In many cases, the reporting logic locks threadRegistry,
            which leads to deadlocks.
    
            Reviewed at http://reviews.llvm.org/D13452
    
            (In addition, add sanitizer_common_libcdep.cc to buildgo.sh to avoid
             build failures on Linux.)
    
    git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@251577 91177308-0d34-0410-b5e6-96231b3b80d8
    AnnaZaks committed Oct 28, 2015
    Configuration menu
    Copy the full SHA
    a1eec3a View commit details
    Browse the repository at this point in the history

Commits on Oct 29, 2015

  1. [compiler-rt] [msan] Unify aarch64 mapping

    This patch unify the 39-bit and 42-bit mapping for aarch64 to use only
    one instrumentation algorithm.  A runtime check avoid mapping 42-bit 
    only segments for 39-bit kernels.
    
    The mapping to use now is for 39 and 42-bits:
    
        0x00000000000ULL-0x01000000000ULL  MappingDesc::INVALID
        0x01000000000ULL-0x02000000000ULL  MappingDesc::SHADOW
        0x02000000000ULL-0x03000000000ULL  MappingDesc::ORIGIN
        0x03000000000ULL-0x04000000000ULL  MappingDesc::SHADOW
        0x04000000000ULL-0x05000000000ULL  MappingDesc::ORIGIN
        0x05000000000ULL-0x06000000000ULL  MappingDesc::APP
        0x06000000000ULL-0x07000000000ULL  MappingDesc::INVALID
        0x07000000000ULL-0x08000000000ULL  MappingDesc::APP
    
    And only for 42-bits:
    
        0x08000000000ULL-0x09000000000ULL  MappingDesc::INVALID
        0x09000000000ULL-0x0A000000000ULL  MappingDesc::SHADOW
        0x0A000000000ULL-0x0B000000000ULL  MappingDesc::ORIGIN
        0x0B000000000ULL-0x0F000000000ULL  MappingDesc::INVALID
        0x0F000000000ULL-0x10000000000ULL  MappingDesc::APP
        0x10000000000ULL-0x11000000000ULL  MappingDesc::INVALID
        0x11000000000ULL-0x12000000000ULL  MappingDesc::APP
        0x12000000000ULL-0x17000000000ULL  MappingDesc::INVALID
        0x17000000000ULL-0x18000000000ULL  MappingDesc::SHADOW
        0x18000000000ULL-0x19000000000ULL  MappingDesc::ORIGIN
        0x19000000000ULL-0x20000000000ULL  MappingDesc::INVALID
        0x20000000000ULL-0x21000000000ULL  MappingDesc::APP
        0x21000000000ULL-0x26000000000ULL  MappingDesc::INVALID
        0x26000000000ULL-0x27000000000ULL  MappingDesc::SHADOW
        0x27000000000ULL-0x28000000000ULL  MappingDesc::ORIGIN
        0x28000000000ULL-0x29000000000ULL  MappingDesc::SHADOW
        0x29000000000ULL-0x2A000000000ULL  MappingDesc::ORIGIN
        0x2A000000000ULL-0x2B000000000ULL  MappingDesc::APP
        0x2B000000000ULL-0x2C000000000ULL  MappingDesc::INVALID
        0x2C000000000ULL-0x2D000000000ULL  MappingDesc::SHADOW
        0x2D000000000ULL-0x2E000000000ULL  MappingDesc::ORIGIN
        0x2E000000000ULL-0x2F000000000ULL  MappingDesc::APP
        0x2F000000000ULL-0x39000000000ULL  MappingDesc::INVALID
        0x39000000000ULL-0x3A000000000ULL  MappingDesc::SHADOW
        0x3A000000000ULL-0x3B000000000ULL  MappingDesc::ORIGIN
        0x3B000000000ULL-0x3C000000000ULL  MappingDesc::APP
        0x3C000000000ULL-0x3D000000000ULL  MappingDesc::INVALID
        0x3D000000000ULL-0x3E000000000ULL  MappingDesc::SHADOW
        0x3E000000000ULL-0x3F000000000ULL  MappingDesc::ORIGIN
        0x3F000000000ULL-0x40000000000ULL  MappingDesc::APP
    
    And although complex it provides a better memory utilization that
    previous one.
    
    [1] http://reviews.llvm.org/D13817
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@251625 91177308-0d34-0410-b5e6-96231b3b80d8
    zatrazz committed Oct 29, 2015
    Configuration menu
    Copy the full SHA
    5b3b8a0 View commit details
    Browse the repository at this point in the history
  2. Sanitizer: define WIN32_LEAN_AND_MEAN

    Define WIN32_LEAN_AND_MEAN before including Windows.h.  This is already being
    done in some places.  This does it more broadly.  This permits building ASAN on
    Linux for Winndows, as well as reduces the amount of included declarations.
    
    git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@251649 91177308-0d34-0410-b5e6-96231b3b80d8
    compnerd committed Oct 29, 2015
    Configuration menu
    Copy the full SHA
    8f11ffe View commit details
    Browse the repository at this point in the history

Commits on Oct 30, 2015

  1. Revert "Apply modernize-use-default to compiler-rt."

    This reverts commit r250823.
    
    Replacing at least some of empty
    constructors with "= default" variants is a semantical change which we
    don't want. E.g. __tsan::ClockBlock contains a union of large arrays,
    and it's critical for correctness and performance that we don't memset()
    these arrays in the constructor.
    
    git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@251717 91177308-0d34-0410-b5e6-96231b3b80d8
    vonosmas committed Oct 30, 2015
    Configuration menu
    Copy the full SHA
    6f7eaaa View commit details
    Browse the repository at this point in the history

Commits on Nov 3, 2015

  1. [tsan] CMake support for TSan on OS X

    Hi, this patch adds a CMake flag called `COMPILER_RT_ENABLE_TSAN_OSX`, which is off by default. If enabled, the build system will be building the OS X version of the TSan runtime library (called `libclang_rt.tsan_osx_dynamic.dylib`). I'll submit patches that fix OS X build errors shortly.
    
    This is part of an effort to port TSan to OS X, and it's one the very first steps. Don't expect TSan on OS X to actually work or pass tests at this point.
    
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@251915 91177308-0d34-0410-b5e6-96231b3b80d8
    kubamracek committed Nov 3, 2015
    Configuration menu
    Copy the full SHA
    fe1142e View commit details
    Browse the repository at this point in the history
  2. [tsan] Port TSan interceptors on OS X

    This patch modifies `tsan_interceptors.cc` to be buildable on OS X. Several of the intercepted methods are not available on OS X, so we need to `#if !SANITIZER_MAC` them. Plus a few other fixes, e.g. `pthread_yield` doesn't exist, let's use `internal_sched_yield` instead.
    
    This is part of an effort to port TSan to OS X, and it's one the very first steps. Don't expect TSan on OS X to actually work or pass tests at this point.
    
    Differential Revision: http://reviews.llvm.org/D14237
    
    
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@251916 91177308-0d34-0410-b5e6-96231b3b80d8
    kubamracek committed Nov 3, 2015
    Configuration menu
    Copy the full SHA
    28992d9 View commit details
    Browse the repository at this point in the history
  3. [tsan] Fix build errors for TSan on OS X

    This patch moves a few functions from `sanitizer_linux_libcdep.cc` to `sanitizer_posix_libcdep.cc` in order to use them on OS X as well. Plus a few more small build fixes.
    
    This is part of an effort to port TSan to OS X, and it's one the very first steps. Don't expect TSan on OS X to actually work or pass tests at this point.
    
    Differential Revision: http://reviews.llvm.org/D14235
    
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@251918 91177308-0d34-0410-b5e6-96231b3b80d8
    kubamracek committed Nov 3, 2015
    Configuration menu
    Copy the full SHA
    1d675fa View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4d918b6 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    befa80c View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    e2b976a View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    657bd0e View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    1d301e4 View commit details
    Browse the repository at this point in the history
  9. Support for 32-bit mingw-w64 in compiler-rt.

    Add chkstk/alloca for gcc objects.
    Replace or instructions with test, the latter should be marginally more
    efficent, as it does not write to memory.
    
    Differential Revision: http://reviews.llvm.org/D14044
    
    Patch by vadimcn
    
    git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@251928 91177308-0d34-0410-b5e6-96231b3b80d8
    martell committed Nov 3, 2015
    Configuration menu
    Copy the full SHA
    4356fa3 View commit details
    Browse the repository at this point in the history
  10. Fix r251928 build error

    git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@251931 91177308-0d34-0410-b5e6-96231b3b80d8
    martell committed Nov 3, 2015
    Configuration menu
    Copy the full SHA
    6754ab2 View commit details
    Browse the repository at this point in the history
  11. [tsan] Allow memchr interceptor to be used before initialization on OS X

    On OS X, `memchr` is called on a newly created thread even before `__tsan_thread_start_func` is invoked, which means that the ThreadState object for that thread will not yet be initialized. Let's add `COMMON_INTERCEPTOR_NOTHING_IS_INITIALIZED` into the interceptor to simply call `internal_memchr` in these cases.
    
    Differential Revision: http://reviews.llvm.org/D14283
    
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@251935 91177308-0d34-0410-b5e6-96231b3b80d8
    kubamracek committed Nov 3, 2015
    Configuration menu
    Copy the full SHA
    7f1c97c View commit details
    Browse the repository at this point in the history

Commits on Nov 4, 2015

  1. [tsan] Shadow memory setup for OS X

    Updating the shadow memory initialization in `tsan_platform_mac.cc` to also initialize the meta shadow and to mprotect the memory ranges that need to be avoided.
    
    Differential Revision: http://reviews.llvm.org/D14324
    
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@252044 91177308-0d34-0410-b5e6-96231b3b80d8
    kubamracek committed Nov 4, 2015
    Configuration menu
    Copy the full SHA
    d486db8 View commit details
    Browse the repository at this point in the history
  2. [tsan] Handle libdispatch worker threads on OS X

    On OS X, GCD worker threads are created without a call to pthread_create. We need to properly register these threads with ThreadCreate and ThreadStart. This patch uses a libpthread API (`pthread_introspection_hook_install`) to get notifications about new threads and about threads that are about to be destroyed.
    
    Differential Revision: http://reviews.llvm.org/D14328
    
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@252049 91177308-0d34-0410-b5e6-96231b3b80d8
    kubamracek committed Nov 4, 2015
    Configuration menu
    Copy the full SHA
    9798c96 View commit details
    Browse the repository at this point in the history
  3. [tsan] Use malloc zone interceptors on OS X, part 1 (refactoring)

    TSan needs to use a custom malloc zone on OS X, which is already implemented in ASan.  This patch is a refactoring patch (NFC) that extracts this from ASan into sanitizer_common, where we can reuse it in TSan.
    
    Reviewed at http://reviews.llvm.org/D14330
    
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@252052 91177308-0d34-0410-b5e6-96231b3b80d8
    kubamracek committed Nov 4, 2015
    Configuration menu
    Copy the full SHA
    6d781b8 View commit details
    Browse the repository at this point in the history
  4. Whitespace fixup for r252052. NFC.

    git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@252053 91177308-0d34-0410-b5e6-96231b3b80d8
    kubamracek committed Nov 4, 2015
    Configuration menu
    Copy the full SHA
    e3abbe5 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    73a0848 View commit details
    Browse the repository at this point in the history
  6. Revert "Reapply: [asan] On OS X, log reports to syslog and os_trace"

    Looks like this commit is deadlocking the ASAN tests on the green dragon bot
    (http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA/).
    
    git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@252076 91177308-0d34-0410-b5e6-96231b3b80d8
    ributzka committed Nov 4, 2015
    Configuration menu
    Copy the full SHA
    766e7c6 View commit details
    Browse the repository at this point in the history

Commits on Nov 5, 2015

  1. [TSan] Fix mmap/mmap64 interceptor signature.

    mmap() offset argument has type off_t, not unsigned. off_t is usually
    64-bit on 64-bit Linux.
    
    git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@252103 91177308-0d34-0410-b5e6-96231b3b80d8
    vonosmas committed Nov 5, 2015
    Configuration menu
    Copy the full SHA
    4dc8693 View commit details
    Browse the repository at this point in the history
  2. [Sanitizer] Use ReportMmapFailureAndDie() in all applicable mmap vari…

    …ants on Posix.
    
    git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@252121 91177308-0d34-0410-b5e6-96231b3b80d8
    vonosmas committed Nov 5, 2015
    Configuration menu
    Copy the full SHA
    438a247 View commit details
    Browse the repository at this point in the history
  3. [tsan] Use malloc zone interceptors on OS X, part 2

    TSan needs to use a custom malloc zone on OS X, which is already implemented in ASan.  This patch uses the sanitizer_common implementation in `sanitizer_malloc_mac.inc` for TSan as well.
    
    Reviewed at http://reviews.llvm.org/D14330
    
    
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@252155 91177308-0d34-0410-b5e6-96231b3b80d8
    kubamracek committed Nov 5, 2015
    Configuration menu
    Copy the full SHA
    e387c40 View commit details
    Browse the repository at this point in the history
  4. [tsan] Alternative ThreadState storage for OS X

    This implements a "poor man's TLV" to be used for TSan's ThreadState on OS X. Based on the fact that `pthread_self()` is always available and reliable and returns a valid pointer to memory, we'll use the shadow memory of this pointer as a thread-local storage. No user code should ever read/write to this internal libpthread structure, so it's safe to use it for this purpose. We lazily allocate the ThreadState object and store the pointer here.
    
    Differential Revision: http://reviews.llvm.org/D14288
    
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@252159 91177308-0d34-0410-b5e6-96231b3b80d8
    kubamracek committed Nov 5, 2015
    Configuration menu
    Copy the full SHA
    29bf03d View commit details
    Browse the repository at this point in the history
  5. [tsan] Fix pthread_once interceptor for OS X

    TSan has a re-implementation of `pthread_once` in its interceptor, which assumes that the `pthread_once_t *once_control` pointer is actually pointing to a "storage" which is zero-initialized and used for the atomic operations. However, that's not true on OS X, where pthread_once_t is a structure, that contains a header (with a magic value) and the actual storage follows after that. This patch skips the header to make the interceptor work on OS X.
    
    Differential Revision: http://reviews.llvm.org/D14379
    
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@252160 91177308-0d34-0410-b5e6-96231b3b80d8
    kubamracek committed Nov 5, 2015
    Configuration menu
    Copy the full SHA
    b33423e View commit details
    Browse the repository at this point in the history
  6. [tsan] Allow memmove interceptor to be used when TSan is not initialized

    A call to memmove is used early during new thread initialization on OS X. This patch uses the `COMMON_INTERCEPTOR_NOTHING_IS_INITIALIZED` check, similarly to how we deal with other early-used interceptors.
    
    Differential Revision: http://reviews.llvm.org/D14377
    
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@252161 91177308-0d34-0410-b5e6-96231b3b80d8
    kubamracek committed Nov 5, 2015
    Configuration menu
    Copy the full SHA
    3c01317 View commit details
    Browse the repository at this point in the history
  7. [tsan] Fix the memcpy interceptor to be memmove compatible on OS X

    On OS X, memcpy and memmove are actually aliases of the same implementation, which means the interceptor of memcpy is also invoked when memmove is called. The current implementation of the interceptor uses `internal_memcpy` to perform the actual memory operation, which can produce an incorrect result when memmove semantics are expected. Let's call `internal_memmove` instead.
    
    Differential Revision: http://reviews.llvm.org/D14336
    
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@252162 91177308-0d34-0410-b5e6-96231b3b80d8
    kubamracek committed Nov 5, 2015
    Configuration menu
    Copy the full SHA
    26de8b7 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    ecb0485 View commit details
    Browse the repository at this point in the history
  9. [tsan] Fix build warnings on OS X

    Fixing `tsan_interceptors.cc`, which on OS X produces a bunch of warnings about unused constants and functions.
    
    Differential Revision: http://reviews.llvm.org/D14381
    
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@252165 91177308-0d34-0410-b5e6-96231b3b80d8
    kubamracek committed Nov 5, 2015
    Configuration menu
    Copy the full SHA
    cdfcc2b View commit details
    Browse the repository at this point in the history
  10. [compiler-rt][aarch64] New tests for 128-bit floating-point builtins,…

    … fixes of tests and __fixuint
    
    Summary:
    The following tests for 128-bit floating-point type behaved in a strange way, thought it were bugs, but seem to be mistakes in tests:
    
     * `fixtfsi` test checked for `0x80000001` as a value returned for number less than can be represented, while `LONG_MIN` should be returned on saturation;
     * `fixunstfdi` wasn't enabled for AArch64, only for PPC, but there is nothing PPC specific in that test;
     * `multf3` tried to underflow multiplication by producing result with 16383 exponent, while there are still 112 bits of fraction plus implicit bit, so resultant exponent should be 16497.
    
    Tests for some other builtins didn't exist:
    
     * `fixtfdi`
     * `fixtfti`
     * `fixunstfti`
    
    They were made by copying similar files and adjusting for wider types and adding/removing some reasonable/extra checks.
    
    Also `__fixuint` seems to have off by one error, updated tests to catch this case.
    
    Reviewers: rengolin, zatrazz, howard.hinnant, t.p.northover, jmolloy, enefaim
    
    Subscribers: aemerson, llvm-commits, rengolin
    
    Differential Revision: http://reviews.llvm.org/D14187
    
    git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@252180 91177308-0d34-0410-b5e6-96231b3b80d8
    Sergey Dmitrouk committed Nov 5, 2015
    Configuration menu
    Copy the full SHA
    aaf8214 View commit details
    Browse the repository at this point in the history

Commits on Nov 6, 2015

  1. Configuration menu
    Copy the full SHA
    1c59107 View commit details
    Browse the repository at this point in the history
  2. [tsan] Replace pthread_yield with sched_yield in lit tests

    OS X doesn't have `pthread_yield`. Let's use `sched_yield` instead.
    
    Differential Revision: http://reviews.llvm.org/D14428
    
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@252283 91177308-0d34-0410-b5e6-96231b3b80d8
    kubamracek committed Nov 6, 2015
    Configuration menu
    Copy the full SHA
    ebc821f View commit details
    Browse the repository at this point in the history
  3. [tsan] Enable new/delete C++ interceptors for OS X

    This patch adds `tsan_new_delete.cc` into the OS X build.
    
    Differential Revision: http://reviews.llvm.org/D14424
    
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@252284 91177308-0d34-0410-b5e6-96231b3b80d8
    kubamracek committed Nov 6, 2015
    Configuration menu
    Copy the full SHA
    b83dae9 View commit details
    Browse the repository at this point in the history
  4. tsan: make invisible test barrier portable

    The current implementation does not work on darwin and can have issues with other OSes in future.
    See http://reviews.llvm.org/D14427
    Make it portable once and for all (minus usleep call).
    
    Reviewed in:
    http://reviews.llvm.org/D14434
    
    
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@252292 91177308-0d34-0410-b5e6-96231b3b80d8
    dvyukov committed Nov 6, 2015
    Configuration menu
    Copy the full SHA
    dfcf188 View commit details
    Browse the repository at this point in the history
  5. [tsan] Add Darwin support for lit tests

    This patch enables running lit tests on OS X:
    1) Simply enable tests for Darwin (they were restricted to Linux and FreeBSD).
    2) Disable using instrumented libcxx (libcxx_tsan) on Darwin.
    3) On Darwin, override abort_on_error=0, otherwise all tests would generate crash logs and take much longer to process.
    
    Differential Revision: http://reviews.llvm.org/D14439
    
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@252309 91177308-0d34-0410-b5e6-96231b3b80d8
    kubamracek committed Nov 6, 2015
    Configuration menu
    Copy the full SHA
    08bd93a View commit details
    Browse the repository at this point in the history
  6. Rust: Add triple.mk

    Based on 1957424 (vadimcn)
    angelsl committed Nov 6, 2015
    Configuration menu
    Copy the full SHA
    f6ea2d8 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    01b893b View commit details
    Browse the repository at this point in the history
  8. Rust: delete other platforms' makefiles to prevent conflicts

    clang_linux.mk was complaining on AArch64. These makefiles create
    targets that are never used anyway, so let's remove them.
    angelsl committed Nov 6, 2015
    Configuration menu
    Copy the full SHA
    8d4ca03 View commit details
    Browse the repository at this point in the history
  9. Rust: Enable MSVC build

    angelsl committed Nov 6, 2015
    Configuration menu
    Copy the full SHA
    540b094 View commit details
    Browse the repository at this point in the history
  10. Rust: Silence -fPIC warnings on Windows

    Based on 44f2671 (vadimcn)
    angelsl committed Nov 6, 2015
    Configuration menu
    Copy the full SHA
    a4b1f78 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    b97188b View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    ba1ad13 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    280acc0 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    3d5277f View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    1295486 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    961d2bf View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    5b9c754 View commit details
    Browse the repository at this point in the history
  18. Rust: Support for SJ/LJ unwinding (arm)

    vhbit authored and angelsl committed Nov 6, 2015
    Configuration menu
    Copy the full SHA
    b6087e8 View commit details
    Browse the repository at this point in the history