Ticket #294 (closed defect: fixed)

Opened 3 months ago

Last modified 3 months ago

Memory leak in Python query constructor

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

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

leaktest.py (269 bytes) - added by richard 3 months ago.
Simple test case which demonstrates the leak (if watched in top)

Change History

Changed 3 months ago by richard

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

Changed 3 months ago by richard

Fixed in HEAD in revision [11158]

Changed 3 months ago by richard

  • status changed from new to assigned

Changed 3 months ago by olly

  • status changed from assigned to closed
  • resolution set to fixed

Fixed in 1.0 branch rev [11171]

Note: See TracTickets for help on using tickets.