* [commit] Fix overly strict check in arm_skip_stack_protector
@ 2011-02-03 18:37 Ulrich Weigand
0 siblings, 0 replies; only message in thread
From: Ulrich Weigand @ 2011-02-03 18:37 UTC (permalink / raw)
To: gdb-patches; +Cc: yao
Hello,
the stack protector skipping code didn't work for me because the stack
guard symbol is named __stack_chk_guard@@GLIBC_2.4, but the check in
arm_skip_stack_protector only accepts __stack_chk_guard.
Note that the comment already suggests that any symbol whose name *starts*
with __stack_chk_guard ought to be accepted, so I'm simply changing the
code to match the comment.
Tested on armv7l-linux-gnueabi, fixes all gdb.mi/gdb792.exp failures.
Committed to mainline.
Bye,
Ulrich
ChangeLog:
* arm-tdep.c (arm_skip_stack_protector): Accept any symbol that
starts with __stack_chk_guard as stack guard symbol.
diff -urNp gdb-orig/gdb/arm-tdep.c gdb-head/gdb/arm-tdep.c
--- gdb-orig/gdb/arm-tdep.c 2011-02-02 19:44:56.000000000 +0000
+++ gdb-head/gdb/arm-tdep.c 2011-02-03 17:52:22.000000000 +0000
@@ -1296,7 +1296,8 @@ arm_skip_stack_protector(CORE_ADDR pc, s
instruction sequence is not for stack protector. If symbol is
removed, we conservatively think this sequence is for stack protector. */
if (stack_chk_guard
- && strcmp (SYMBOL_LINKAGE_NAME(stack_chk_guard), "__stack_chk_guard"))
+ && strncmp (SYMBOL_LINKAGE_NAME (stack_chk_guard), "__stack_chk_guard",
+ strlen ("__stack_chk_guard")) != 0)
return pc;
if (is_thumb)
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-02-03 18:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-03 18:37 [commit] Fix overly strict check in arm_skip_stack_protector Ulrich Weigand
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).