apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Garrett Rooney <roo...@electricjellyfish.net>
Subject Re: mmap bug?
Date Thu, 27 Feb 2003 22:10:53 GMT
Joe Orton wrote:

>On Thu, Feb 27, 2003 at 02:35:51PM +0100, Sander Striker wrote:
>>Is there a known issue with mmapping 0 sized files?
>>FYI, I'm on Linux 2.4.20, glibc 2.3.1.
>>>From a quick check, unless I'm screwing something up, it appears that
>passing a zero length argument to mmap() doesn't work on several
>platforms (nor does it make a whole lot of sense ;): Solaris and HP-UX
>both return EINVAL from the the mmap call...
>I'll ask our kernel guys about the Linux case, though I'd guess they'll
>say it's undefined behaviour.

well, in any case, we should define how it will behave in APR, and stick 
to it no matter what the underlying platform allows.  either it should 
always pass or always succeed (and return an arbitrary pointer or 
something).  this is just the kind of os dependent behavior APR should 
be letting you ignore.


View raw message