SEGV in python-apt with python2.5
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-apt (Ubuntu) |
Fix Released
|
High
|
Michael Vogt |
Bug Description
I have some simple apt_pkg code that runs properly with 0.6.19-ubuntu5 and python2.4, but causes invalid free messages from glibc or segmentation faults when run with 2.5. The attached code reliably triggers the problem for me. It is:
import apt_pkg
apt_pkg.init()
cache = apt_pkg.GetCache()
installed = {}
for pkg in cache.Packages:
if pkg.CurrentVer:
Here are the output from this script, run on edgy with python2.4 and python2.5, respectively.
[0:40] python2.4 /tmp/apt.py
Reading package lists... Done
Building dependency tree
Reading state information... Done
[0:41] python2.5 /tmp/apt.py
Reading package lists... Done
Building dependency tree
Reading state information... Done
*** glibc detected *** python2.5: free(): invalid pointer: 0xb7d9f308 ***
In the python2.5 run, the program goes into a bad state, and requires a kill -9 to kill it.
Changed in python-apt: | |
importance: | Undecided → High |
status: | Unconfirmed → Confirmed |
Changed in python-apt: | |
status: | Confirmed → Fix Committed |
Thanks for your bugreport.
this is the result of a python2.5 C-API change. I fixed the code in my local tree and the fix will be part of the next upload.
Cheers,
Michael