cdb on Mac OS X: problem with uint32?
Malte Tancred <[email protected]> Sun, 4 May 2003 21:08:37 +0200
| Newsgroups | gmane.org.djb.miscellaneous |
|---|---|
| Message-ID | <[email protected]> |
Hi!
I decided to find out why some of the cdb-0.75 rts didn't pass on
Mac OS X 10.2.5 Build 6L29. After a bit of debugging I've come up
with the following patch to cdbtest.c:
diff ../xx/cdb-0.75/cdbtest.c ./cdbtest.c
79a92,94
> putnum("eod: ",eod);
> putnum("pos: ",pos);
> putflush();
85a101,105
> putnum("pos: ",pos);
> putnum("untested so far: ",numuntested);
> putnum("klen: ",klen);
> putnum("dlen: ",dlen);
> putflush();
Manually running one of the tests from rts.tests produce the
following output on my installation of Mac OS X:
$ ./cdbtest < random.cdb
eod: 33920
pos: 4
pos: 8495
untested so far: 0
klen: 8724480
dlen: 0
cdbtest: fatal: unable to read input: truncated file
Running the same test on FreeBSD produce this output:
$ ./cdbtest < random.cdb
eod: 33920
pos: 4
found: 100
different record: 0
bad length: 0
not found: 0
untested: 0
I did performed more extensive loggings before this stripped
down version, and up until the huge key reported on the mac
the output did not differ.
Any clue what might be the problem? Some conflict with the
uint32 type definition?
I welcome whatever idea or hint you might have.
Thank you for your time,
Malte