Subject: Re: Bug in mmap() for files with holes
To: None <>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-kern
Date: 11/14/2007 17:01:28
> We appear to have such a bug for _reading_ files consisting only of
> holes; see the program below.  Modifying the program to write one
> byte to the file before the lseek() that extends it causes the
> segfault to go away.

On most filesystems, writing one byte allocates at least 1024 bytes of
storage and thus causes your test file to have no holes.  If this is
the only evidence at hand, inferring that the bug applies only when the
file consists solely of holes is unwarranted.  (Try a size of more like
1M instead of 1K if you want to test part holes and part data.)

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B