This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] mips: terminate the FDE before the return trampoline in makecontext


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]