For quite a long time now, OpenBSD has, among numerous exploit mitigation techniques, had a very strict mmap()-based malloc() implementation. Recently re-written by Otto Moerbeek, it is even harsher now. I find that this feature makes OpenBSD one of the best platforms to develop C programs on. If you have a double-free, use-after-free, off-by-one, or other typical mistake in your program, chances are OpenBSD's omalloc will trip up on it eventually. Especially on a strict-alignment, long-pointer architecture like sparc64, running it under OpenBSD is a great way to gain confidence that your program is solid. Anyway, recently Otto has made OpenBSD's malloc even stricter. I upgraded my home machine over the weekend to the latest snapshot with these commits, and I'm currently running a bunch of Unworkable BitTorrent download processes on it to make sure my code still holds up. So far so good! If you have some C code you care about, I'd recommend taking the time to run it under OpenBSD for a while - you might find you catch some bugs which even Valgrind missed. Enjoy!
Niall O'Higgins is an author and software developer. He wrote the O'Reilly book MongoDB and Python. He also develops Strider Open Source Continuous Deployment and offers full-stack consulting services at FrozenRidge.co.Tweet