Subject: lib/36462: initial test for non-existence of pre-processor symbol MALLOC_EXTRA_SANITY
To: None <lib-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <brickviking@gmail.com>
List: netbsd-bugs
Date: 06/09/2007 09:50:00
>Number:         36462
>Category:       lib
>Synopsis:       initial test for non-existence of pre-processor symbol MALLOC_EXTRA_SANITY
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jun 09 09:50:00 +0000 2007
>Originator:     Eric Gillespie
>Release:        3.0
>Organization:
none
>Environment:
>Description:
In source code file src/lib/libc/stdlib/malloc.c:22-24, this test doesn't do anything.
22:#ifndef MALLOC_EXTRA_SANITY
23:#undef MALLOC_EXTRA_SANITY
24:#endif

If the symbol isn't defined, the preprocessor will attempt to undefine
it anyhow. If the symbol IS defined, these lines will be skipped. Hence
these lines don't do anything useful. These lines were removed in 2005 
from the original FreeBSD source from which this file was derived.
That's nine years after initial inclusion. phk (phk@freebsd.org) had this
to say:
:They used to control some very paranoid consistency check code that
:was removed pretty early on, unfortunately, those three lines got 
:missed somehow.

>How-To-Repeat:
list the source code to the above file.
>Fix:
Remove the three lines.