[llvm-branch-commits] [compiler-rt-branch] r197011 - Merging r196802:
Bill Wendling
isanbard at gmail.com
Tue Dec 10 22:24:53 PST 2013
Author: void
Date: Wed Dec 11 00:24:52 2013
New Revision: 197011
URL: http://llvm.org/viewvc/llvm-project?rev=197011&view=rev
Log:
Merging r196802:
------------------------------------------------------------------------
r196802 | chandlerc | 2013-12-09 11:25:51 -0800 (Mon, 09 Dec 2013) | 11 lines
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/branches/release_34/ (props changed)
compiler-rt/branches/release_34/lib/asan/asan_linux.cc
compiler-rt/branches/release_34/lib/asan/asan_mapping.h
compiler-rt/branches/release_34/lib/sanitizer_common/sanitizer_common.h
compiler-rt/branches/release_34/lib/sanitizer_common/sanitizer_internal_defs.h
compiler-rt/branches/release_34/lib/sanitizer_common/sanitizer_stacktrace.cc
compiler-rt/branches/release_34/lib/sanitizer_common/sanitizer_stacktrace.h
Propchange: compiler-rt/branches/release_34/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Dec 11 00:24:52 2013
@@ -1 +1 @@
-/compiler-rt/trunk:195427,195433-195434,195436,195442,195570,195642-195643,195652,195791,196501,196612,196799,196809
+/compiler-rt/trunk:195427,195433-195434,195436,195442,195570,195642-195643,195652,195791,196501,196612,196799,196802,196809
Modified: compiler-rt/branches/release_34/lib/asan/asan_linux.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/branches/release_34/lib/asan/asan_linux.cc?rev=197011&r1=197010&r2=197011&view=diff
==============================================================================
--- compiler-rt/branches/release_34/lib/asan/asan_linux.cc (original)
+++ compiler-rt/branches/release_34/lib/asan/asan_linux.cc Wed Dec 11 00:24:52 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/branches/release_34/lib/asan/asan_mapping.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/branches/release_34/lib/asan/asan_mapping.h?rev=197011&r1=197010&r2=197011&view=diff
==============================================================================
--- compiler-rt/branches/release_34/lib/asan/asan_mapping.h (original)
+++ compiler-rt/branches/release_34/lib/asan/asan_mapping.h Wed Dec 11 00:24:52 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 SANITIZER_INTERFACE_ATTRIBUTE upt
# 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/branches/release_34/lib/sanitizer_common/sanitizer_common.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/branches/release_34/lib/sanitizer_common/sanitizer_common.h?rev=197011&r1=197010&r2=197011&view=diff
==============================================================================
--- compiler-rt/branches/release_34/lib/sanitizer_common/sanitizer_common.h (original)
+++ compiler-rt/branches/release_34/lib/sanitizer_common/sanitizer_common.h Wed Dec 11 00:24:52 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/branches/release_34/lib/sanitizer_common/sanitizer_internal_defs.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/branches/release_34/lib/sanitizer_common/sanitizer_internal_defs.h?rev=197011&r1=197010&r2=197011&view=diff
==============================================================================
--- compiler-rt/branches/release_34/lib/sanitizer_common/sanitizer_internal_defs.h (original)
+++ compiler-rt/branches/release_34/lib/sanitizer_common/sanitizer_internal_defs.h Wed Dec 11 00:24:52 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/branches/release_34/lib/sanitizer_common/sanitizer_stacktrace.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/branches/release_34/lib/sanitizer_common/sanitizer_stacktrace.cc?rev=197011&r1=197010&r2=197011&view=diff
==============================================================================
--- compiler-rt/branches/release_34/lib/sanitizer_common/sanitizer_stacktrace.cc (original)
+++ compiler-rt/branches/release_34/lib/sanitizer_common/sanitizer_stacktrace.cc Wed Dec 11 00:24:52 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/branches/release_34/lib/sanitizer_common/sanitizer_stacktrace.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/branches/release_34/lib/sanitizer_common/sanitizer_stacktrace.h?rev=197011&r1=197010&r2=197011&view=diff
==============================================================================
--- compiler-rt/branches/release_34/lib/sanitizer_common/sanitizer_stacktrace.h (original)
+++ compiler-rt/branches/release_34/lib/sanitizer_common/sanitizer_stacktrace.h Wed Dec 11 00:24:52 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);
};
More information about the llvm-branch-commits
mailing list