[uClibc]setjmp() and dynamic loading segfault

Erik Andersen andersen at lineo.com
Mon Mar 5 18:52:40 UTC 2001


On Mon Mar 05, 2001 at 07:33:57PM +0200, michaels at jungo.com wrote:
> Hi,
> 
> Seems like the mystery is solved: the symbols (__sigsetjmp and __setjmp)
> were not defined as functions in *.S, and as a result dynamic linker did
> not do the correct resolve for __sigjmp_save (which is in libuClibc) but
> silently continue execution until the end of program's address space,
> causing segfault at its end. Symptom: the symbol __sigsetjmp was mapped
> to .bss (!!!) and not *UND* as usual. 
> 
> Quick fix: define the symbol's type to be function and then in dynamic
> table it is correctly resolved for the binary. 
> 
> Patch attached. I also corrected several other *.S to reflect this bug
> correction.

Ahh.  Excellent work tracking this one down.  In hindsight, this is obvious,
but when I spent a while looking for this bug last night, it was very very
non-obvious.  Good spotting!  Thanks!

 -Erik

--
Erik B. Andersen   email:  andersen at lineo.com
--This message was written using 73% post-consumer electrons--





More information about the uClibc mailing list