Hi!

On Fri, 22 Jul 2011 15:48:29 +0200, [email protected] wrote:
> The attached patch fixes stack switching in init-first.c when cthreads
> are used (this is for code compiled with a cross-GCC 4.5.1 for
> i586-pc-gnu; Debian GNU/Hurd uses an older GCC and is not affected.)
> 
> With this compiler, ‘data[-1]’ does not point to the return address.
> Thus, ‘switch_stacks’ would never be called, which breaks TLS.
> 
> It seems to me that using ‘data[-1]’ here was fragile in the presence of
> nested functions, inlining, and tail-call optimizations.

If for sure is ugly enough...  :-)

This patch is to be put on top of our TopGit t/init-first.c branch, I
guess, which itself is not yet in the sourceware repository, I think?


Grüße,
 Thomas

Attachment: pgpVfC4H8iIPV.pgp
Description: PGP signature

Reply via email to