this is a forward from gcc bugzilla: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36568 afaics the glibc-2.8 is affected and there's a patch provided in debian/ubuntu distro. could you please verify and commit linked patch?
I see no problem with the current code: $ ./a threaded 0x804886d handler+0x1a 0x11f400 __kernel_sigreturn+0x0 0x804888b crash+0x10 0x1ff20e clone+0x5e
(In reply to comment #1) > I see no problem with the current code: > > $ ./a threaded > 0x804886d handler+0x1a > 0x11f400 __kernel_sigreturn+0x0 > 0x804888b crash+0x10 > 0x1ff20e clone+0x5e which kernel/glibc/gcc/distribution you are using?
(In reply to comment #1) > I see no problem with the current code: > > $ ./a threaded > 0x804886d handler+0x1a > 0x11f400 __kernel_sigreturn+0x0 > 0x804888b crash+0x10 > 0x1ff20e clone+0x5e did you test it on the x86_64 architecture? i'm asking because your logs shows 32-bits addresses and the problem exist only on x86_64.
Not reproducible.