summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchefmax <chefmax@138bc75d-0d04-0410-961f-82ee72b054a4>2016-11-08 22:07:50 +0000
committerDongkyun Son <dongkyun.s@samsung.com>2017-08-03 11:49:26 +0000
commitd3cbdccd2a752a93f62f1e6034f09f49dcea8ccd (patch)
treecc61fa82e7b42942161342a1ac37819f8c4a289a
parent3bbfa0f43c01ede12fdd546d6d1e4113b80a46a1 (diff)
downloadlinaro-gcc-d3cbdccd2a752a93f62f1e6034f09f49dcea8ccd.tar.gz
linaro-gcc-d3cbdccd2a752a93f62f1e6034f09f49dcea8ccd.tar.bz2
linaro-gcc-d3cbdccd2a752a93f62f1e6034f09f49dcea8ccd.zip
libsanitizer/
* sanitizer_common/sanitizer_stacktrace.cc (GetCanonicFrame): Assume we compiled code with GCC when extracting the caller PC for ARM if no valid frame pointer is available. Change-Id: Ic974dcb0800c15eabf74a2c78f791c6cedc1aa44 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@241980 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--libsanitizer/ChangeLog6
-rw-r--r--libsanitizer/sanitizer_common/sanitizer_stacktrace.cc4
2 files changed, 8 insertions, 2 deletions
diff --git a/libsanitizer/ChangeLog b/libsanitizer/ChangeLog
index c6b0d3ffd55..a4cba4e7983 100644
--- a/libsanitizer/ChangeLog
+++ b/libsanitizer/ChangeLog
@@ -1,5 +1,11 @@
2016-11-09 Maxim Ostapenko <m.ostapenko@samsung.com>
+ * sanitizer_common/sanitizer_stacktrace.cc (GetCanonicFrame): Assume we
+ compiled code with GCC when extracting the caller PC for ARM if no
+ valid frame pointer is available.
+
+2016-11-09 Maxim Ostapenko <m.ostapenko@samsung.com>
+
PR sanitizer/63958
Reapply:
2014-10-14 David S. Miller <davem@davemloft.net>
diff --git a/libsanitizer/sanitizer_common/sanitizer_stacktrace.cc b/libsanitizer/sanitizer_common/sanitizer_stacktrace.cc
index 531f256c048..cbb3af270b6 100644
--- a/libsanitizer/sanitizer_common/sanitizer_stacktrace.cc
+++ b/libsanitizer/sanitizer_common/sanitizer_stacktrace.cc
@@ -55,8 +55,8 @@ static inline uhwptr *GetCanonicFrame(uptr bp,
// Nope, this does not look right either. This means the frame after next does
// not have a valid frame pointer, but we can still extract the caller PC.
// Unfortunately, there is no way to decide between GCC and LLVM frame
- // layouts. Assume LLVM.
- return bp_prev;
+ // layouts. Assume GCC.
+ return bp_prev - 1;
#else
return (uhwptr*)bp;
#endif