BUG in inn-BETA-20000518 - is this fixed later?
David Luyer
david_luyer at pacific.net.au
Tue Jul 18 14:34:15 UTC 2000
I've been having problems with a history file which is approaching 4Gb in
size on a BSD/OS (intel) system.
On BSD/OS with 64-bit file sizes and 32-bit pointers;
include/qio.h:
#define QIOtell(qp) ((qp)->Count - ((qp)->End - (qp)->Start))
long count;
expire/makedbz.c:
for (where = QIOtell(qp); (p = QIOread(qp)) != NULL; where = QIOtell(qp)) {
switch (dbzstore(key, (OFFSET_T)where)) {
Result: 32-bit signed truncation. Fix: make count an off_t.
innd/his.c:
offset = ftell(HISwritefp);
BSD/OS ftell() returns a 32-bit value - fgetpos() returns a 64-bit value
but beware it may return an 8-byte structure rather than an off_t.
Result: 32-bit signed truncation. Fix: use fgetpos().
fseek() also has this problem eg: in expire/prunehistory.c,
which also uses ftell(). Maybe fseek() and ftell() emulations
which use off_t rather than long are needed as the easiest way
to fix it?
David.
--
----------------------------------------------
David Luyer
Senior Network Engineer
Pacific Internet (Aust) Pty Ltd
Phone: +61 3 9674 7525
Fax: +61 3 9699 8693
Mobile: +61 4 1064 2258, +61 4 1114 2258
http://www.pacific.net.au NASDAQ: PCNTF
<< fast 'n easy >>
----------------------------------------------
More information about the inn-bugs
mailing list