bug-glibc
[Top][All Lists]
Advanced

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

Re: BUG: printf formatting libc.so.6


From: Petr Vandrovec
Subject: Re: BUG: printf formatting libc.so.6
Date: Mon, 26 May 2003 19:01:00 +0200

On 26 May 03 at 9:48, Bruce Korb wrote:
> Andreas Schwab wrote:
> > |> > |> /* This program fails */
> > |> >
> > |> > No, it doesn't.
> > |>
> > |> Yes, it does:
> > 
> > Works for me.
> 
> Then it must be a bug fixed since SuSE 8.2 was cut.
> I certainly do not update libc frequently.  I do
> it with installations only.  So, more specifically,
> does it work for you on a vanilla SuSE 8.2?   If so,
> then what conceivable environmental issue might cause
> the problem?  Thank you. - Bruce

Do not worry... I tried latest Debian unstable (glibc 2.3.1-17)
and RedHat (glibc 2.3.2-41), and neither works (and actually
RH's 2.3.2's output is worse than debian's 2.3.1).

Simplified

#include <stdio.h>
void main(void) { printf("%1$d %1$c %2$d %2$c\n", 32, 49); }

yields "32   1074178865 1" on Debian, while "1345134440   -1073746895 1"
on RedHat... 

In all cases low byte of %d is correct, but upper 3 bytes are corrupted
by some garbage.

Both RH's and Debian's glibcs were compiled by gcc-3.2.3. Maybe this is
a culprit? Observed behavior looks like some strange pointer aliasing 
issue to me.
                                    Best regards,
                                        Petr Vandrovec
                                        address@hidden
                                        





reply via email to

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