glibc/0011-mips-terminate-the-FDE-before-the-return-trampoline-.patch

44 lines
1.2 KiB
Diff
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

2016-03-09 Aurelien Jarno <aurelien@aurel32.net>
[BZ #19792]
* sysdeps/unix/sysv/linux/mips/makecontext.S (__makecontext):
Terminate FDE before return label.
Index: glibc-2.23/NEWS
===================================================================
--- glibc-2.23.orig/NEWS
+++ glibc-2.23/NEWS
@@ -14,6 +14,7 @@ Security related changes:
The following bugs are resolved with this release:
[19679] gcc-4.9.3 C++ exception handling broken due to unaligned stack
+ [19792] MIPS: backtrace yields infinite backtrace with makecontext
Version 2.23
Index: glibc-2.23/sysdeps/unix/sysv/linux/mips/makecontext.S
===================================================================
--- glibc-2.23.orig/sysdeps/unix/sysv/linux/mips/makecontext.S
+++ glibc-2.23/sysdeps/unix/sysv/linux/mips/makecontext.S
@@ -153,6 +153,11 @@ NESTED (__makecontext, FRAMESZ, ra)
#endif
jr ra
+ /* We need to terminate the FDE to stop unwinding if backtrace was
+ called within a context created by makecontext. */
+ cfi_endproc
+ nop
+
99:
#ifdef __PIC__
move gp, s1
@@ -186,6 +191,8 @@ NESTED (__makecontext, FRAMESZ, ra)
1:
lb zero, (zero)
b 1b
+
+ cfi_startproc
PSEUDO_END (__makecontext)
weak_alias (__makecontext, makecontext)