Large files support on FreeBSD
Russ Allbery
rra at stanford.edu
Sun Mar 22 07:13:55 UTC 2009
Julien ÉLIE <julien at trigofacile.com> writes:
> On FreeBSD 6.2, makedbz or innd crash with core dump (with INN 2.5.0):
>
> "gdb makedbz makedbz.core" show this line of lib/ftello.c file:
>
> if (fgetpos(stream, &fpos) < 0) {
> return -1;
>
> INN 2.4.6 works fine with large files support.
> INN 2.5.0 works fine without it.
>
> It also appears that when compiled with large files support:
>
> 2.4.6:
>
> /* #undef HAVE_LARGE_FPOS_T */
>
> 2.5.0:
>
> #define HAVE_LARGE_FPOS_T 1
> #define DO_LARGEFILES 1
>
> And if /* #undef HAVE_LARGE_FPOS_T */ is also set on 2.5.0
> in current "include/config.h", INN works fine.
> But how is it possible to make sure support for large files
> is really in it?
This code is all an attempt to provide fseeko and ftello on BSD systems,
where neither of those functions were provided but fpos_t was an off_t and
hence they could be emulated by using fsetpos() and fgetpos().
The segfault is very strange. It would seem to indicate that fgetpos() is
expecting a different second argument than a pointer to an fpos_t, but
given that that's the defined arguments for fgetpos(), there's something
more fundamentally broken here.
I have a hard time seeing how a segfault on that particular line could be
INN's fault, but I suppose I must be missing something.
--
Russ Allbery (rra at stanford.edu) <http://www.eyrie.org/~eagle/>
Please send questions to the list rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
More information about the inn-workers
mailing list