gcc 4.1.2 miscompiles uClibc 0.9.32

Rich Felker dalias at aerifal.cx
Thu Sep 15 15:06:28 UTC 2011


On Thu, Sep 15, 2011 at 05:01:16PM +0200, Denys Vlasenko wrote:
> > which results in a "call 0" and a segfault at exit
> > if you do not happen to link in stdio.
> >
> > Presumably gcc believes _stdio_term to be a non-zero constant.
> 
> Yes, it does. Apparently C standard says function address is never NULL.
> 
> > Setting -O0 produces a sane exit.os and a usable library.
> 
> I committed a fix which uses:
> [...]

Have you read my reply? I believe it's a better approach to handling
this kind of issue, but I'm not sure if you'd agree.

Rich


More information about the uClibc mailing list