Skip Menu |

This queue is for tickets about the Tree-DAG_Node CPAN distribution.

Report information
The Basics
Id: 106130
Status: resolved
Priority: 0/
Queue: Tree-DAG_Node

People
Owner: Nobody in particular
Requestors: schmorp [...] schmorp.de
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Tree::DAG_Node mucks with STDIN/STDOUT
Date: Tue, 28 Jul 2015 18:27:04 +0200
To: bug-Tree-DAG_Node [...] rt.cpan.org
From: Marc Lehmann <schmorp [...] schmorp.de>
Hi! We sometimes have crashes when loading Tree::DAG_Node in one of our servers. The reason turned out to be Tree::DAG_Node mucking with STDIN/STDOUT/STDERR in rather unexpected ways: use open qw(:std :utf8); # Undeclared streams in UTF-8. This caused data corruption because it ignores the user/program-configured encoding and enforces utf-8. For streams that do not support this, you get a crash on loading, for others you get silent data corruption. I suggest simply dropping this line - modules should not silently change STDIN/OUT/ERR, especially not on loading, when they ahve nothing whatsoever to do with these handles. -- The choice of a Deliantra, the free code+content MORPG -----==- _GNU_ http://www.deliantra.net ----==-- _ generation ---==---(_)__ __ ____ __ Marc Lehmann --==---/ / _ \/ // /\ \/ / schmorp@schmorp.de -=====/_/_//_/\_,_/ /_/\_\
On 2015-07-28 12:27:17, schmorp@schmorp.de wrote: Show quoted text
> Hi! > > We sometimes have crashes when loading Tree::DAG_Node in one of our > servers. > > The reason turned out to be Tree::DAG_Node mucking with > STDIN/STDOUT/STDERR in rather unexpected ways: > > use open qw(:std :utf8); # Undeclared streams in UTF-8. > > This caused data corruption because it ignores the user/program-configured > encoding and enforces utf-8. For streams that do not support this, you get a > crash on loading, for others you get silent data corruption. > > I suggest simply dropping this line - modules should not silently > change STDIN/OUT/ERR, especially not on loading, when they ahve nothing > whatsoever to do with these handles. >
Isn't this supposed to be fixed in the latest version? See https://rt.cpan.org/Ticket/Display.html?id=105798
Subject: Re: [rt.cpan.org #106130] Tree::DAG_Node mucks with STDIN/STDOUT
Date: Wed, 29 Jul 2015 08:58:25 +1000
To: bug-Tree-DAG_Node [...] rt.cpan.org
From: Ron Savage <ron [...] savage.net.au>
Hi Slaven Yes. $many x $thanx for being aware of that. See: https://metacpan.org/source/RSAVAGE/Tree-DAG_Node-1.27/lib/Tree/DAG_Node.pm See also this discussion: https://rt.cpan.org/Ticket/Display.html?id=105798 On 29/07/15 02:44, Slaven_Rezic via RT wrote: Show quoted text
> Queue: Tree-DAG_Node > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=106130 > > > On 2015-07-28 12:27:17, schmorp@schmorp.de wrote:
>> Hi! >> >> We sometimes have crashes when loading Tree::DAG_Node in one of our >> servers. >> >> The reason turned out to be Tree::DAG_Node mucking with >> STDIN/STDOUT/STDERR in rather unexpected ways: >> >> use open qw(:std :utf8); # Undeclared streams in UTF-8. >> >> This caused data corruption because it ignores the user/program-configured >> encoding and enforces utf-8. For streams that do not support this, you get a >> crash on loading, for others you get silent data corruption. >> >> I suggest simply dropping this line - modules should not silently >> change STDIN/OUT/ERR, especially not on loading, when they ahve nothing >> whatsoever to do with these handles. >>
> > Isn't this supposed to be fixed in the latest version? See > https://rt.cpan.org/Ticket/Display.html?id=105798 > >
-- Ron Savage - savage.net.au
Subject: Re: [rt.cpan.org #106130] Tree::DAG_Node mucks with STDIN/STDOUT
Date: Wed, 29 Jul 2015 10:41:00 +0200
To: Slaven_Rezic via RT <bug-Tree-DAG_Node [...] rt.cpan.org>
From: Marc Lehmann <schmorp [...] schmorp.de>
On Tue, Jul 28, 2015 at 12:44:59PM -0400, Slaven_Rezic via RT <bug-Tree-DAG_Node@rt.cpan.org> wrote: Show quoted text
> > The reason turned out to be Tree::DAG_Node mucking with > > STDIN/STDOUT/STDERR in rather unexpected ways: > > > > use open qw(:std :utf8); # Undeclared streams in UTF-8. > > > > This caused data corruption because it ignores the user/program-configured > > encoding and enforces utf-8. For streams that do not support this, you get a > > crash on loading, for others you get silent data corruption. > > > > I suggest simply dropping this line - modules should not silently > > change STDIN/OUT/ERR, especially not on loading, when they ahve nothing > > whatsoever to do with these handles. > >
> > Isn't this supposed to be fixed in the latest version? See > https://rt.cpan.org/Ticket/Display.html?id=105798
Looks like it's exactly that problem - I probably hit a stale mirror, because I only recently upgraded. -- The choice of a Deliantra, the free code+content MORPG -----==- _GNU_ http://www.deliantra.net ----==-- _ generation ---==---(_)__ __ ____ __ Marc Lehmann --==---/ / _ \/ // /\ \/ / schmorp@schmorp.de -=====/_/_//_/\_,_/ /_/\_\
Subject: Re: [rt.cpan.org #106130] Tree::DAG_Node mucks with STDIN/STDOUT
Date: Wed, 29 Jul 2015 10:45:08 +0200
To: "ron [...] savage.net.au via RT" <bug-Tree-DAG_Node [...] rt.cpan.org>
From: Marc Lehmann <schmorp [...] schmorp.de>
On Tue, Jul 28, 2015 at 06:53:26PM -0400, "ron@savage.net.au via RT" <bug-Tree-DAG_Node@rt.cpan.org> wrote: Show quoted text
> See also this discussion: > > https://rt.cpan.org/Ticket/Display.html?id=105798
Ah, I see - the problem is that you used the standard preamble _for these examples_ by Tom Crhistiansen that is meant for _these perl programs_. But perl modules are not programs, so using a standard preamble meant for other programs is a bad idea in a CPAN module in general. -- The choice of a Deliantra, the free code+content MORPG -----==- _GNU_ http://www.deliantra.net ----==-- _ generation ---==---(_)__ __ ____ __ Marc Lehmann --==---/ / _ \/ // /\ \/ / schmorp@schmorp.de -=====/_/_//_/\_,_/ /_/\_\
Fixed in V 1.27.