News for hackers. Stuff that matters.

Spider

Re:How OpenBSD Leverages Malloc to Find Bugs on Monday November 28, 2011 @12:00PM (#3286610)
Is this really different from the glibc malloc() implementation with MALLOC_CHECK_ set to 3?

> MALLOC_CHECK_ is designed to be tolerant against simple errors, such as double calls of free() with the same argument, or overruns of a single byte (off-by-one bugs). Not all such errors can be protected against, however, and memory leaks can result.

> If MALLOC_CHECK_ is set to 0, any detected heap corruption is silently ignored;

> if set to 1, a diagnostic message is printed on stderr;

> if set to 2, abort(3) is called immediately;

> if set to 3, a diagnostic message is printed on stderr and the program is aborted.