This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: bootstrap/5149: gcc-20011217 reads beyond EOF on cygwin
On Thu, Dec 20, 2001 at 06:33:23PM +0000, Neil Booth wrote:
>
> Weird. The bytes after EOF are a mixture of NULs and 0xc0. Is 0xc0
> of special significance in Windows? Is your version of cygwin the
> latest? I recall some talk about mmap bugs in cygwin.
>
> I guess that we have to disable mmap() on cygwin, or at least on
> specific versions. Do you have any better ideas Zack?
No. But the AC_FUNC_MMAP_FILE macro (gcc/aclocal.m4) already executes
a test program to determine whether or not mmap works the way we want.
It would be easy enough to add a check that byte (len+1) of its test
file is a NUL. [And we'd better not be looking at byte len+2, or
we'll segfault if the file length is one less than a multiple of
PAGE_SIZE.]
zw