[python-sybase] Coredumps with Python 2.5 / Solaris 10

Harri Pasanen harri.pasanen at trema.com
Fri Oct 20 17:36:49 EST 2006


On Friday 20 October 2006 05:22, Andrew McNamara wrote:
> >All of which is telling me something is corrupting heap memory. 
> > Some notes in the 2.5 release notes indicate the memory mgmt for
> > C extensions has been altered but as far as I can see, the sybase
> > module doesn't use tiehr the PyMem_Malloc or PyObject_Malloc
> > calls discussed there.
>
> What makes these failures difficult to debug is that the crash
> happens away from the source of the corruption, so anything that
> closes that gap will help isolate the source.
>
> In the past, I've used techniques such as a "canary" function that
> performs a series of randomly sized allocations and then frees
> them, in the hope that this will trip up on the corruption. I then
> strategically litter the code with calls to this function. It might
> also help if the canary function writes a "hard to swallow"
> pattern, such as 0xA5A5A5A5, to the memory it allocates prior to
> freeing it.

If you are on Linux, valgrind (http://valgrind.org/) is your friend.
But I see that Gregory already patched this one... thanks!

Harri


Privileged or confidential information may be contained in this message.  If you are not the addressee of this message please notify the sender by return and thereafter delete the message, and you may not use, copy, disclose or rely on the information contained in it. Internet e-mail may be susceptible to data corruption, interception and unauthorised amendment for which Wall Street Systems does not accept liability. Whilst we have taken reasonable precautions to ensure that this e-mail and any attachments have been swept for viruses, Wall Street Systems does not accept liability for any damage sustained as a result of viruses.  Statements in this message or attachments that do not relate to the business of  Wall Street Systems are neither given nor endorsed by the company or its Directors.



More information about the Python-sybase mailing list