SEGV in python-apt with python2.5

Bug #63226 reported by Narayan Desai on 2006-09-30
2
Affects Status Importance Assigned to Milestone
python-apt (Ubuntu)
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:
        installed[pkg.Name] = pkg.CurrentVer.VerStr

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.

Michael Vogt (mvo) on 2006-10-04
Changed in python-apt:
importance: Undecided → High
status: Unconfirmed → Confirmed
Michael Vogt (mvo) wrote :

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

Changed in python-apt:
assignee: nobody → mvo
Michael Vogt (mvo) on 2006-10-04
Changed in python-apt:
status: Confirmed → Fix Committed
Michael Vogt (mvo) wrote :
Changed in python-apt:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers