mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
mips: terminate the FDE before the return trampoline in makecontext
In makecontext the FDE needs to be terminated before the return
trampoline otherwise backtrace called within a context created by
makecontext yields infinite backtrace.
This bug has been present for a long time, stdlib/tst-makecontext did
not fail until recent commit e535ce25
. Tested on mips-linux-gnu and
mips64el-linux-gnuabi64 and mips-linux-gnu, no regression.
This fixes stdlib/tst-makecontext on MIPS.
Changelog:
[BZ #19792]
* sysdeps/unix/sysv/linux/mips/makecontext.S (__makecontext):
Terminate FDE before return label.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2016-03-09 Aurelien Jarno <aurelien@aurel32.net>
|
||||||
|
|
||||||
|
[BZ #19792]
|
||||||
|
* sysdeps/unix/sysv/linux/mips/makecontext.S (__makecontext):
|
||||||
|
Terminate FDE before return label.
|
||||||
|
|
||||||
2016-03-09 Joseph Myers <joseph@codesourcery.com>
|
2016-03-09 Joseph Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
[BZ #19790]
|
[BZ #19790]
|
||||||
|
@ -153,6 +153,11 @@ NESTED (__makecontext, FRAMESZ, ra)
|
|||||||
#endif
|
#endif
|
||||||
jr ra
|
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:
|
99:
|
||||||
#ifdef __PIC__
|
#ifdef __PIC__
|
||||||
move gp, s1
|
move gp, s1
|
||||||
@ -186,6 +191,8 @@ NESTED (__makecontext, FRAMESZ, ra)
|
|||||||
1:
|
1:
|
||||||
lb zero, (zero)
|
lb zero, (zero)
|
||||||
b 1b
|
b 1b
|
||||||
|
|
||||||
|
cfi_startproc
|
||||||
PSEUDO_END (__makecontext)
|
PSEUDO_END (__makecontext)
|
||||||
|
|
||||||
weak_alias (__makecontext, makecontext)
|
weak_alias (__makecontext, makecontext)
|
||||||
|
Reference in New Issue
Block a user