The bug is triggered by using a custom memory allocator. It's clearly an edge case. There will be bugs that slip over code review and/or testing no matter what. That's a fact in software development.
>In OS X 10.10, this logging was turned on by default for some applications that use a custom memory allocator, such as jemalloc, because of an initialization bug in the framework.
So it seems to be a bug that it even got enabled.
And in case anyone thinks that sheer developer machismo (or 'rigor' or whatever) can keep you out of harm's way here, then I suggest reading John Carmack's excellent writeups on the horrors found by static code analysis.[1][2] Even the best programmers out there will get caught by any number of language traps.
[1] Sadly/happily, still available via archive.org. CSS seems to be busted here, so scroll to the bottom for Carmack's article:
https://web.archive.org/web/20120104024203/http://altdevblogaday.com/2011/12/24/static-code-analysis/
[2] The above was discussed on HN, and that thread is pretty good as well: https://news.ycombinator.com/item?id=3388290