[llvm-commits] [compiler-rt] r169141 - in /compiler-rt/trunk/lib: asan/asan_linux.cc sanitizer_common/sanitizer_stacktrace.cc
Kostya Serebryany
kcc at google.com
Mon Dec 3 10:39:22 PST 2012
Author: kcc
Date: Mon Dec 3 12:39:21 2012
New Revision: 169141
URL: http://llvm.org/viewvc/llvm-project?rev=169141&view=rev
Log:
[asan] two more bits for __sparc__
Modified:
compiler-rt/trunk/lib/asan/asan_linux.cc
compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace.cc
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=169141&r1=169140&r2=169141&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_linux.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_linux.cc Mon Dec 3 12:39:21 2012
@@ -158,7 +158,9 @@
stack->trace[0] = pc;
if ((max_s) > 1) {
stack->max_size = max_s;
-#if defined(__arm__) || defined(__powerpc__) || defined(__powerpc64__)
+#if defined(__arm__) || \
+ defined(__powerpc__) || defined(__powerpc64__) || \
+ defined(__sparc__)
_Unwind_Backtrace(Unwind_Trace, stack);
// Pop off the two ASAN functions from the backtrace.
stack->PopStackFrames(2);
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=169141&r1=169140&r2=169141&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace.cc Mon Dec 3 12:39:21 2012
@@ -36,6 +36,8 @@
#if defined(__powerpc__) || defined(__powerpc64__)
// PCs are always 4 byte aligned.
return pc - 4;
+#elif defined(__sparc__)
+ return pc - 8;
#else
return pc - 1;
#endif
More information about the llvm-commits
mailing list