diff options
author | 2008-11-02 08:50:41 +0000 | |
---|---|---|
committer | 2008-11-02 08:50:41 +0000 | |
commit | 3d00aa7ab850ccb85dc11c6ffee47d1a13766b51 (patch) | |
tree | 14e3c2d971c27efd2f1745abcec8affa187482bc /lib/libc/stdlib/malloc.3 | |
parent | new sentence, new line; (diff) | |
download | wireguard-openbsd-3d00aa7ab850ccb85dc11c6ffee47d1a13766b51.tar.xz wireguard-openbsd-3d00aa7ab850ccb85dc11c6ffee47d1a13766b51.zip |
remove distinction between warnings and errors, ok deraadt@ djm@
Diffstat (limited to 'lib/libc/stdlib/malloc.3')
-rw-r--r-- | lib/libc/stdlib/malloc.3 | 44 |
1 files changed, 18 insertions, 26 deletions
diff --git a/lib/libc/stdlib/malloc.3 b/lib/libc/stdlib/malloc.3 index b9d62d04d04..8da3a299e19 100644 --- a/lib/libc/stdlib/malloc.3 +++ b/lib/libc/stdlib/malloc.3 @@ -30,9 +30,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: malloc.3,v 1.54 2008/08/07 18:41:47 otto Exp $ +.\" $OpenBSD: malloc.3,v 1.55 2008/11/02 08:50:41 otto Exp $ .\" -.Dd $Mdocdate: August 7 2008 $ +.Dd $Mdocdate: November 2 2008 $ .Dt MALLOC 3 .Os .Sh NAME @@ -215,9 +215,11 @@ Flags are single letters, uppercase means on, lowercase means off. .It Cm A .Dq Abort . .Fn malloc -will coredump the process, rather than tolerate failure. -This is a very handy debugging aid, since the core file will represent the -time of failure, rather than when the null pointer was accessed. +will coredump the process, rather than tolerate internal +inconsistencies or incorrect usage. +This is the default and a very handy debugging aid, +since the core file represents the time of failure, +rather than when the bogus pointer was used. .It Cm D .Dq Dump . .Fn malloc @@ -248,9 +250,6 @@ Currently junk is bytes of 0xd0 when allocating; this is pronounced .Dq Duh . \&:-) Freed chunks are filled with 0xdf. -.It Cm N -Do not output warning messages when encountering possible corruption -or bad pointers. .It Cm P .Dq Move allocations within a page. Allocations larger than half a page but smaller that a page @@ -297,7 +296,7 @@ Increase the size of the free page cache by a factor of two. .El .Pp So to set a systemwide reduction of cache size and coredumps on problems: -.Li ln -s 'A<' /etc/malloc.conf +.Li ln -s 'G<' /etc/malloc.conf .Pp The .Cm J @@ -349,22 +348,19 @@ If .Fn realloc , or .Fn free -detect an error or warning condition, +detect an error condition, a message will be printed to file descriptor 2 (not using stdio). -Errors will always result in the process being -.Xr abort 3 'ed. -If the -.Cm A -option has been specified, warnings will also -.Xr abort 3 -the process. +Errors will result in the process being aborted, +unless the +.Cm a +option has been specified. .Pp Here is a brief description of the error messages and what they mean: .Bl -tag -width Ds .It Dq out of memory If the -.Cm A +.Cm X option is specified it is an error for .Fn malloc , .Fn calloc , @@ -375,14 +371,6 @@ to return .It Dq malloc init mmap failed This is a rather weird condition that is most likely to indicate a seriously overloaded system or a ulimit restriction. -.It any other error -.Fn malloc -detected an internal error; -consult sources and/or wizards. -.El -.Pp -Here is a brief description of the warning messages and what they mean: -.Bl -tag -width Ds .It Dq bogus pointer (double free?) An attempt to .Fn free @@ -418,6 +406,10 @@ The internal malloc page cache has been corrupted. The internal malloc page cache has been corrupted. .It Dq guard size An inconsistent guard size was detected. +.It any other error +.Fn malloc +detected an internal error; +consult sources and/or wizards. .El .Sh SEE ALSO .Xr brk 2 , |