[Python-Dev] PyGEGL instant crash (Python regression?)

Nick Coghlan ncoghlan at gmail.com
Fri Jul 20 13:12:00 CEST 2007


David Gowers wrote:
> Well, okay; but how does that account for the fact that Kevin reports
> it works under 2.4, but it doesn't work under 2.6?

The most likely culprit is that some of the code is using PyMem_Free on 
a pointer allocated with PyObject_Malloc (or vice-versa). This has 
always been illegal, but prior to 2.5 the Python memory allocator tied 
itself in knots to try to avoid crashing when client code broke the 
rules. The changes in 2.5 to release unused memory back to the OS 
required that those knots be cut.

The what's new document for each release is a good resource for these 
kinds of problems, especially its porting section:

http://docs.python.org/whatsnew/porting.html

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
             http://www.boredomandlaziness.org


More information about the Python-Dev mailing list