segfault using _Unwind_ForcedUnwind()
Oliver Kowalke
oliver.kowalke@gmx.de
Fri Mar 30 17:41:00 GMT 2012
Am 30.03.2012 17:08, schrieb Ian Lance Taylor:
> "Oliver Kowalke"<oliver.kowalke@gmx.de> writes:
>
>> I get a segfault with following app - could you verify this?
> This program works fine for me (gcc 4.4.3, glibc 2.11.1, Ubuntu Lucid)
> in 64-bit mode. But now I see that you are using 32-bit mode. I can
> confirm that the program crashes for me in that mode.
>
> Looking at the 32-bit implementation of makecontext in glibc, I can see
> that the problem is that it doesn't set up correct unwind information
> for the parameters pushed on the stack. The effect is that the first
> parameter on the stack appears to be a PC value. I think this is a bug
> in glibc. It should be possible to arrange for unwind information which
> skips %ebx words on the stack.
>
> Ian
>
I think the test app is not correct - on ppc32/linux it never returns.
Could you give me some hint how the stack unwind information is usally
writen on the stack/else where (some architectures do not save the
return address on the stack).
I believe the code is somewhere in the gcc sources - unfortunately I
don't know where (for what to grep for?)!
regards,
Oliver
More information about the Gcc-help
mailing list