glibc detected double free or corruption

Delaney, Timothy (Tim) tdelaney at avaya.com
Wed Dec 20 18:39:27 EST 2006


Grant Edwards wrote:

> When I try to run pycadia
> <http://www.anti-particle.com/old/pycadia.shtml> 
> I get the following error message as soon as I click "start game"
> 
> *** glibc detected *** python: double free or corruption (out):
> 0xbff43b10 *** 
> 
> Then the program locks up and has to be killed with a SIGKILL.
> 
> pycadia is a pure-python program that uses pygame, pygtk, and
> gtk.glade. Any ideas on how to troubleshoot this problem?

The most likely thing is that there is indeed a double free - probably a
missing INCREF (or possibly an extra DECREF) in one of the extensions.

For a less likely cause ... was python (or any of the C extensions)
compiled with -Os by any chance? What version of gcc? I've had the same
issue with a C++ program, where changing from -Os to -O2 appears to have
resolved the issue. I was cross-compiling for a different architecture,
so it's possible in my case that alignment optimisations that -Os
doesn't do were causing the problem.

But a missing INCREF or extra DECREF are the most likely causes.

Tim Delaney



More information about the Python-list mailing list