Article View: comp.sys.sun
Article #7285Bug in mmap and TMPFS under SunOS 4.1.1
From: Russ Poffenberger
Date: Wed, 27 Mar 1991 21:35
Date: Wed, 27 Mar 1991 21:35
26 lines
1872 bytes
1872 bytes
There seems to be a bug in SunOS 4.1.1 with the mmap() call on a file
residing on a TMPFS filesystem. According to the man pages for mmap..
mmap() allows [pa, pa + len) to extend beyond the end of the
object, both at the time of the mmap() and while the mapping
persists, for example if the file was created just prior to
the mmap() and has no contents, or if the file is truncated.
Any reference to addresses beyond the end of the object,
however, will result in the delivery of a SIGBUS signal.
This is fine on a normal filesystem, however attempting to map beyond the
end of an object, where that object is a file residing on a TMPFS
filesystem will cause mmap to fail with a bad status (-1).
This has been reported to Sun (our PAL contact), but I have received no
response yet. *FLAME ON* I am not thrilled with our PAL service to date.
*FLAME OFF*.
There is certainly a workaround, not to map past the end of the object,
but either the problem should be fixed, or the man page updated to reflect
the truth.
Russ Poffenberger DOMAIN: poffen@sj.ate.slb.com
Schlumberger Technologies UUCP: {uunet,decwrl,amdahl}!sjsca4!poffen
1601 Technology Drive CIS: 72401,276
San Jose, Ca. 95110 (408)437-5254
Technical Details
Message-ID:
<2215@brchh104.bnr.ca>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!cunews!bnrgate!brtph3!brchh104!brchs1!bnr.ca!rice.edu!sun-spots-requestShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!cunews!bnrgate!brtph3!brchh104!brchs1!bnr.ca!rice.edu!sun-spots-request From: poffen@sj.ate.slb.com (Russ Poffenberger) Newsgroups: comp.sys.sun Subject: Bug in mmap and TMPFS under SunOS 4.1.1 Keywords: SunOS Message-ID: <2215@brchh104.bnr.ca> Date: 27 Mar 91 21:35:00 GMT Sender: news@brchh104.bnr.ca Organization: Sun-Spots Lines: 26 Approved: Sun-Spots@rice.edu X-Original-Date: Wed, 27 Mar 91 10:59:41 PST X-Sun-Spots-Digest: Volume 10, Issue 61, message 16 X-Note: Submissions: sun-spots@rice.edu, Admin: sun-spots-request@rice.edu