Date: Wed, 26 Aug 2009 07:34:12 -0400 From: John Baldwin <jhb@freebsd.org> To: Colin Percival <cperciva@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r196558 - head/usr.bin/look Message-ID: <200908260734.12893.jhb@freebsd.org> In-Reply-To: <200908260330.n7Q3U61l047845@svn.freebsd.org> References: <200908260330.n7Q3U61l047845@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday 25 August 2009 11:30:06 pm Colin Percival wrote: > Author: cperciva > Date: Wed Aug 26 03:30:06 2009 > New Revision: 196558 > URL: http://svn.freebsd.org/changeset/base/196558 > > Log: > Don't try to mmap the contents of empty files. This behaviour was harmless > prior to r195693, since historical behaviour of mmap(2) was to silently > ignore length-zero mmap requests; but mmap now returns EINVAL, which caused > look(1) to emit an error message and fail. FWIW, it did not silently ignore the request. Instead it rounded the size up to a page and mapped a page of data. However, if you then passed that pointer with a length of 0 to munmap() munmap() would fail. -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200908260734.12893.jhb>