This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] mips: terminate the FDE before the return trampoline in makecontext
- From: Aurelien Jarno <aurelien at aurel32 dot net>
- To: "Maciej W. Rozycki" <macro at imgtec dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Wed, 23 Mar 2016 07:41:52 +0100
- Subject: Re: [PATCH] mips: terminate the FDE before the return trampoline in makecontext
- Authentication-results: sourceware.org; auth=none
- References: <1457509993-2393-1-git-send-email-aurelien at aurel32 dot net> <alpine dot DEB dot 2 dot 00 dot 1603222100420 dot 9427 at tp dot orcam dot me dot uk>
On 2016-03-22 21:01, Maciej W. Rozycki wrote:
> On Wed, 9 Mar 2016, Aurelien Jarno wrote:
>
> > diff --git a/sysdeps/unix/sysv/linux/mips/makecontext.S b/sysdeps/unix/sysv/linux/mips/makecontext.S
> > index 66600c7..3196554 100644
> > --- a/sysdeps/unix/sysv/linux/mips/makecontext.S
> > +++ b/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:
>
> What's this NOP needed for here?
We have to separate these to blocks because the unwinder uses ra-1 to
find the FDE.
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurelien@aurel32.net http://www.aurel32.net