Help! Python either hangs or core dumps when calling C malloc

Mike Meyer mwm at
Fri Sep 9 02:35:35 CEST 2005

"Fredrik Lundh" <fredrik at> writes:

> Lil wrote:'
>>I already double checked my C code. It runs perfectly fine in C without
>> any errors. So in my python program, I added a pdb.set_trace()
>> and step through the program and it did not dump. But when i took out
>> the tracing, the core dump came back. "sigh"
> so triple-check it.
> if your code overwrites the malloc buffer, it's perfectly possible
> that it appears to run fine when you run it standalone or under the
> debugger, but that doesn't mean that your code is fine.

The appropriate aphorism is: "Testing can never reveal the absence of

Mike Meyer <mwm at>
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.

More information about the Python-list mailing list