This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH v2 5/6] Libsanitizer merge from upstream r250806 (was r249633).
- From: Maxim Ostapenko <m dot ostapenko at partner dot samsung dot com>
- To: Jakub Jelinek <jakub at redhat dot com>, Kostya Serebryany <kcc at google dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Dmitry Vyukov <dvyukov at google dot com>, Marek Polacek <polacek at redhat dot com>, Yury Gribov <y dot gribov at samsung dot com>, Slava Garbuzov <v dot garbuzov at samsung dot com>, Vyacheslav Barinov <v dot barinov at samsung dot com>
- Date: Tue, 20 Oct 2015 14:27:38 +0300
- Subject: [PATCH v2 5/6] Libsanitizer merge from upstream r250806 (was r249633).
- Authentication-results: sourceware.org; auth=none
- References: <56262292 dot 3030803 at partner dot samsung dot com>
This patch adjusts the fix for
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61771 to extract the last
PC from the stack frame if no valid FP is available for ARM. The patch
was preapproved here:
(https://gcc.gnu.org/ml/gcc-patches/2015-10/msg01217.html).
2015-10-20 Maxim Ostapenko <m.ostapenko@partner.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.
Index: libsanitizer/sanitizer_common/sanitizer_stacktrace.cc
===================================================================
--- libsanitizer/sanitizer_common/sanitizer_stacktrace.cc (revision 250059)
+++ libsanitizer/sanitizer_common/sanitizer_stacktrace.cc (working copy)
@@ -62,8 +62,8 @@
// 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