This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [HURD, PATCH] Fix stack switching at initialization time
- From: ludo at gnu dot org (Ludovic Courtès)
- To: Thomas Schwinge <thomas at schwinge dot name>
- Cc: bug-hurd at gnu dot org, libc-alpha at sourceware dot org
- Date: Fri, 16 Sep 2011 23:19:31 +0200
- Subject: Re: [HURD, PATCH] Fix stack switching at initialization time
- References: <87livqctoy.fsf@gnu.org><87r55ih0fs.fsf@kepler.schwinge.homeip.net> <877h7a9us7.fsf@gnu.org><87k498cqpl.fsf@kepler.schwinge.homeip.net>
Hi,
Thomas Schwinge <thomas@schwinge.name> skribis:
> On Fri, 22 Jul 2011 17:53:12 +0200, ludo@gnu.org wrote:
>> Pushed a slightly different version, thanks!
>>
>> http://git.savannah.gnu.org/cgit/hurd/glibc.git/commit/?h=t/init-first.c&id=53b56b1101fc9bb4f295f23f54e7e19f8da8da16
>
> Just a heads-up, and I'm afraid, but with this patch I get:
>
> $ ./testrun.sh ./libc.so
> Segmentation fault
>
> Undoing it (see below), I'm back in service:
>
> $ ./testrun.sh ./libc.so
> GNU C Library development release version 2.11.90, by Roland McGrath et al.
> [...]
>
> This is still based on 2010-04 glibc sources, GCC 4.4, and old binutils
> 2.20.1.
The patch solved a problem for me with GCC 4.5 and Binutils 2.21.
> Perhaps it'd really be best to write this in a few lines of assembly?
Perhaps.
OTOH, itâs really a compiler bug if __builtin_frame_address or
__builtin_return_address donât behave as advertised. It should
definitely be more reliable than fiddling with the address of local
variables.
Thanks,
Ludoâ.