Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Finding memory bugs automatically



Hi,

Do any of the releng builds and tests run with MALLOC_CONF=junk:true?

Background story: I'm tired of finding memory allocation bugs myself
when there is a really simple way of doing the same thing automatically.

How much time would it cost to run the NetBSD build and the tests with
memory allocation debugging, and would it make sense to at least run
_some_ of the tests with this option?

Is jemalloc capable of running in "evil bug-finding" mode, in which it
would return a separate memory page for each allocation request,
protecting against out-of-bounds access, and immediately freeing the
page as soon as possible and never reusing pages?

If not, why isn't there such a mode, and is there an alternative memory
allocator that can find these kinds of bugs?

Roland


Home | Main Index | Thread Index | Old Index