[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [HURD, PATCH] Fix stack switching at initialization time

From: Thomas Schwinge
Subject: Re: [HURD, PATCH] Fix stack switching at initialization time
Date: Fri, 22 Jul 2011 16:09:11 +0200
User-agent: Notmuch/0.5-77-g335dd52 (http://notmuchmail.org) Emacs/23.2.1 (i486-pc-linux-gnu)


On Fri, 22 Jul 2011 15:48:29 +0200, ludo@gnu.org 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?


Attachment: pgpIAarHB_7yp.pgp
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]