[BusyBox] bug#1223: BusyBox] bug#1223: grep segfaults with multiple regexps and CLEAN_UP enabled
Erik Andersen
andersen at codepoet.org
Mon Nov 19 05:34:31 UTC 2001
On Mon Nov 19, 2001 at 01:31:16PM +0100, Neal H Walfield wrote:
> >> Have you referred him to the standard?
> >>
> > His comments stand for themselves, from the settings.dist file.
> >
> > * Should we allow the free of a NULL pointer and if it happens,
> > * should a message be generated to that effect. Most (if not all)
> > * POSIX C libraries allow you to free() or delete() a NULL pointer
> > * and a number of programming reference manuals mention that freeing
> > * of NULL is ``allowed''. However, I believe that it is bad form,
> > * promotes lazy pointer handling, and can often hide program bugs.
> > * As the author of dmalloc, I reserve the right to determine the
> > * default action of the library to encourage code similar to the
> > * following: if (pnt != NULL) { free(pnt); }
>
> Unfortunate. Standards are there to void portability problems, I fail
> to understand why people try to create them. Not to mention that his
> goal could be satisfied by using a simple malloc debugger such as the
> one that comes with glibc.
dmalloc _is_ a malloc debugger, so I think it is valid
for it to be worried about such things.
-Erik
--
Erik B. Andersen http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--
More information about the busybox
mailing list