Bug#598496: perl: memory leak affecting named regexp captures

Chris Butler chrisb at debian.org
Thu Oct 14 20:44:22 UTC 2010

clone 598496 -1
reassign -1 perl
forwarded -1 http://rt.perl.org/rt3//Ticket/Display.html?id=78266

Response from upstream copied below. The memory leak is in perl itself, and
has been reported upstream; cloning to perl and setting forward

I've finally been able to track down this problem. There is a memory
leak in perl impacting named regexp captures (which Date::Manip uses
extensively) which is causing this.

I have reported the bug (perlbug #78266), but until it is resolved, I
don't have an easy way to fix this. Rewriting all of the regexps in
Date::Manip, while possible, is not a solution that I want to implement
(I specifically switched to named captures due to the much cleaner and
more secure code they allow).

In the meantime, using Date::Manip 5.xx (where possible) is a workaround. 

A crude estimate of the leak is around 3 MB per 10000 dates parsed, so
unless you're parsing hundred of thousands or millions of dates, the
leak probably won't be a problem, and if you're parsing this many dates,
Date::Manip may not be the right tool for you anyway.

Chris Butler <chrisb at debian.org>
  GnuPG Key ID: 4096R/49E3ACD3

More information about the pkg-perl-maintainers mailing list