Opened 16 years ago

Closed 16 years ago

#294 closed defect (fixed)

Memory leak in Python query constructor

Reported by: Richard Boulton Owned by: Richard Boulton
Priority: normal Milestone: 1.0.8
Component: Xapian-bindings Version: 1.0.7
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Operating System: All

Description

The python query constructor which takes a sequence of queries as an argument leaks memory, due to failing to decref python objects returned from PySequence_GetItem. I think there are also other memory leaks in the related code. I have a small testcase which reproduces this; though not to hand at present. Making this issue as a placeholder to keep track of this issue.

(Note that valgrind doesn't seem to be able to detect the leak, but the testcase I have is very simple and clear and rapidly uses up 100s of Mbs of memory.)

Attachments (1)

leaktest.py (269 bytes ) - added by Richard Boulton 16 years ago.
Simple test case which demonstrates the leak (if watched in top)

Download all attachments as: .zip

Change History (4)

by Richard Boulton, 16 years ago

Attachment: leaktest.py added

Simple test case which demonstrates the leak (if watched in top)

comment:1 by Richard Boulton, 16 years ago

Fixed in HEAD in revision [11158]

comment:2 by Richard Boulton, 16 years ago

Status: newassigned

comment:3 by Olly Betts, 16 years ago

Resolution: fixed
Status: assignedclosed

Fixed in 1.0 branch rev [11171]

Note: See TracTickets for help on using tickets.