httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Woolley <>
Subject apr_lstat() fails on linux for large files
Date Fri, 28 Feb 2003 19:23:31 GMT

I was trying to track down the cause of PR#17357, and came across
something interesting-slash-annoying.

mod_autoindex in Apache loops over the directory entries it's indexing
using apr_dir_read().  Among other things, apr_dir_read() does an
apr_lstat() call (which in turn calls apr_stat() with the APR_FINFO_LINK
wanted flag) on the next entry in the directory.  If you have a large file
(>2GB) in the directory, though, on linux the lstat() will fail with
errno==EOVERFLOW (75) (Value too large for defined data type).  This
causes the apr_lstat() to fail which causes the apr_dir_read() to fail
which makes mod_autoindex think it's hit the end of the directory.

Of course, if I go and explictly compile Apache with

So I guess the ultimate questions are these:

(a) Why doesn't Apache automatically include largefile support?
Performance reasons?  Shouldn't there at least be an easy ./configure
option to turn it on?

(b) If it's not turned on, shouldn't mod_autoindex detect the EOVERFLOW
return code and special-case it?


View raw message