[parisc-linux] glibc 2.2.3: setjmp/longjmp

Matthew Wilcox matthew@wil.cx
Fri, 4 May 2001 23:36:55 +0100


On Fri, May 04, 2001 at 05:51:59PM -0400, John David Anglin wrote:
> > On Fri, May 04, 2001 at 05:31:30PM -0400, John David Anglin wrote:
> > > Doesn't look like _setjmp comes back at all.  Put a break on ea18
> > > and start stepping.  It might help to do a static link.
> > 
> > this code is in the dynamic linker :-))
> 
> Can you set a break on main, run to main, set the break in the
> dynamic linker, then continue?

No, though this is probably due more to my lack of skill with gdb than
anything else.

I set a breakpoint on _dl_signal_error ok.
Then inspecting the jmpbuf indicates that it's returning to 4101434f

/proc/<pid>/maps indicates:
0000000041000000-000000004101a000 r-xp 0000000000000000 08:03 1754026    /home/willy/cvs/glibc-build/elf/ld.so

objdump --disassemble shows:

000143e0 <index>:
...
   143f4:       6b d3 3f c1     stw r19,-20(sr0,sp)

which is the middle of nowhere.  Actually, it's right _after_ __longjmp.
clearly it should be returning to 4100ea4c

Going back and setting a breakpoint on _dl_catch_error indicates that the
value being put at ((unsigned long *)c.env)[20] is 0x4101434F, so the jmpbuf
isn't being corrupted...

-- 
Revolutions do not require corporate support.