ports/166198: patch textproc/p5-Text-Template: Fix a long standing memory leak.

Zane C.B-H. vvelox at vvelox.net
Sat Mar 17 12:00:31 UTC 2012


>Number:         166198
>Category:       ports
>Synopsis:       patch textproc/p5-Text-Template:  Fix a long standing memory leak.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Mar 17 12:00:23 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Zane C.B-H.
>Release:        FreeBSD 8.2-STABLE amd64
>Organization:
>Environment:


System: FreeBSD 8.2-STABLE #8: Wed Oct 26 02:32:28 CDT 2011
    kitsune at vixen42.vulpes.vvelox.net:/usr/obj/usr/src/sys/vixen42



>Description:


https://rt.cpan.org/Public/Bug/Display.html?id=22031

Unfortunately that bug has gone unpatched by the author for a long time.


>How-To-Repeat:


Use any thing that makes heavy use of it.

Rendering a Toader::Gallery object will easily go through in excess of 6GB of RAM. Post patch it stays stable at generally around 70MB.


>Fix:


--- Makefile.diff begins here ---
--- Makefile.orig	2012-03-17 06:31:23.843592262 -0500
+++ Makefile	2012-03-17 06:36:51.281289791 -0500
@@ -7,6 +7,7 @@
 
 PORTNAME=	Text-Template
 PORTVERSION=	1.45
+PORTREVISION=	1
 CATEGORIES=	textproc perl5
 MASTER_SITES=	http://perl.plover.com/Template/ \
 		CPAN
--- Makefile.diff ends here ---


--- patch-Text-Texmplate-1.45_lib_Text_Template.pm begins here ---
--- lib/Text/Template.pm.orig	2008-04-16 18:38:08.000000000 -0500
+++ lib/Text/Template.pm	2012-03-17 06:44:14.882739137 -0500
@@ -428,6 +428,8 @@
     foreach my $key (keys %$hash) {
       undef $hash->{$key};
     }
+    %$hash = ();
+    delete $Text::Template::{$s."::"};
   }
 }
   
--- patch-Text-Texmplate-1.45_lib_Text_Template.pm ends here ---



>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list