[Pythonmac-SIG] malloc debugger for OS X?

Stuart Bishop zen@shangri-la.dropbear.id.au
Thu, 10 Apr 2003 10:30:44 +1000


On Wednesday, April 9, 2003, at 08:33  PM, Michael Hudson wrote:

> Stuart Bishop <zen@shangri-la.dropbear.id.au> writes:
>
>> On Tuesday, April 8, 2003, at 07:20  PM, Michael Hudson wrote:
>>
>>> Stuart Bishop <stuart.b@commonground.com.au> writes:
>>>
>>>> Can anyone point me to a malloc debugger that works under OS X and
>>>> can be used for tracking down 'double free' errors in Python C
>>>> extensions?
>>>
>>> You could try a --pydebug build of Python 2.3 from CVS.
>>
>> I've now tried that. In this particular case, it made the warnings
>> disappear and the program appear to run flawlessly :-)
>
> Glad to be of help :-)  Does it still work with a release build?

No. Obviously, the library gets scared when it sees the Python
debugging code and behaves itself :-)

ElectricFence builds and passes the example posted here (but crashes
on the example it attempts to run from the Makefile, as well as the
library I'm testing).

There appear to be some tools that ship with OS X I hadn't noticed 
before
(man leaks and man malloc_history for details) that may be useful - 
havn't
had a chance to play with these yet.

-- 
Stuart Bishop <zen@shangri-la.dropbear.id.au>
http://shangri-la.dropbear.id.au/