From owner-freebsd-perl@FreeBSD.ORG Tue Apr 23 08:52:48 2013 Return-Path: Delivered-To: perl@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 8FB4C3C3 for ; Tue, 23 Apr 2013 08:52:48 +0000 (UTC) (envelope-from tobez@tobez.org) Received: from heechee.tobez.org (heechee.tobez.org [IPv6:2001:2010:1::feef]) by mx1.freebsd.org (Postfix) with ESMTP id 59E2610B0 for ; Tue, 23 Apr 2013 08:52:48 +0000 (UTC) Received: by heechee.tobez.org (Postfix, from userid 1001) id D9E5245F2C; Tue, 23 Apr 2013 10:52:45 +0200 (CEST) Date: Tue, 23 Apr 2013 10:52:45 +0200 From: Anton Berezin To: Dag-Erling =?utf-8?B?U23DuHJncmF2?= Subject: Re: [patch] net/p5-RPC-XML loop detection bug Message-ID: <20130423085245.GD7705@heechee.tobez.org> References: <86txmxskym.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <86txmxskym.fsf@ds4.des.no> X-Powered-By: FreeBSD http://www.freebsd.org/ User-Agent: Mutt/1.5.21 (2010-09-15) Cc: perl@freebsd.org X-BeenThere: freebsd-perl@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: maintainer of a number of perl-related ports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Apr 2013 08:52:48 -0000 On Tue, Apr 23, 2013 at 10:35:45AM +0200, Dag-Erling Smørgrav wrote: > The hash serializing code in RPC::XML tries to detect and prevent loops, > but what it actually does is detect and prevent repetitions. The > easiest way to reproduce this is to try to serialize a hash containing > two DateTime objects representing the same time, because DateTime > objects are singletons. > > I've submitted a patch upstream and received a positive response, but it > hasn't appeared on github and there is no sign of a new release. I'd > like to commit the following patch to net/p5-RPC-XML: Approved with perl@ hat on. :-) Cheers, \Anton. > Index: net/p5-RPC-XML/Makefile > =================================================================== > --- net/p5-RPC-XML/Makefile (revision 316245) > +++ net/p5-RPC-XML/Makefile (working copy) > @@ -7,6 +7,7 @@ > > PORTNAME= RPC-XML > PORTVERSION= 0.77 > +PORTREVISION= 1 > CATEGORIES= net www perl5 > MASTER_SITES= CPAN > PKGNAMEPREFIX= p5- > Index: net/p5-RPC-XML/files/patch-lib-RPC-XML.pm > =================================================================== > --- net/p5-RPC-XML/files/patch-lib-RPC-XML.pm (revision 0) > +++ net/p5-RPC-XML/files/patch-lib-RPC-XML.pm (working copy) > @@ -0,0 +1,10 @@ > +--- lib/RPC/XML.pm.orig 2011-08-22 11:29:30.000000000 +0200 > ++++ lib/RPC/XML.pm 2013-04-23 10:28:19.780990362 +0200 > +@@ -258,6 +258,7 @@ > + $type = reftype $_; > + die "Un-convertable reference: $type, cannot use\n"; > + } > ++ $seenrefs->{$_}--; > + } > + # You have to check ints first, because they match the > + # next pattern (for doubles) too > > Property changes on: net/p5-RPC-XML/files/patch-lib-RPC-XML.pm > ___________________________________________________________________ > Added: fbsd:nokeywords > ## -0,0 +1 ## > +yes > \ No newline at end of property > > DES > -- > Dag-Erling Smørgrav - des@des.no > _______________________________________________ > freebsd-perl@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-perl > To unsubscribe, send any mail to "freebsd-perl-unsubscribe@freebsd.org" -- Our society can survive even a large amount of irrational regulation. -- John McCarthy