[compiler-rt] r196802 - Revert three patches which were committed without explicit contribution

Sean Silva silvas at purdue.edu
Thu Dec 19 12:49:36 PST 2013


Ping?


On Sat, Dec 14, 2013 at 5:14 PM, Sean Silva <silvas at purdue.edu> wrote:

> I also found these to be quite unexpected. An explanation is definitely in
> order.
>
> -- Sean Silva
>
>
> On Tue, Dec 10, 2013 at 7:15 AM, Alp Toker <alp at nuanti.com> wrote:
>
>> This revert came out of the blue, what happened here?
>>
>> This wouldn't be the first time patches have been cross-posted to gcc and
>> llvm lists and pulled in as downstream contributions.
>>
>> Is there something special about these ones specifically that you decided
>> to back them out?
>>
>> Reverting the series seems to have come as a surprise to a number of
>> people, not least the actual patch authors listed in the commit messages,
>> who weren't approach beforehand or notified after rolling back their
>> changes. Also a headache to vendors trying their best to stabilize and ship
>> compiler-rt 3.4.
>>
>> Alp.
>>
>>
>>
>>
>> On 09/12/2013 19:25, Chandler Carruth wrote:
>>
>>> Author: chandlerc
>>> Date: Mon Dec  9 13:25:51 2013
>>> New Revision: 196802
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=196802&view=rev
>>> Log:
>>> Revert three patches which were committed without explicit contribution
>>> by their authors.
>>>
>>> This may break builds where others added code relying on these patches,
>>> but please *do not* revert this commit. Instead, we will prepare patches
>>> which fix the failures.
>>>
>>> Reverts the following commits:
>>> r168306: "[asan] support x32 mode in the fast stack unwinder. Patch by
>>> H.J. Lu"
>>> r168356: "[asan] more support for powerpc, patch by Peter Bergner"
>>> r196489: "[sanitizer] fix the ppc32 build (patch by Jakub Jelinek)"
>>>
>>> Modified:
>>>      compiler-rt/trunk/lib/asan/asan_linux.cc
>>>      compiler-rt/trunk/lib/asan/asan_mapping.h
>>>      compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.h
>>>      compiler-rt/trunk/lib/sanitizer_common/sanitizer_internal_defs.h
>>>      compiler-rt/trunk/lib/sanitizer_common/sanitizer_
>>> platform_limits_posix.h
>>>      compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace.cc
>>>      compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace.h
>>>
>>> Modified: compiler-rt/trunk/lib/asan/asan_linux.cc
>>> URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/
>>> asan/asan_linux.cc?rev=196802&r1=196801&r2=196802&view=diff
>>> ============================================================
>>> ==================
>>> --- compiler-rt/trunk/lib/asan/asan_linux.cc (original)
>>> +++ compiler-rt/trunk/lib/asan/asan_linux.cc Mon Dec  9 13:25:51 2013
>>> @@ -74,13 +74,6 @@ void GetPcSpBp(void *context, uptr *pc,
>>>     *pc = ucontext->uc_mcontext.gregs[REG_EIP];
>>>     *bp = ucontext->uc_mcontext.gregs[REG_EBP];
>>>     *sp = ucontext->uc_mcontext.gregs[REG_ESP];
>>> -# elif defined(__powerpc__) || defined(__powerpc64__)
>>> -  ucontext_t *ucontext = (ucontext_t*)context;
>>> -  *pc = ucontext->uc_mcontext.regs->nip;
>>> -  *sp = ucontext->uc_mcontext.regs->gpr[PT_R1];
>>> -  // The powerpc{,64}-linux ABIs do not specify r31 as the frame
>>> -  // pointer, but GCC always uses r31 when we need a frame pointer.
>>> -  *bp = ucontext->uc_mcontext.regs->gpr[PT_R31];
>>>   # elif defined(__sparc__)
>>>     ucontext_t *ucontext = (ucontext_t*)context;
>>>     uptr *stk_ptr;
>>>
>>> Modified: compiler-rt/trunk/lib/asan/asan_mapping.h
>>> URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/
>>> asan/asan_mapping.h?rev=196802&r1=196801&r2=196802&view=diff
>>> ============================================================
>>> ==================
>>> --- compiler-rt/trunk/lib/asan/asan_mapping.h (original)
>>> +++ compiler-rt/trunk/lib/asan/asan_mapping.h Mon Dec  9 13:25:51 2013
>>> @@ -61,7 +61,6 @@ static const u64 kDefaultShadowScale = 3
>>>   static const u64 kDefaultShadowOffset32 = 1ULL << 29;
>>>   static const u64 kDefaultShadowOffset64 = 1ULL << 44;
>>>   static const u64 kDefaultShort64bitShadowOffset = 0x7FFF8000;  // < 2G.
>>> -static const u64 kPPC64_ShadowOffset64 = 1ULL << 41;
>>>   static const u64 kMIPS32_ShadowOffset32 = 0x0aaa8000;
>>>     #if ASAN_FLEXIBLE_MAPPING_AND_OFFSET == 1
>>> @@ -81,9 +80,7 @@ extern "C" SANITIZER_INTERFACE_ATTRIBUTE
>>>   #     define SHADOW_OFFSET kDefaultShadowOffset32
>>>   #   endif
>>>   #  else
>>> -#   if defined(__powerpc64__)
>>> -#    define SHADOW_OFFSET kPPC64_ShadowOffset64
>>> -#   elif SANITIZER_MAC
>>> +#   if SANITIZER_MAC
>>>   #    define SHADOW_OFFSET kDefaultShadowOffset64
>>>   #   else
>>>   #    define SHADOW_OFFSET kDefaultShort64bitShadowOffset
>>>
>>> Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.h
>>> URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/
>>> sanitizer_common/sanitizer_common.h?rev=196802&r1=196801&
>>> r2=196802&view=diff
>>> ============================================================
>>> ==================
>>> --- compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.h (original)
>>> +++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.h Mon Dec
>>>  9 13:25:51 2013
>>> @@ -27,11 +27,7 @@ struct StackTrace;
>>>   const uptr kWordSize = SANITIZER_WORDSIZE / 8;
>>>   const uptr kWordSizeInBits = 8 * kWordSize;
>>>   -#if defined(__powerpc__) || defined(__powerpc64__)
>>> -const uptr kCacheLineSize = 128;
>>> -#else
>>>   const uptr kCacheLineSize = 64;
>>> -#endif
>>>     const uptr kMaxPathLength = 512;
>>>
>>> Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_
>>> internal_defs.h
>>> URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/
>>> sanitizer_common/sanitizer_internal_defs.h?rev=196802&r1=
>>> 196801&r2=196802&view=diff
>>> ============================================================
>>> ==================
>>> --- compiler-rt/trunk/lib/sanitizer_common/sanitizer_internal_defs.h
>>> (original)
>>> +++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_internal_defs.h
>>> Mon Dec  9 13:25:51 2013
>>> @@ -58,13 +58,6 @@ typedef signed   long long sptr;  // NOL
>>>   typedef unsigned long uptr;  // NOLINT
>>>   typedef signed   long sptr;  // NOLINT
>>>   #endif  // defined(_WIN64)
>>> -#if defined(__x86_64__)
>>> -// Since x32 uses ILP32 data model in 64-bit hardware mode,  we must use
>>> -// 64-bit pointer to unwind stack frame.
>>> -typedef unsigned long long uhwptr;  // NOLINT
>>> -#else
>>> -typedef uptr uhwptr;   // NOLINT
>>> -#endif
>>>   typedef unsigned char u8;
>>>   typedef unsigned short u16;  // NOLINT
>>>   typedef unsigned int u32;
>>>
>>> Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_
>>> platform_limits_posix.h
>>> URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/
>>> sanitizer_common/sanitizer_platform_limits_posix.h?rev=
>>> 196802&r1=196801&r2=196802&view=diff
>>> ============================================================
>>> ==================
>>> --- compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.h
>>> (original)
>>> +++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.h
>>> Mon Dec  9 13:25:51 2013
>>> @@ -142,32 +142,23 @@ namespace __sanitizer {
>>>       int gid;
>>>       int cuid;
>>>       int cgid;
>>> -#ifdef __powerpc__
>>> +#ifdef __powerpc64__
>>>       unsigned mode;
>>>       unsigned __seq;
>>> -    u64 __unused1;
>>> -    u64 __unused2;
>>>   #else
>>>       unsigned short mode;
>>>       unsigned short __pad1;
>>>       unsigned short __seq;
>>>       unsigned short __pad2;
>>> -#if defined(__x86_64__) && !defined(_LP64)
>>> -    u64 __unused1;
>>> -    u64 __unused2;
>>> -#else
>>> -    unsigned long __unused1;
>>> -    unsigned long __unused2;
>>> -#endif
>>>   #endif
>>> +    uptr __unused1;
>>> +    uptr __unused2;
>>>     };
>>>       struct __sanitizer_shmid_ds {
>>>       __sanitizer_ipc_perm shm_perm;
>>>     #ifndef __powerpc__
>>>       uptr shm_segsz;
>>> -  #elif !defined(__powerpc64__)
>>> -    uptr __unused0;
>>>     #endif
>>>       uptr shm_atime;
>>>     #ifndef _LP64
>>> @@ -299,20 +290,17 @@ namespace __sanitizer {
>>>     typedef long __sanitizer_clock_t;
>>>     #if SANITIZER_LINUX
>>> -#if defined(_LP64) || defined(__x86_64__) || defined(__powerpc__)
>>> +#if defined(_LP64) || defined(__x86_64__)
>>>     typedef unsigned __sanitizer___kernel_uid_t;
>>>     typedef unsigned __sanitizer___kernel_gid_t;
>>> +  typedef long long __sanitizer___kernel_off_t;
>>>   #else
>>>     typedef unsigned short __sanitizer___kernel_uid_t;
>>>     typedef unsigned short __sanitizer___kernel_gid_t;
>>> -#endif
>>> -#if defined(__x86_64__) && !defined(_LP64)
>>> -  typedef long long __sanitizer___kernel_off_t;
>>> -#else
>>>     typedef long __sanitizer___kernel_off_t;
>>>   #endif
>>>   -#if defined(__powerpc__)
>>> +#if defined(__powerpc64__)
>>>     typedef unsigned int __sanitizer___kernel_old_uid_t;
>>>     typedef unsigned int __sanitizer___kernel_old_gid_t;
>>>   #else
>>>
>>> Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace.cc
>>> URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/
>>> sanitizer_common/sanitizer_stacktrace.cc?rev=196802&r1=
>>> 196801&r2=196802&view=diff
>>> ============================================================
>>> ==================
>>> --- compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace.cc
>>> (original)
>>> +++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace.cc Mon
>>> Dec  9 13:25:51 2013
>>> @@ -24,10 +24,7 @@ uptr StackTrace::GetPreviousInstructionP
>>>     // Cancel Thumb bit.
>>>     pc = pc & (~1);
>>>   #endif
>>> -#if defined(__powerpc__) || defined(__powerpc64__)
>>> -  // PCs are always 4 byte aligned.
>>> -  return pc - 4;
>>> -#elif defined(__sparc__)
>>> +#if defined(__sparc__)
>>>     return pc - 8;
>>>   #else
>>>     return pc - 1;
>>> @@ -128,29 +125,21 @@ void StackTrace::FastUnwindStack(uptr pc
>>>     }
>>>     trace[0] = pc;
>>>     size = 1;
>>> -  uhwptr *frame = (uhwptr *)bp;
>>> -  uhwptr *prev_frame = frame - 1;
>>> +  uptr *frame = (uptr *)bp;
>>> +  uptr *prev_frame = frame - 1;
>>>     if (stack_top < 4096) return;  // Sanity check for stack top.
>>>     // Avoid infinite loop when frame == frame[0] by using frame >
>>> prev_frame.
>>>     while (frame > prev_frame &&
>>> -         frame < (uhwptr *)stack_top - 2 &&
>>> -         frame > (uhwptr *)stack_bottom &&
>>> +         frame < (uptr *)stack_top - 2 &&
>>> +         frame > (uptr *)stack_bottom &&
>>>            IsAligned((uptr)frame, sizeof(*frame)) &&
>>>            size < max_depth) {
>>> -    uhwptr pc1 = frame[1];
>>> +    uptr pc1 = frame[1];
>>>       if (pc1 != pc) {
>>> -      trace[size++] = (uptr) pc1;
>>> +      trace[size++] = pc1;
>>>       }
>>>       prev_frame = frame;
>>> -    frame = (uhwptr *)frame[0];
>>> -  }
>>> -}
>>> -
>>> -void StackTrace::PopStackFrames(uptr count) {
>>> -  CHECK(size >= count);
>>> -  size -= count;
>>> -  for (uptr i = 0; i < size; i++) {
>>> -    trace[i] = trace[i + count];
>>> +    frame = (uptr*)frame[0];
>>>     }
>>>   }
>>>
>>> Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace.h
>>> URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/
>>> sanitizer_common/sanitizer_stacktrace.h?rev=196802&r1=
>>> 196801&r2=196802&view=diff
>>> ============================================================
>>> ==================
>>> --- compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace.h
>>> (original)
>>> +++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace.h Mon
>>> Dec  9 13:25:51 2013
>>> @@ -68,7 +68,6 @@ struct StackTrace {
>>>     void FastUnwindStack(uptr pc, uptr bp, uptr stack_top, uptr
>>> stack_bottom,
>>>                          uptr max_depth);
>>>     void SlowUnwindStack(uptr pc, uptr max_depth);
>>> -  void PopStackFrames(uptr count);
>>>     uptr LocatePcInTrace(uptr pc);
>>>   };
>>>
>>>
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>>
>>
>> --
>> http://www.nuanti.com
>> the browser experts
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131219/1539e10e/attachment.html>


More information about the llvm-commits mailing list