This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: gcc bug impacts glibc cvs
On Mon, Mar 12, 2001 at 02:18:07PM -0800, Ulrich Drepper wrote:
> Daniel Jacobowitz <dmj+@andrew.cmu.edu> writes:
>
> > extern void *xyzzy __attribute__ ((__weak__));
> > int
> > main (void)
> > {
> > return &xyzzy ? ((int)xyzzy) : 0;
> > }
>
> This works just fine on x86 as well. In fact I have never seen this
> problem on x86.
If you look at the generated assembler on both, you'll see why - I'm
betting that short forward branches are cheap on x86, while even
correctly predicted they're a bit harsher on PowerPC, so we go out of
our way to avoid them.
> > While it's certainly a bit too fragile of a test, could we at least use
> > this to autoconf for the bug until someone thinks of a better one?
>
> If this is what exposes the problem, sure.
Shall I make up the patch, then? Or you, Franz?
--
Daniel Jacobowitz Debian GNU/Linux Developer
Monta Vista Software Debian Security Team
"I am croutons!"