Fwd: mmap broken for sparc32 in 2.1.2pre3
Ulrich Drepper
drepper@cygnus.com
Sun Aug 29 16:34:00 GMT 1999
Joel Klecker <jk@espy.org> writes:
> >mmap appears to fail in certain circumstances. This particular example
> >comes from a grep during a gcc build (just the tail of the strace):
> >
> >open("/usr/src/scratch/gcc-2.95.1/src/configure.in", O_RDONLY) = 4
> >brk(0x40000) = 0x40000
> >fstat(4, {st_dev=makedev(3, 1), st_ino=65761, st_mode=S_IFREG|0644,
> >st_nlink=1,
> >st_uid=1000, st_gid=40, st_blksize=8192, st_blocks=76, st_size=37354,
> >st_atime=99/08/27-22:56:26, st_mtime=99/08/27-22:53:01,
> >st_ctime=99/08/27-22:53:01}) = 0
> >mmap(NULL, 0, PROT_NONE, MAP_FILE, 0, 0) = -1 EINVAL (Invalid argument)
If the strace output is correct this is correct. The allocated memory
is zero and to prevent some resource allocation attacks the kernel
blocks these calls and returns an error.
--
---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Cygnus Solutions `--' drepper at cygnus.com `------------------------
More information about the Libc-alpha
mailing list