<div dir="ltr">Evgenii, what's your take on this? <asm/ptrace.h> for __arm__ as well?</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 11, 2017 at 10:12 AM, Maxim Ostapenko <span dir="ltr"><<a href="mailto:chefmax7@gmail.com" target="_blank">chefmax7@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Added Evgeniy.<br>
I'm not an expert in Android, but it seems that pt_regs were moved from linux/user.h to asm/ptrace.h. Can we just use asm/ptrace.h then?<span class=""><br>
<br>
On 11/04/17 19:28, Kostya Kortchinsky wrote:<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
FYI, adding defined(__arm__) in sanitizer_stoptheworld_linux_l<wbr>ibcdep.cc breaks android arm with some toolchains.<br>
<br>
.../llvm/projects/compiler-rt/<wbr>lib/sanitizer_common/sanitizer<wbr>_stoptheworld_linux_libcdep.<wbr>cc:36:11: fatal error:<br>
      'linux/user.h' file not found<br>
# include <linux/user.h>  // for pt_regs<br>
          ^<br>
1 error generated.<br>
<br>
Context:<br>
#if SANITIZER_ANDROID && defined(__arm__)<br>
# include <linux/user.h>  // for pt_regs<br>
#else<br>
<br>
To be fair the code was there without __arm__ ever being checked prior to this for the file.<br>
<br>
<asm/ptrace.h> seems to have pt_regs and works for me, but I am not sure if that would break anything else.<br>
<br>
<br>
<br></span><div><div class="h5">
On Tue, Apr 11, 2017 at 7:58 AM, Maxim Ostapenko via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a> <mailto:<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llv<wbr>m.org</a>>> wrote:<br>
<br>
    Author: chefmax<br>
    Date: Tue Apr 11 09:58:26 2017<br>
    New Revision: 299948<br>
<br>
    URL: <a href="http://llvm.org/viewvc/llvm-project?rev=299948&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject?rev=299948&view=rev</a><br>
    <<a href="http://llvm.org/viewvc/llvm-project?rev=299948&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-p<wbr>roject?rev=299948&view=rev</a>><br>
    Log:<br>
    Reapply "Enable LSan for arm Linux"<br>
<br>
    This patch reapplies r299923 with typo fixed in BLX macros.<br>
<br>
    Modified:<br>
        compiler-rt/trunk/cmake/config<wbr>-ix.cmake<br>
        compiler-rt/trunk/lib/asan/tes<wbr>ts/asan_test.cc<br>
        compiler-rt/trunk/lib/lsan/lsa<wbr>n_allocator.cc<br>
        compiler-rt/trunk/lib/lsan/lsa<wbr>n_allocator.h<br>
        compiler-rt/trunk/lib/lsan/lsa<wbr>n_common.h<br>
        compiler-rt/trunk/lib/sanitize<wbr>r_common/sanitizer_linux.cc<br>
        compiler-rt/trunk/lib/sanitize<wbr>r_common/sanitizer_linux.h<br>
        compiler-rt/trunk/lib/sanitize<wbr>r_common/sanitizer_linux_<wbr>libcdep.cc<br>
        compiler-rt/trunk/lib/sanitize<wbr>r_common/sanitizer_platform.h<br>
           compiler-rt/trunk/lib/sanitiz<wbr>er_common/sanitizer_stopthewor<wbr>ld_linux_libcdep.cc<br>
        compiler-rt/trunk/test/asan/Te<wbr>stCases/Linux/clang_gcc_abi.cc<br>
        compiler-rt/trunk/test/asan/li<wbr>t.cfg<br>
        compiler-rt/trunk/test/lsan/Te<wbr>stCases/large_allocation_leak.<wbr>cc<br>
        compiler-rt/trunk/test/lsan/Te<wbr>stCases/swapcontext.cc<br>
        compiler-rt/trunk/test/lsan/Te<wbr>stCases/use_registers.cc<br>
        compiler-rt/trunk/test/lsan/Te<wbr>stCases/use_tls_dynamic.cc<br>
        compiler-rt/trunk/test/lsan/li<wbr>t.common.cfg<br>
        compiler-rt/trunk/test/sanitiz<wbr>er_common/print_address.h<br>
<br>
    Modified: compiler-rt/trunk/cmake/config<wbr>-ix.cmake<br>
    URL:<br>
    <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/config-ix.cmake?rev=299948&r1=299947&r2=299948&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/compiler-rt/trunk/cmake/<wbr>config-ix.cmake?rev=299948&r1=<wbr>299947&r2=299948&view=diff</a><br>
    <<a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/config-ix.cmake?rev=299948&r1=299947&r2=299948&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-p<wbr>roject/compiler-rt/trunk/cmake<wbr>/config-ix.cmake?rev=299948&<wbr>r1=299947&r2=299948&view=diff</a>><br>
    ==============================<wbr>==============================<wbr>==================<br>
    --- compiler-rt/trunk/cmake/config<wbr>-ix.cmake (original)<br>
    +++ compiler-rt/trunk/cmake/config<wbr>-ix.cmake Tue Apr 11 09:58:26 2017<br>
    @@ -164,7 +164,12 @@ set(ALL_SANITIZER_COMMON_SUPPO<wbr>RTED_ARCH<br>
     set(ALL_ASAN_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64}<br>
         ${MIPS32} ${MIPS64} ${PPC64} ${S390X})<br>
     set(ALL_DFSAN_SUPPORTED_ARCH ${X86_64} ${MIPS64} ${ARM64})<br>
    -set(ALL_LSAN_SUPPORTED_ARCH ${X86} ${X86_64} ${MIPS64} ${ARM64})<br>
    +<br>
    +if(APPLE)<br>
    +  set(ALL_LSAN_SUPPORTED_ARCH ${X86} ${X86_64} ${MIPS64} ${ARM64})<br>
    +else()<br>
    +  set(ALL_LSAN_SUPPORTED_ARCH ${X86} ${X86_64} ${MIPS64} ${ARM64}<br>
    ${ARM32})<br>
    +endif()<br>
     set(ALL_MSAN_SUPPORTED_ARCH ${X86_64} ${MIPS64} ${ARM64} ${PPC64})<br>
     set(ALL_PROFILE_SUPPORTED_<wbr>ARCH ${X86} ${X86_64} ${ARM32} ${ARM64}<br>
    ${PPC64}<br>
         ${MIPS32} ${MIPS64} ${S390X})<br>
<br>
    Modified: compiler-rt/trunk/lib/asan/tes<wbr>ts/asan_test.cc<br>
    URL:<br>
    <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/tests/asan_test.cc?rev=299948&r1=299947&r2=299948&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/compiler-rt/trunk/lib/as<wbr>an/tests/asan_test.cc?rev=2999<wbr>48&r1=299947&r2=299948&view=<wbr>diff</a><br>
    <<a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/tests/asan_test.cc?rev=299948&r1=299947&r2=299948&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-p<wbr>roject/compiler-rt/trunk/lib/a<wbr>san/tests/asan_test.cc?rev=299<wbr>948&r1=299947&r2=299948&view=<wbr>diff</a>><br>
    ==============================<wbr>==============================<wbr>==================<br>
    --- compiler-rt/trunk/lib/asan/tes<wbr>ts/asan_test.cc (original)<br>
    +++ compiler-rt/trunk/lib/asan/tes<wbr>ts/asan_test.cc Tue Apr 11<br>
    09:58:26 2017<br>
    @@ -685,6 +685,7 @@ void *ThreadStackReuseFunc2(void *unused<br>
       return 0;<br>
     }<br>
<br>
    +#if !defined(__thumb__)<br>
     TEST(AddressSanitizer, ThreadStackReuseTest) {<br>
       pthread_t t;<br>
       PTHREAD_CREATE(&t, 0, ThreadStackReuseFunc1, 0);<br>
    @@ -692,6 +693,7 @@ TEST(AddressSanitizer, ThreadStackReuseT<br>
       PTHREAD_CREATE(&t, 0, ThreadStackReuseFunc2, 0);<br>
       PTHREAD_JOIN(t, 0);<br>
     }<br>
    +#endif<br>
<br>
     #if defined(__SSE2__)<br>
     #include <emmintrin.h><br>
    @@ -1091,6 +1093,11 @@ TEST(AddressSanitizer, ThreadedStressSta<br>
       }<br>
     }<br>
<br>
    +// pthread_exit tries to perform unwinding stuff that leads to<br>
    dlopen'ing<br>
    +// libgcc_s.so. dlopen in its turn calls malloc to store<br>
    "libgcc_s.so" string<br>
    +// that confuses LSan on Thumb because it fails to understand<br>
    that this<br>
    +// allocation happens in dynamic linker and should be ignored.<br>
    +#if !defined(__thumb__)<br>
     static void *PthreadExit(void *a) {<br>
       pthread_exit(0);<br>
       return 0;<br>
    @@ -1103,6 +1110,7 @@ TEST(AddressSanitizer, PthreadExitTest)<br>
         PTHREAD_JOIN(t, 0);<br>
       }<br>
     }<br>
    +#endif<br>
<br>
     // FIXME: Why does clang-cl define __EXCEPTIONS?<br>
     #if defined(__EXCEPTIONS) && !defined(_WIN32)<br>
<br>
    Modified: compiler-rt/trunk/lib/lsan/lsa<wbr>n_allocator.cc<br>
    URL:<br>
    <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lsan/lsan_allocator.cc?rev=299948&r1=299947&r2=299948&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/compiler-rt/trunk/lib/ls<wbr>an/lsan_allocator.cc?rev=29994<wbr>8&r1=299947&r2=299948&view=<wbr>diff</a><br>
    <<a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lsan/lsan_allocator.cc?rev=299948&r1=299947&r2=299948&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-p<wbr>roject/compiler-rt/trunk/lib/l<wbr>san/lsan_allocator.cc?rev=2999<wbr>48&r1=299947&r2=299948&view=<wbr>diff</a>><br>
    ==============================<wbr>==============================<wbr>==================<br>
    --- compiler-rt/trunk/lib/lsan/lsa<wbr>n_allocator.cc (original)<br>
    +++ compiler-rt/trunk/lib/lsan/lsa<wbr>n_allocator.cc Tue Apr 11<br>
    09:58:26 2017<br>
    @@ -24,7 +24,7 @@<br>
     extern "C" void *memset(void *ptr, int value, uptr num);<br>
<br>
     namespace __lsan {<br>
    -#if defined(__i386__)<br>
    +#if defined(__i386__) || defined(__arm__)<br>
     static const uptr kMaxAllowedMallocSize = 1UL << 30;<br>
     #elif defined(__mips64) || defined(__aarch64__)<br>
     static const uptr kMaxAllowedMallocSize = 4UL << 30;<br>
<br>
    Modified: compiler-rt/trunk/lib/lsan/lsa<wbr>n_allocator.h<br>
    URL:<br>
    <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lsan/lsan_allocator.h?rev=299948&r1=299947&r2=299948&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/compiler-rt/trunk/lib/ls<wbr>an/lsan_allocator.h?rev=299948<wbr>&r1=299947&r2=299948&view=diff</a><br>
    <<a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lsan/lsan_allocator.h?rev=299948&r1=299947&r2=299948&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-p<wbr>roject/compiler-rt/trunk/lib/l<wbr>san/lsan_allocator.h?rev=29994<wbr>8&r1=299947&r2=299948&view=<wbr>diff</a>><br>
    ==============================<wbr>==============================<wbr>==================<br>
    --- compiler-rt/trunk/lib/lsan/lsa<wbr>n_allocator.h (original)<br>
    +++ compiler-rt/trunk/lib/lsan/lsa<wbr>n_allocator.h Tue Apr 11<br>
    09:58:26 2017<br>
    @@ -48,7 +48,8 @@ struct ChunkMetadata {<br>
       u32 stack_trace_id;<br>
     };<br>
<br>
    -#if defined(__mips64) || defined(__aarch64__) || defined(__i386__)<br>
    +#if defined(__mips64) || defined(__aarch64__) ||<br>
    defined(__i386__) || \<br>
    +    defined(__arm__)<br>
     static const uptr kRegionSizeLog = 20;<br>
     static const uptr kNumRegions = SANITIZER_MMAP_RANGE_SIZE >><br>
    kRegionSizeLog;<br>
     typedef TwoLevelByteMap<(kNumRegions >> 12), 1 << 12> ByteMap;<br>
<br>
    Modified: compiler-rt/trunk/lib/lsan/lsa<wbr>n_common.h<br>
    URL:<br>
    <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lsan/lsan_common.h?rev=299948&r1=299947&r2=299948&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/compiler-rt/trunk/lib/ls<wbr>an/lsan_common.h?rev=299948&r1<wbr>=299947&r2=299948&view=diff</a><br>
    <<a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lsan/lsan_common.h?rev=299948&r1=299947&r2=299948&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-p<wbr>roject/compiler-rt/trunk/lib/l<wbr>san/lsan_common.h?rev=299948&r<wbr>1=299947&r2=299948&view=diff</a>><br>
    ==============================<wbr>==============================<wbr>==================<br>
    --- compiler-rt/trunk/lib/lsan/lsa<wbr>n_common.h (original)<br>
    +++ compiler-rt/trunk/lib/lsan/lsa<wbr>n_common.h Tue Apr 11 09:58:26 2017<br>
    @@ -37,6 +37,9 @@<br>
     #elif defined(__i386__) && \<br>
         (SANITIZER_LINUX && !SANITIZER_ANDROID || SANITIZER_MAC)<br>
     #define CAN_SANITIZE_LEAKS 1<br>
    +#elif defined(__arm__) && \<br>
    +    SANITIZER_LINUX && !SANITIZER_ANDROID<br>
    +#define CAN_SANITIZE_LEAKS 1<br>
     #else<br>
     #define CAN_SANITIZE_LEAKS 0<br>
     #endif<br>
    @@ -144,13 +147,36 @@ struct ScopedInterceptorDisabler {<br>
       ~ScopedInterceptorDisabler() { EnableInThisThread(); }<br>
     };<br>
<br>
    +// According to Itanium C++ ABI array cookie is a one word containing<br>
    +// size of allocated array.<br>
    +static inline bool IsItaniumABIArrayCookie(uptr chunk_beg, uptr<br>
    chunk_size,<br>
    +                                           uptr addr) {<br>
    +  return chunk_size == sizeof(uptr) && chunk_beg + chunk_size ==<br>
    addr &&<br>
    +         *reinterpret_cast<uptr *>(chunk_beg) == 0;<br>
    +}<br>
    +<br>
    +// According to ARM C++ ABI array cookie consists of two words:<br>
    +// struct array_cookie {<br>
    +//   std::size_t element_size; // element_size != 0<br>
    +//   std::size_t element_count;<br>
    +// };<br>
    +static inline bool IsARMABIArrayCookie(uptr chunk_beg, uptr<br>
    chunk_size,<br>
    +                                       uptr addr) {<br>
    +  return chunk_size == 2 * sizeof(uptr) && chunk_beg + chunk_size<br>
    == addr &&<br>
    +         *reinterpret_cast<uptr *>(chunk_beg + sizeof(uptr)) == 0;<br>
    +}<br>
    +<br>
     // Special case for "new T[0]" where T is a type with DTOR.<br>
    -// new T[0] will allocate one word for the array size (0) and<br>
    store a pointer<br>
    -// to the end of allocated chunk.<br>
    +// new T[0] will allocate a cookie (one or two words) for the<br>
    array size (0)<br>
    +// and store a pointer to the end of allocated chunk. The actual<br>
    cookie layout<br>
    +// varies between platforms according to their C++ ABI<br>
    implementation.<br>
     inline bool IsSpecialCaseOfOperatorNew0(up<wbr>tr chunk_beg, uptr<br>
    chunk_size,<br>
                                             uptr addr) {<br>
    -  return chunk_size == sizeof(uptr) && chunk_beg + chunk_size ==<br>
    addr &&<br>
    -         *reinterpret_cast<uptr *>(chunk_beg) == 0;<br>
    +#if defined(__arm__)<br>
    +  return IsARMABIArrayCookie(chunk_beg, chunk_size, addr);<br>
    +#else<br>
    +  return IsItaniumABIArrayCookie(chunk_<wbr>beg, chunk_size, addr);<br>
    +#endif<br>
     }<br>
<br>
     // The following must be implemented in the parent tool.<br>
<br>
    Modified: compiler-rt/trunk/lib/sanitize<wbr>r_common/sanitizer_linux.cc<br>
    URL:<br>
    <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc?rev=299948&r1=299947&r2=299948&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/compiler-rt/trunk/lib/sa<wbr>nitizer_common/sanitizer_linux<wbr>.cc?rev=299948&r1=299947&r2=<wbr>299948&view=diff</a><br>
    <<a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc?rev=299948&r1=299947&r2=299948&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-p<wbr>roject/compiler-rt/trunk/lib/s<wbr>anitizer_common/sanitizer_linu<wbr>x.cc?rev=299948&r1=299947&r2=<wbr>299948&view=diff</a>><br>
    ==============================<wbr>==============================<wbr>==================<br>
    --- compiler-rt/trunk/lib/sanitize<wbr>r_common/sanitizer_linux.cc<br>
    (original)<br>
    +++ compiler-rt/trunk/lib/sanitize<wbr>r_common/sanitizer_linux.cc Tue<br>
    Apr 11 09:58:26 2017<br>
    @@ -1283,6 +1283,72 @@ uptr internal_clone(int (*fn)(void *), v<br>
                            : "memory");<br>
       return res;<br>
     }<br>
    +#elif defined(__arm__) && SANITIZER_LINUX<br>
    +uptr internal_clone(int (*fn)(void *), void *child_stack, int<br>
    flags, void *arg,<br>
    +                    int *parent_tidptr, void *newtls, int<br>
    *child_tidptr) {<br>
    +  unsigned int res;<br>
    +  if (!fn || !child_stack)<br>
    +    return -EINVAL;<br>
    +  child_stack = (char *)child_stack - 2 * sizeof(unsigned int);<br>
    +  ((unsigned int *)child_stack)[0] = (uptr)fn;<br>
    +  ((unsigned int *)child_stack)[1] = (uptr)arg;<br>
    +  register int r0 __asm__("r0") = flags;<br>
    +  register void *r1 __asm__("r1") = child_stack;<br>
    +  register int *r2 __asm__("r2") = parent_tidptr;<br>
    +  register void *r3 __asm__("r3") = newtls;<br>
    +  register int *r4 __asm__("r4") = child_tidptr;<br>
    +  register int r7 __asm__("r7") = __NR_clone;<br>
    +<br>
    +#if __ARM_ARCH > 4 || defined (__ARM_ARCH_4T__)<br>
    +# define ARCH_HAS_BX<br>
    +#endif<br>
    +#if __ARM_ARCH > 4<br>
    +# define ARCH_HAS_BLX<br>
    +#endif<br>
    +<br>
    +#ifdef ARCH_HAS_BX<br>
    +# ifdef ARCH_HAS_BLX<br>
    +#  define BLX(R) "blx "  #R "\n"<br>
    +# else<br>
    +#  define BLX(R) "mov lr, pc; bx " #R "\n"<br>
    +# endif<br>
    +#else<br>
    +# define BLX(R)  "mov lr, pc; mov pc," #R "\n"<br>
    +#endif<br>
    +<br>
    +  __asm__ __volatile__(<br>
    +                       /* %r0 = syscall(%r7 = SYSCALL(clone),<br>
    +                        *               %r0 = flags,<br>
    +                        *               %r1 = child_stack,<br>
    +                        *               %r2 = parent_tidptr,<br>
    +                        *               %r3  = new_tls,<br>
    +                        *               %r4 = child_tidptr)<br>
    +                        */<br>
    +<br>
    +                       /* Do the system call */<br>
    +                       "swi 0x0\n"<br>
    +<br>
    +                       /* if (%r0 != 0)<br>
    +                        *   return %r0;<br>
    +                        */<br>
    +                       "cmp r0, #0\n"<br>
    +                       "bne 1f\n"<br>
    +<br>
    +                       /* In the child, now. Call "fn(arg)". */<br>
    +                       "ldr r0, [sp, #4]\n"<br>
    +                       "ldr ip, [sp], #8\n"<br>
    +                       BLX(ip)<br>
    +                       /* Call _exit(%r0). */<br>
    +                       "mov r7, %7\n"<br>
    +                       "swi 0x0\n"<br>
    +                       "1:\n"<br>
    +                       "mov %0, r0\n"<br>
    +                       : "=r"(res)<br>
    +                       : "r"(r0), "r"(r1), "r"(r2), "r"(r3),<br>
    "r"(r4), "r"(r7),<br>
    +                         "i"(__NR_exit)<br>
    +                       : "memory");<br>
    +  return res;<br>
    +}<br>
     #endif  // defined(__x86_64__) && SANITIZER_LINUX<br>
<br>
     #if SANITIZER_ANDROID<br>
<br>
    Modified: compiler-rt/trunk/lib/sanitize<wbr>r_common/sanitizer_linux.h<br>
    URL:<br>
    <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.h?rev=299948&r1=299947&r2=299948&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/compiler-rt/trunk/lib/sa<wbr>nitizer_common/sanitizer_linux<wbr>.h?rev=299948&r1=299947&r2=<wbr>299948&view=diff</a><br>
    <<a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.h?rev=299948&r1=299947&r2=299948&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-p<wbr>roject/compiler-rt/trunk/lib/s<wbr>anitizer_common/sanitizer_linu<wbr>x.h?rev=299948&r1=299947&r2=<wbr>299948&view=diff</a>><br>
    ==============================<wbr>==============================<wbr>==================<br>
    --- compiler-rt/trunk/lib/sanitize<wbr>r_common/sanitizer_linux.h<br>
    (original)<br>
    +++ compiler-rt/trunk/lib/sanitize<wbr>r_common/sanitizer_linux.h Tue<br>
    Apr 11 09:58:26 2017<br>
    @@ -48,7 +48,8 @@ int internal_sigaction_syscall(int signu<br>
     #endif<br>
     void internal_sigdelset(__sanitizer<wbr>_sigset_t *set, int signum);<br>
     #if defined(__x86_64__) || defined(__mips__) ||<br>
    defined(__aarch64__) \<br>
    -  || defined(__powerpc64__) || defined(__s390__) || defined(__i386__)<br>
    +  || defined(__powerpc64__) || defined(__s390__) ||<br>
    defined(__i386__) \<br>
    +  || defined(__arm__)<br>
     uptr internal_clone(int (*fn)(void *), void *child_stack, int<br>
    flags, void *arg,<br>
                         int *parent_tidptr, void *newtls, int<br>
    *child_tidptr);<br>
     #endif<br>
<br>
    Modified:<br>
    compiler-rt/trunk/lib/sanitize<wbr>r_common/sanitizer_linux_<wbr>libcdep.cc<br>
    URL:<br>
    <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_libcdep.cc?rev=299948&r1=299947&r2=299948&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/compiler-rt/trunk/lib/sa<wbr>nitizer_common/sanitizer_linux<wbr>_libcdep.cc?rev=299948&r1=<wbr>299947&r2=299948&view=diff</a><br>
    <<a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_libcdep.cc?rev=299948&r1=299947&r2=299948&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-p<wbr>roject/compiler-rt/trunk/lib/s<wbr>anitizer_common/sanitizer_linu<wbr>x_libcdep.cc?rev=299948&r1=<wbr>299947&r2=299948&view=diff</a>><br>
    ==============================<wbr>==============================<wbr>==================<br>
    ---<br>
    compiler-rt/trunk/lib/sanitize<wbr>r_common/sanitizer_linux_<wbr>libcdep.cc<br>
    (original)<br>
    +++<br>
    compiler-rt/trunk/lib/sanitize<wbr>r_common/sanitizer_linux_<wbr>libcdep.cc<br>
    Tue Apr 11 09:58:26 2017<br>
    @@ -183,8 +183,8 @@ void InitTlsSize() { }<br>
     #endif  // !SANITIZER_FREEBSD && !SANITIZER_ANDROID && !SANITIZER_GO<br>
<br>
     #if (defined(__x86_64__) || defined(__i386__) || defined(__mips__) \<br>
    -    || defined(__aarch64__) || defined(__powerpc64__) ||<br>
    defined(__s390__)) \<br>
    -    && SANITIZER_LINUX && !SANITIZER_ANDROID<br>
    +    || defined(__aarch64__) || defined(__powerpc64__) ||<br>
    defined(__s390__) \<br>
    +    || defined(__arm__)) && SANITIZER_LINUX && !SANITIZER_ANDROID<br>
     // sizeof(struct pthread) from glibc.<br>
     static atomic_uintptr_t kThreadDescriptorSize;<br>
<br>
    @@ -192,14 +192,14 @@ uptr ThreadDescriptorSize() {<br>
       uptr val = atomic_load(&kThreadDescriptor<wbr>Size,<br>
    memory_order_relaxed);<br>
       if (val)<br>
         return val;<br>
    -#if defined(__x86_64__) || defined(__i386__)<br>
    +#if defined(__x86_64__) || defined(__i386__) || defined(__arm__)<br>
     #ifdef _CS_GNU_LIBC_VERSION<br>
       char buf[64];<br>
       uptr len = confstr(_CS_GNU_LIBC_VERSION, buf, sizeof(buf));<br>
       if (len < sizeof(buf) && internal_strncmp(buf, "glibc 2.", 8)<br>
    == 0) {<br>
         char *end;<br>
         int minor = internal_simple_strtoll(buf + 8, &end, 10);<br>
    -    if (end != buf + 8 && (*end == '\0' || *end == '.')) {<br>
    +    if (end != buf + 8 && (*end == '\0' || *end == '.' || *end ==<br>
    '-')) {<br>
           int patch = 0;<br>
           if (*end == '.')<br>
             // strtoll will return 0 if no valid conversion could be<br>
    performed<br>
    @@ -208,6 +208,9 @@ uptr ThreadDescriptorSize() {<br>
           /* sizeof(struct pthread) values from various glibc<br>
    versions.  */<br>
           if (SANITIZER_X32)<br>
             val = 1728;  // Assume only one particular version for x32.<br>
    +      // For ARM sizeof(struct pthread) changed in Glibc 2.23.<br>
    +      else if (SANITIZER_ARM)<br>
    +        val = minor <= 22 ? 1120 : 1216;<br>
           else if (minor <= 3)<br>
             val = FIRST_32_SECOND_64(1104, 1696);<br>
           else if (minor == 4)<br>
    @@ -293,7 +296,7 @@ uptr ThreadSelf() {<br>
                     rdhwr %0,$29;\<br>
                     .set pop" : "=r" (thread_pointer));<br>
       descr_addr = thread_pointer - kTlsTcbOffset - TlsPreTcbSize();<br>
    -# elif defined(__aarch64__)<br>
    +# elif defined(__aarch64__) || defined(__arm__)<br>
       descr_addr = reinterpret_cast<uptr>(__built<wbr>in_thread_pointer()) -<br>
     ThreadDescriptorSize();<br>
     # elif defined(__s390__)<br>
    @@ -342,7 +345,8 @@ static void GetTls(uptr *addr, uptr *siz<br>
       *size = GetTlsSize();<br>
       *addr -= *size;<br>
       *addr += ThreadDescriptorSize();<br>
    -# elif defined(__mips__) || defined(__aarch64__) ||<br>
    defined(__powerpc64__)<br>
    +# elif defined(__mips__) || defined(__aarch64__) ||<br>
    defined(__powerpc64__) \<br>
    +    || defined(__arm__)<br>
       *addr = ThreadSelf();<br>
       *size = GetTlsSize();<br>
     # else<br>
<br>
    Modified: compiler-rt/trunk/lib/sanitize<wbr>r_common/sanitizer_platform.h<br>
    URL:<br>
    <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform.h?rev=299948&r1=299947&r2=299948&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/compiler-rt/trunk/lib/sa<wbr>nitizer_common/sanitizer_platf<wbr>orm.h?rev=299948&r1=299947&r2=<wbr>299948&view=diff</a><br>
    <<a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform.h?rev=299948&r1=299947&r2=299948&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-p<wbr>roject/compiler-rt/trunk/lib/s<wbr>anitizer_common/sanitizer_plat<wbr>form.h?rev=299948&r1=299947&<wbr>r2=299948&view=diff</a>><br>
    ==============================<wbr>==============================<wbr>==================<br>
    --- compiler-rt/trunk/lib/sanitize<wbr>r_common/sanitizer_platform.h<br>
    (original)<br>
    +++ compiler-rt/trunk/lib/sanitize<wbr>r_common/sanitizer_platform.h<br>
    Tue Apr 11 09:58:26 2017<br>
    @@ -162,6 +162,12 @@<br>
     # define SANITIZER_PPC64V2 0<br>
     #endif<br>
<br>
    +#if defined(__arm__)<br>
    +# define SANITIZER_ARM 1<br>
    +#else<br>
    +# define SANITIZER_ARM 0<br>
    +#endif<br>
    +<br>
     // By default we allow to use SizeClassAllocator64 on 64-bit<br>
    platform.<br>
     // But in some cases (e.g. AArch64's 39-bit address space)<br>
    SizeClassAllocator64<br>
     // does not work well and we need to fallback to<br>
    SizeClassAllocator32.<br>
<br>
    Modified:<br>
    compiler-rt/trunk/lib/sanitize<wbr>r_common/sanitizer_stoptheworl<wbr>d_linux_libcdep.cc<br>
    URL:<br>
    <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc?rev=299948&r1=299947&r2=299948&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/compiler-rt/trunk/lib/sa<wbr>nitizer_common/sanitizer_stopt<wbr>heworld_linux_libcdep.cc?rev=<wbr>299948&r1=299947&r2=299948&<wbr>view=diff</a><br>
    <<a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc?rev=299948&r1=299947&r2=299948&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-p<wbr>roject/compiler-rt/trunk/lib/s<wbr>anitizer_common/sanitizer_stop<wbr>theworld_linux_libcdep.cc?rev=<wbr>299948&r1=299947&r2=299948&<wbr>view=diff</a>><br>
    ==============================<wbr>==============================<wbr>==================<br>
    ---<br>
    compiler-rt/trunk/lib/sanitize<wbr>r_common/sanitizer_stoptheworl<wbr>d_linux_libcdep.cc<br>
    (original)<br>
    +++<br>
    compiler-rt/trunk/lib/sanitize<wbr>r_common/sanitizer_stoptheworl<wbr>d_linux_libcdep.cc<br>
    Tue Apr 11 09:58:26 2017<br>
    @@ -16,7 +16,8 @@<br>
<br>
     #if SANITIZER_LINUX && (defined(__x86_64__) || defined(__mips__) || \<br>
                             defined(__aarch64__) ||<br>
    defined(__powerpc64__) || \<br>
    -                        defined(__s390__) || defined(__i386__))<br>
    +                        defined(__s390__) || defined(__i386__) || \<br>
    +                        defined(__arm__))<br>
<br>
     #include "sanitizer_stoptheworld.h"<br>
<br>
    @@ -532,4 +533,4 @@ uptr SuspendedThreadsList::Register<wbr>Count<br>
<br>
     #endif  // SANITIZER_LINUX && (defined(__x86_64__) ||<br>
    defined(__mips__)<br>
             // || defined(__aarch64__) || defined(__powerpc64__)<br>
    -        // || defined(__s390__) || defined(__i386__)<br>
    +        // || defined(__s390__) || defined(__i386__) ||<br>
    defined(__arm__)<br>
<br>
    Modified: compiler-rt/trunk/test/asan/Te<wbr>stCases/Linux/clang_gcc_abi.cc<br>
    URL:<br>
    <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/clang_gcc_abi.cc?rev=299948&r1=299947&r2=299948&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/compiler-rt/trunk/test/<wbr>asan/TestCases/Linux/clang_<wbr>gcc_abi.cc?rev=299948&r1=<wbr>299947&r2=299948&view=diff</a><br>
    <<a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/clang_gcc_abi.cc?rev=299948&r1=299947&r2=299948&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-p<wbr>roject/compiler-rt/trunk/test/<wbr>asan/TestCases/Linux/clang_<wbr>gcc_abi.cc?rev=299948&r1=<wbr>299947&r2=299948&view=diff</a>><br>
    ==============================<wbr>==============================<wbr>==================<br>
    --- compiler-rt/trunk/test/asan/Te<wbr>stCases/Linux/clang_gcc_abi.cc<br>
    (original)<br>
    +++ compiler-rt/trunk/test/asan/Te<wbr>stCases/Linux/clang_gcc_abi.cc<br>
    Tue Apr 11 09:58:26 2017<br>
    @@ -3,7 +3,7 @@<br>
     // RUN: %clangxx_asan -O2 -x c %s -o %t && not %run %t 2>&1 |<br>
    FileCheck %s<br>
     // RUN: %clangxx_asan -O3 -x c %s -o %t && not %run %t 2>&1 |<br>
    FileCheck %s<br>
<br>
    -// REQUIRES: arm-target-arch<br>
    +// REQUIRES: arm-target-arch, fast-unwinder-works<br>
     // XFAIL: armv7l-unknown-linux-gnueabihf<br>
<br>
     #include <stdlib.h><br>
<br>
    Modified: compiler-rt/trunk/test/asan/li<wbr>t.cfg<br>
    URL:<br>
    <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/lit.cfg?rev=299948&r1=299947&r2=299948&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/compiler-rt/trunk/test/<wbr>asan/lit.cfg?rev=299948&r1=<wbr>299947&r2=299948&view=diff</a><br>
    <<a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/lit.cfg?rev=299948&r1=299947&r2=299948&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-p<wbr>roject/compiler-rt/trunk/test/<wbr>asan/lit.cfg?rev=299948&r1=<wbr>299947&r2=299948&view=diff</a>><br>
    ==============================<wbr>==============================<wbr>==================<br>
    --- compiler-rt/trunk/test/asan/li<wbr>t.cfg (original)<br>
    +++ compiler-rt/trunk/test/asan/li<wbr>t.cfg Tue Apr 11 09:58:26 2017<br>
    @@ -2,6 +2,7 @@<br>
<br>
     import os<br>
     import platform<br>
    +import re<br>
<br>
     import lit.formats<br>
<br>
    @@ -211,6 +212,10 @@ config.substitutions.append( ("%xdynamic<br>
     if config.target_arch != 'arm' and config.target_arch != 'armhf'<br>
    and config.target_arch != 'aarch64':<br>
       config.available_features.<wbr>add('stable-runtime')<br>
<br>
    +# Fast unwinder doesn't work with Thumb<br>
    +if not re.match('-mthumb', config.target_cflags):<br>
    +  config.available_features.add(<wbr>'fast-unwinder-works')<br>
    +<br>
     # Turn on leak detection on 64-bit Linux.<br>
     if config.host_os == 'Linux' and (config.target_arch == 'x86_64'<br>
    or config.target_arch == 'i386'):<br>
       config.available_features.<wbr>add('leak-detection')<br>
<br>
    Modified:<br>
    compiler-rt/trunk/test/lsan/Te<wbr>stCases/large_allocation_leak.<wbr>cc<br>
    URL:<br>
    <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/lsan/TestCases/large_allocation_leak.cc?rev=299948&r1=299947&r2=299948&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/compiler-rt/trunk/test/<wbr>lsan/TestCases/large_allocatio<wbr>n_leak.cc?rev=299948&r1=<wbr>299947&r2=299948&view=diff</a><br>
    <<a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/lsan/TestCases/large_allocation_leak.cc?rev=299948&r1=299947&r2=299948&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-p<wbr>roject/compiler-rt/trunk/test/<wbr>lsan/TestCases/large_allocatio<wbr>n_leak.cc?rev=299948&r1=<wbr>299947&r2=299948&view=diff</a>><br>
    ==============================<wbr>==============================<wbr>==================<br>
    --- compiler-rt/trunk/test/lsan/Te<wbr>stCases/large_allocation_leak.<wbr>cc<br>
    (original)<br>
    +++ compiler-rt/trunk/test/lsan/Te<wbr>stCases/large_allocation_leak.<wbr>cc<br>
    Tue Apr 11 09:58:26 2017<br>
    @@ -5,7 +5,7 @@<br>
<br>
     // For 32 bit LSan it's pretty likely that large chunks are<br>
    "reachable" from some<br>
     // internal data structures (e.g. Glibc global data).<br>
    -// UNSUPPORTED: x86<br>
    +// UNSUPPORTED: x86, arm<br>
<br>
     #include <stdio.h><br>
     #include <stdlib.h><br>
<br>
    Modified: compiler-rt/trunk/test/lsan/Te<wbr>stCases/swapcontext.cc<br>
    URL:<br>
    <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/lsan/TestCases/swapcontext.cc?rev=299948&r1=299947&r2=299948&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/compiler-rt/trunk/test/<wbr>lsan/TestCases/swapcontext.cc?<wbr>rev=299948&r1=299947&r2=<wbr>299948&view=diff</a><br>
    <<a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/lsan/TestCases/swapcontext.cc?rev=299948&r1=299947&r2=299948&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-p<wbr>roject/compiler-rt/trunk/test/<wbr>lsan/TestCases/swapcontext.cc?<wbr>rev=299948&r1=299947&r2=<wbr>299948&view=diff</a>><br>
    ==============================<wbr>==============================<wbr>==================<br>
    --- compiler-rt/trunk/test/lsan/Te<wbr>stCases/swapcontext.cc (original)<br>
    +++ compiler-rt/trunk/test/lsan/Te<wbr>stCases/swapcontext.cc Tue Apr<br>
    11 09:58:26 2017<br>
    @@ -2,8 +2,10 @@<br>
     // memory. Make sure we don't report these leaks.<br>
<br>
     // RUN: %clangxx_lsan %s -o %t<br>
    -// RUN: %run %t 2>&1<br>
    -// RUN: not %run %t foo 2>&1 | FileCheck %s<br>
    +// RUN: LSAN_BASE="detect_leaks=1"<br>
    +// RUN: LSAN_OPTIONS=$LSAN_BASE %run %t 2>&1<br>
    +// RUN: LSAN_OPTIONS=$LSAN_BASE not %run %t foo 2>&1 | FileCheck %s<br>
    +// UNSUPPORTED: arm<br>
<br>
     #include <stdio.h><br>
     #if defined(__APPLE__)<br>
    @@ -23,7 +25,7 @@ void Child() {<br>
     }<br>
<br>
     int main(int argc, char *argv[]) {<br>
    -  char stack_memory[kStackSize + 1];<br>
    +  char stack_memory[kStackSize + 1] __attribute__((aligned(16)));<br>
       char *heap_memory = new char[kStackSize + 1];<br>
       char *child_stack = (argc > 1) ? stack_memory : heap_memory;<br>
<br>
<br>
    Modified: compiler-rt/trunk/test/lsan/Te<wbr>stCases/use_registers.cc<br>
    URL:<br>
    <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/lsan/TestCases/use_registers.cc?rev=299948&r1=299947&r2=299948&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/compiler-rt/trunk/test/<wbr>lsan/TestCases/use_registers.<wbr>cc?rev=299948&r1=299947&r2=<wbr>299948&view=diff</a><br>
    <<a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/lsan/TestCases/use_registers.cc?rev=299948&r1=299947&r2=299948&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-p<wbr>roject/compiler-rt/trunk/test/<wbr>lsan/TestCases/use_registers.<wbr>cc?rev=299948&r1=299947&r2=<wbr>299948&view=diff</a>><br>
    ==============================<wbr>==============================<wbr>==================<br>
    --- compiler-rt/trunk/test/lsan/Te<wbr>stCases/use_registers.cc (original)<br>
    +++ compiler-rt/trunk/test/lsan/Te<wbr>stCases/use_registers.cc Tue Apr<br>
    11 09:58:26 2017<br>
    @@ -33,6 +33,11 @@ void *registers_thread_func(void *arg) {<br>
           :<br>
           : "r" (p)<br>
           );<br>
    +#elif defined(__arm__)<br>
    +  asm ( "mov r5, %0"<br>
    +      :<br>
    +      : "r" (p)<br>
    +      );<br>
     #else<br>
     #error "Test is not supported on this architecture."<br>
     #endif<br>
<br>
    Modified: compiler-rt/trunk/test/lsan/Te<wbr>stCases/use_tls_dynamic.cc<br>
    URL:<br>
    <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/lsan/TestCases/use_tls_dynamic.cc?rev=299948&r1=299947&r2=299948&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/compiler-rt/trunk/test/<wbr>lsan/TestCases/use_tls_dynamic<wbr>.cc?rev=299948&r1=299947&r2=<wbr>299948&view=diff</a><br>
    <<a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/lsan/TestCases/use_tls_dynamic.cc?rev=299948&r1=299947&r2=299948&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-p<wbr>roject/compiler-rt/trunk/test/<wbr>lsan/TestCases/use_tls_dynamic<wbr>.cc?rev=299948&r1=299947&r2=<wbr>299948&view=diff</a>><br>
    ==============================<wbr>==============================<wbr>==================<br>
    --- compiler-rt/trunk/test/lsan/Te<wbr>stCases/use_tls_dynamic.cc<br>
    (original)<br>
    +++ compiler-rt/trunk/test/lsan/Te<wbr>stCases/use_tls_dynamic.cc Tue<br>
    Apr 11 09:58:26 2017<br>
    @@ -5,7 +5,7 @@<br>
     // RUN: LSAN_OPTIONS=$LSAN_BASE:"use_t<wbr>ls=0" not %run %t 2>&1 |<br>
    FileCheck %s<br>
     // RUN: LSAN_OPTIONS=$LSAN_BASE:"use_t<wbr>ls=1" %run %t 2>&1<br>
     // RUN: LSAN_OPTIONS="" %run %t 2>&1<br>
    -// UNSUPPORTED: i386-linux,i686-linux<br>
    +// UNSUPPORTED: i386-linux,i686-linux,arm<br>
<br>
     #ifndef BUILD_DSO<br>
     #include <assert.h><br>
<br>
    Modified: compiler-rt/trunk/test/lsan/li<wbr>t.common.cfg<br>
    URL:<br>
    <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/lsan/lit.common.cfg?rev=299948&r1=299947&r2=299948&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/compiler-rt/trunk/test/<wbr>lsan/lit.common.cfg?rev=299948<wbr>&r1=299947&r2=299948&view=diff</a><br>
    <<a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/lsan/lit.common.cfg?rev=299948&r1=299947&r2=299948&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-p<wbr>roject/compiler-rt/trunk/test/<wbr>lsan/lit.common.cfg?rev=299948<wbr>&r1=299947&r2=299948&view=diff</a><wbr>><br>
    ==============================<wbr>==============================<wbr>==================<br>
    --- compiler-rt/trunk/test/lsan/li<wbr>t.common.cfg (original)<br>
    +++ compiler-rt/trunk/test/lsan/li<wbr>t.common.cfg Tue Apr 11 09:58:26<br>
    2017<br>
    @@ -3,6 +3,7 @@<br>
     # Common configuration for running leak detection tests under<br>
    LSan/ASan.<br>
<br>
     import os<br>
    +import re<br>
<br>
     import lit.util<br>
<br>
    @@ -51,8 +52,12 @@ config.substitutions.append( ("%clangxx<br>
     config.substitutions.append( ("%clang_lsan ",<br>
    build_invocation(clang_lsan_cf<wbr>lags)) )<br>
     config.substitutions.append( ("%clangxx_lsan ",<br>
    build_invocation(clang_lsan_cx<wbr>xflags)) )<br>
<br>
    -# LeakSanitizer tests are currently supported on x86-64 Linux and<br>
    mips64 Linux only.<br>
    -if config.host_os not in ['Linux'] or config.host_arch not in<br>
    ['x86_64', 'mips64']:<br>
    +# LeakSanitizer tests are currently supported on x86-64 Linux,<br>
    arm Linux and mips64 Linux only.<br>
    +if config.host_os not in ['Linux'] or config.host_arch not in<br>
    ['x86_64', 'mips64', 'arm', 'armhf', armv7l]:<br>
    +  config.unsupported = True<br>
    +<br>
    +# Don't support Thumb due to broken fast unwinder<br>
    +if re.match('-mthumb', config.target_cflags):<br>
       config.unsupported = True<br>
<br>
     config.suffixes = ['.c', '.cc', '.cpp']<br>
<br>
    Modified: compiler-rt/trunk/test/sanitiz<wbr>er_common/print_address.h<br>
    URL:<br>
    <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/print_address.h?rev=299948&r1=299947&r2=299948&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/compiler-rt/trunk/test/<wbr>sanitizer_common/print_address<wbr>.h?rev=299948&r1=299947&r2=<wbr>299948&view=diff</a><br>
    <<a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/print_address.h?rev=299948&r1=299947&r2=299948&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-p<wbr>roject/compiler-rt/trunk/test/<wbr>sanitizer_common/print_address<wbr>.h?rev=299948&r1=299947&r2=<wbr>299948&view=diff</a>><br>
    ==============================<wbr>==============================<wbr>==================<br>
    --- compiler-rt/trunk/test/sanitiz<wbr>er_common/print_address.h (original)<br>
    +++ compiler-rt/trunk/test/sanitiz<wbr>er_common/print_address.h Tue<br>
    Apr 11 09:58:26 2017<br>
    @@ -11,7 +11,7 @@ void print_address(const char *str, int<br>
         // On FreeBSD, the %p conversion specifier works as 0x%x and<br>
    thus does not<br>
         // match to the format used in the diagnotic message.<br>
         fprintf(stderr, "0x%012lx ", (unsigned long) p);<br>
    -#elif defined(__i386__)<br>
    +#elif defined(__i386__) || defined(__arm__)<br>
         fprintf(stderr, "0x%8lx ", (unsigned long) p);<br>
     #elif defined(__mips64)<br>
         fprintf(stderr, "0x%010lx ", (unsigned long) p);<br>
<br>
<br>
    ______________________________<wbr>_________________<br>
    llvm-commits mailing list<br></div></div>
    <a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a> <mailto:<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llv<wbr>m.org</a>><br>
    <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-commits</a><br>
    <<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin<wbr>/mailman/listinfo/llvm-commits</a><wbr>><br>
<br>
<br>
</blockquote>
<br>
</blockquote></div><br></div>