As I suspected, the problem had nothing to do with calling malloc . I decided to ignore the problem while I was working on another problem. The project was where I moved code previously written in C ++ for Windows to Mac. By changing the names of some types, I inadvertently changed this:
TCHAR * p = new TCHAR[(length + 1)];
:
char * p = new char(length + 1);
So just a typo, but one with pretty significant consequences.
I discovered this by looking at recent changes to a file with other odd behavior. Therefore, the answer to my initial question was quite simple and applicable in many other situations: "What have you changed lately?" :-)
Craig source share