Subject: Code generation error? printf problem?
To: None <port-mips@netbsd.org>
From: Erik Bertelsen <erik@mediator.uni-c.dk>
List: port-mips
Date: 01/31/1999 17:34:08
Hello,

I have recently (i.e. within the last week or so) observed
a problem on my pmax which manifests itself as an apparent printf
failure where the two digits '10' are printed as one ':'
(also observing that : follows 9 in Latin-1/ASCII).

One example is from disklabel:


# disklabel -i rz3
partition> c
Filesystem type [4.2BSD]: 
Start offset [0c, 0s, 0M]: 
Partition size [2570c, 2050860s, :01.396M]: 
partition> Q

The max partition size shows up as :01.396M instead of the expected
1001.396M, cf. the dmesg output below:

rz3 at asc0 drive 3 slave 0 DEC RZ26     (C) DEC rev T386
rz3: 1001MB, 2570 cyl, 14 head, 57 sec, 512 bytes/sect x 2050860 sectors

Furthermore I have not been able to install perl recently, because the
generation of a file (POSIX.c) from another one (POSIX.xs) has two
instances of a : where the numeral 10 is expected. I don't know
definitely when this (relatively rare) problem first appeared.

In disklabel, the megabyte size is printed with a %g format, and in
POSIX.c, I expect that the :/10 error is also printf-generated, but
I have not verified this.

I have only seen this on my DECStation running NetBSD/pmax-current as
of yesterday, with libc completely rebuilt today, and with most .o
files of egcs compiled yesterday, but the generated files are older.

I'll make a complete rebuild of egcs in a few minutes, which will
keep the machine occupied for some time :-)

As I have only seen this on the pmax, I suspect a compiler bug,
but of course I have erred before and I may err here as well...

Any comments ?

Erik Bertelsen