3 ms·
The author had a bug report in front of him. The behavior was repeatable and certainly unexpected. That is worth tracking down. I've tracked down corner cases
by CalChris 10y ago
The author had a bug report in front of him. The behavior was repeatable and certainly unexpected. That is worth tracking down.
I've tracked down corner cases like this myself and been correctly told by developers that they're not worth fixing. But you don't know that a priori.
- eridius 10y agoThe bug report wasn't caused by calloc, free, calloc being expensive. It was caused by making a call that did "malloc + memset" when only malloc was needed. The code in question wasn't even invoking calloc at all, it just ended up being an excuse to investigate zeroing memory behavior. Incidentally, the blog post asks "why was the memory being actively zeroed at all?" but never actually answers it.
- citrin_ru 10y agoDoes PyOpenSSL allocate memory and the free without touch? If not, this test case may be not relevant to the bug.