Subject: Re: Zero-length mmaps
To: Kailash Sethuraman <firstname.lastname@example.org>
From: Thor Lancelot Simon <email@example.com>
Date: 08/21/2006 12:11:19
On Mon, Aug 21, 2006 at 03:01:29PM +0000, Kailash Sethuraman wrote:
> On 8/20/06, Jason Thorpe <firstname.lastname@example.org> wrote:
> >NetBSD's mmap should be fixed. We should probably version the symbol
> >so old programs continue to run, but new programs get the new behavior.
> >From my code reading, please correct me if I am wrong,
> It does seem to be the case that when a mmap with length 0 is
> specified,size passed to uvm_mmap() can be 0.
> Does this warrant a PR for ld.elf_so, and possibly other programs in
> base that do 0 length mmaps?
> Or must valgrind be taught to accomodate this case in netbsd?
I will note that we do not claim anywhere to slavishly conform to SUS (of
any version); rather, we say we will conform to _reasonable_ standards.
The interface in question (mmap(2)) is a BSD interface, to which SUS seems
to have made a largely arbitrary change. Whether we change it to match SUS
or not, valgrind should probably be fixed to understand the traditional
Thor Lancelot Simon email@example.com
"We cannot usually in social life pursue a single value or a single moral
aim, untroubled by the need to compromise with others." - H.L.A. Hart