Re: Stepping over longjmp presumably broken for glibc

Daniel Jacobowitz
2005-12-23T15:20:25Z

On Fri, Dec 23, 2005 at 05:16:53PM +0200, Eli Zaretskii wrote:
> > Date: Fri, 23 Dec 2005 08:20:40 -0500
> > From: Daniel Jacobowitz <drow@false.org>
> > Cc: gdb@sourceware.org
> >
> > > How does glibc restore the correct address when you call longjmp? Do
> > > they save the canary in some place, or something?
> >
> > Yes. However, where it is safed is not a public ABI, and varies wildly
> > by architecture; I wouldn't care to try to reverse it in GDB, personally.
>
> So how would you suggest to solve this?

If I'd had a good idea I'd have included it in my original post :-)

Probably, we need to single-step until we're out of longjmp, taking
special care of any architecture which calls functions from longjmp (I
don't know of any, but I bet there is one somewhere). I don't know if
we can do that without infrastructure changes or not.

--
Daniel Jacobowitz
CodeSourcery, LLC