Subject: kern/7934: misc. problems remaining in brk/sbrk main page
To: None <gnats-bugs@gnats.netbsd.org>
From: None <perry@piermont.com>
List: netbsd-bugs
Date: 07/06/1999 10:35:55
>Number: 7934
>Category: kern
>Synopsis: misc. problems remaining in brk/sbrk main page
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: kern-bug-people (Kernel Bug People)
>State: open
>Class: doc-bug
>Submitter-Id: net
>Arrival-Date: Tue Jul 6 10:35:01 1999
>Last-Modified:
>Originator: Perry E. Metzger
>Organization:
Perry Metzger perry@piermont.com
--
"Ask not what your country can force other people to do for you."
>Release: NetBSD-current
>Environment:
System: NetBSD jekyll.piermont.com 1.4 NetBSD 1.4 (JEKYLL) #0: Mon May 3 09:58:15 EDT 1999 perry@jekyll.piermont.com:/usr/src/sys/arch/i386/compile/JEKYLL i386
>Description:
(Put in "kern" because figuring this out requires kernel source grovelling).
In revamping parts of the brk/sbrk man page, I discovered some
deficiencies that I did not correct.
1) I'm not clear on what happens if you try to sbrk() on a negative
incr that is not an even page. If you do a negative incr that is not
an even multiple of a page, I'm presuming round down occurs. This has
to be documented -- right now, it isn't.
2) XPG says some interesting things about whether new pages are
guaranteed zeroed. (Straight from XPG:)
The newly-allocated space is set to 0. However, if the application
first decrements and then increments the break value, the contents of
the reallocated space are unspecified.
We say nothing on this topic. It isn't clear what our behavior is. We
must document our behavior.
>How-To-Repeat:
man sbrk, note that not everything is clear
>Fix:
Someone who knows has to help finish the documentation.
>Audit-Trail:
>Unformatted: