Re: [patch] Re: longjmp handling vs. glibc LD_POINTER_GUARD problems

Ulrich Weigand
2008-05-22T00:14:51Z

Pedro Alves wrote:

> Seeing this, I was thinking of:
> - recording the longjmp frame when the longjmp breakpoint is hit
> - single-step until the longjmp frame is gone (going to return to setjmp --
> SP/FP changing)
> - single-step until this new current frame is gone.

During the time longjmp reloads the registers, I now don't think
we can trust the frame at all; this is even worse that during
regular function epilogues.

I think one heuristics might be that as soon as we notice odd
things to happen to the frame, we step until we reach the end
of the current *function* (i.e. look only at the PC).

> But, x86 doesn't show any promise on that... The first time
> we stop seeing the longjmp frame on the frame stack is much
> earlier than the exit of longjmp:
>
> #0 0xf7e201d8 in ?? () from /lib32/libc.so.6
> #1 0x00000001 in ?? ()

So what's happening there? Is this some unrelated unwinder
failure?

Bye,
Ulrich

--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com