
That's great - it's always good to know it was worth putting the effort in to come up with a simple reproducible test case! :) Now for a slightly annoying question - do you have any idea if/when this fix would be compiled into a proper release of lxml? I only ask because any software updates I use have to be approved before they can go live, and it's a lot easier if they're an 'official' update than a patch that needs compiling manually. Thanks! -----Original Message----- From: lxml [mailto:lxml-bounces@lxml.de] On Behalf Of Stefan Behnel Sent: 06 November 2013 18:26 To: lxml@lxml.de Subject: Re: [lxml] Possible memory leak in xpath() Stefan Behnel, 06.11.2013 18:36:
Brian Bird, 06.11.2013 16:01:
Could anyone confirm if this is really a bug?
Definitely. Thanks for investigating it, and sorry for not responding earlier. Your short test code makes this very easy to reproduce, and Amaury's hint at the XPath parser dict should make it easy to track down the problem in the code.
https://github.com/lxml/lxml/commit/f7d2682a511253445c128137f205bfb4d6973cbb It turned out that the parser dict setup risked using the wrong dict anyway, so the safest fix was to not use a dictionary at all. Thanks again for analysing this bug. Stefan _________________________________________________________________ Mailing list for the lxml Python XML toolkit - http://lxml.de/ lxml@lxml.de https://mailman-mail5.webfaction.com/listinfo/lxml