Fix for failing test-setjmp
On Mon, Nov 14, 2011 at 5:02 PM, Paul Pluzhnikov <ppluzhnikov@google.com> wrote:
> P.S. test-setjmp is failing for me (before or after the patch).
> When I enable assertions (to confirm my new assertions are correct), I see:
>
> lt-test-setjmp: ../../src/dwarf/Gparser.c:754: apply_reg_state: \
> Assertion `rs->reg[17].where == DWARF_WHERE_EXPR' failed.
>
> which likely explains that failure.
The problem is actually two-fold:
First, the loops in {sig,}longjmp.c are "do { ... } while (unw_step() >= 0);"
But unw_step() returns 0 on reaching the end of the chain (_start),
and the loop should stop there.
The second problem is that with this commit:
http://repo.or.cz/w/glibc.git/commitdiff/c67da0b50e3d20f89d7bb352cd67dcf66d808e50
glibc obfuscates value of SP in jmp_buf, so we might as well just give up.
Patch attached.
Thanks,
--
Paul Pluzhnikov
2 files changed