apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Woolley <jwool...@virginia.edu>
Subject RE: mmap bug?
Date Fri, 28 Feb 2003 15:41:16 GMT
On Fri, 28 Feb 2003, Sander Striker wrote:

> Can someone at home in the file buckets take a look at these:
> buckets/apr_buckets_file.c:93:        if (apr_mmap_create(&mm, a->fd, fileoffset,
> buckets/apr_buckets_file.c:102:             (apr_mmap_create(&mm, a->fd, fileoffset,
> And see if 0 length files are handled correctly?

I suspect they're not, but I'll have to check.  I suppose the best
solution would be to go ahead and try to mmap the file; if you get an
error, see if it's einval and you passed mmap a zero length file.  if so,
morph yourself to a zero-length immortal bucket.  that way we don't pay
the cost of *three* error tests in the main-line case, only two.


View raw message