Skip Menu |

This queue is for tickets about the Encode CPAN distribution.

Report information
The Basics
Id: 103896
Status: resolved
Priority: 0/
Queue: Encode

People
Owner: Nobody in particular
Requestors: ANDK [...] cpan.org
Cc: pali [...] cpan.org
AdminCc:

Bug Information
Severity: (no value)
Broken in:
  • 2.73
  • 2.83
  • 2.84
  • 2.87
Fixed in: 2.88



Subject: Fails when Encode::IBM is installed
Sample fail report: http://www.cpantesters.org/cpan/report/54386145 I just reproduced a similar report with a perl that first produced a pass report, then I installed Encode::IMAPUTF7 and Encode::IBM, then I re-tested Encode and it failed. Similarly I could reproduce it with Encode::IBM alone, without Encode::IMAPUTF7, but then only four tests failed instead of six. Let me know if you need further details. HTH&&Thanks,
On 2015-04-22 23:17:13, ANDK wrote: Show quoted text
> Sample fail report: > > http://www.cpantesters.org/cpan/report/54386145 > > I just reproduced a similar report with a perl that first produced a > pass report, then I installed Encode::IMAPUTF7 and Encode::IBM, then I > re-tested Encode and it failed. > > Similarly I could reproduce it with Encode::IBM alone, without > Encode::IMAPUTF7, but then only four tests failed instead of six. > > Let me know if you need further details. > > HTH&&Thanks,
This still fails with Encode 2.83: http://analysis.cpantesters.org/solved?distv=Encode-2.83 (A note for smokers to reproduce: it's not enough to just test Encode::IMAPUTF7 and Encode::IBM and have these modules just in PERL5LIB --- these two (or just one of them?) have to be installed)
On Sat Mar 26 14:13:55 2016, SREZIC wrote: Show quoted text
> On 2015-04-22 23:17:13, ANDK wrote:
> > Sample fail report: > > > > http://www.cpantesters.org/cpan/report/54386145 > > > > I just reproduced a similar report with a perl that first produced a > > pass report, then I installed Encode::IMAPUTF7 and Encode::IBM, then > > I > > re-tested Encode and it failed. > > > > Similarly I could reproduce it with Encode::IBM alone, without > > Encode::IMAPUTF7, but then only four tests failed instead of six. > > > > Let me know if you need further details. > > > > HTH&&Thanks,
> > This still fails with Encode 2.83: > http://analysis.cpantesters.org/solved?distv=Encode-2.83 > > (A note for smokers to reproduce: it's not enough to just test > Encode::IMAPUTF7 and Encode::IBM and have these modules just in > PERL5LIB --- these two (or just one of them?) have to be installed)
Hi! There are two problems: 1) Encode::IMAPUTF7 and Encode::IBM does not handle tainted scalars correctly. This needs to be fixed in those modules, so please report bugs to maintainers of those modules. 2) Encode and its t/tain.t test run testing function for all Encode:: modules installed to system via enc2xs -C. Not only those which are part of Encode distributions. For second problem, can you try this patch? diff --git a/t/taint.t b/t/taint.t index bfee4de..6fa46bd 100644 --- a/t/taint.t +++ b/t/taint.t @@ -1,6 +1,7 @@ #!/usr/bin/perl -T use strict; use Encode qw(encode decode); +local %Encode::ExtModule = %Encode::Config::ExtModule; use Scalar::Util qw(tainted); use Test::More; my $taint = substr($ENV{PATH},0,0); And please report how many tests was run by taint.t -- needs to verify that all encodings which are part of Encode distributions were tested.
CC: ANDK [...] cpan.org, pali [...] cpan.org
Subject: Re: [rt.cpan.org #103896] Fails when Encode::IBM is installed
Date: Thu, 10 Nov 2016 14:12:48 +0100
To: "Pali via RT" <bug-Encode [...] rt.cpan.org>
From: Andreas Koenig <andreas.koenig.7os6VVqR [...] franz.ak.mind.de>
Show quoted text
>>>>> On Thu, 10 Nov 2016 03:55:38 -0500, "Pali via RT" <bug-Encode@rt.cpan.org> said:
I picked one of my smokers for bleadperl v5.25.6-159-g96027ab and verified first that DANKOGAI/Encode-2.87.tar.gz still fails with : Test Summary Report : ------------------- : t/taint.t (Wstat: 1536 Tests: 622 Failed: 6) : Failed tests: 139, 141, 147, 151, 155-156 : Non-zero exit status: 6 : Files=38, Tests=7231, 13 wallclock secs ( 0.64 usr 0.06 sys + 6.80 cusr 0.36 csys = 7.86 CPU) : Result: FAIL : Failed 1/38 test programs. 6/7231 subtests failed. I then applied you patch and got : [...] : t/taint.t .................. ok : t/Unicode.t ................ ok : t/utf8ref.t ................ ok : t/utf8strict.t ............. ok : t/utf8warnings.t ........... ok : All tests successful. : Files=38, Tests=7107, 10 wallclock secs ( 0.68 usr 0.06 sys + 6.78 cusr 0.37 csys = 7.89 CPU) I like this fix. It makes test results predictable. Thanks, -- andreas
On Thu Nov 10 08:13:03 2016, andreas.koenig.7os6VVqR@franz.ak.mind.de wrote: Show quoted text
> >>>>> On Thu, 10 Nov 2016 03:55:38 -0500, "Pali via RT" <bug- > >>>>> Encode@rt.cpan.org> said:
> > I picked one of my smokers for bleadperl v5.25.6-159-g96027ab and > verified first that DANKOGAI/Encode-2.87.tar.gz still fails with > > : Test Summary Report > : ------------------- > : t/taint.t (Wstat: 1536 Tests: 622 Failed: 6) > : Failed tests: 139, 141, 147, 151, 155-156 > : Non-zero exit status: 6 > : Files=38, Tests=7231, 13 wallclock secs ( 0.64 usr 0.06 sys + 6.80 > cusr 0.36 csys = 7.86 CPU) > : Result: FAIL > : Failed 1/38 test programs. 6/7231 subtests failed. > > I then applied you patch and got > > : [...] > : t/taint.t .................. ok > : t/Unicode.t ................ ok > : t/utf8ref.t ................ ok > : t/utf8strict.t ............. ok > : t/utf8warnings.t ........... ok > : All tests successful. > : Files=38, Tests=7107, 10 wallclock secs ( 0.68 usr 0.06 sys + 6.78 > cusr 0.37 csys = 7.89 CPU) > > I like this fix. It makes test results predictable. > > Thanks,
Hi! Can you run t/taint.t in verbose mode and tell how many tests that one file produced?
CC: ANDK [...] cpan.org, pali [...] cpan.org
Subject: Re: [rt.cpan.org #103896] Fails when Encode::IBM is installed
Date: Thu, 10 Nov 2016 16:53:10 +0100
To: "Pali via RT" <bug-Encode [...] rt.cpan.org>
From: Andreas Koenig <andreas.koenig.7os6VVqR [...] franz.ak.mind.de>
Show quoted text
>>>>> On Thu, 10 Nov 2016 08:16:55 -0500, "Pali via RT" <bug-Encode@rt.cpan.org> said:
Show quoted text
> Hi! Can you run t/taint.t in verbose mode and tell how many tests that one file produced?
% make test TEST_FILES=t/taint.t TEST_VERBOSE=1 |& tail -23 ok 480 - decode UTF-16BE ok 481 - encode UTF-16LE ok 482 - decode UTF-16LE ok 483 - encode UTF-32 ok 484 - decode UTF-32 ok 485 - encode UTF-32BE ok 486 - decode UTF-32BE ok 487 - encode UTF-32LE ok 488 - decode UTF-32LE ok 489 - encode UTF-7 ok 490 - decode UTF-7 ok 491 - encode utf-8-strict ok 492 - decode utf-8-strict ok 493 - encode utf8 ok 494 - decode utf8 ok 495 - encode viscii ok 496 - decode viscii ok 497 - Encode::_utf8_on does not work on tainted values ok 498 - Encode::_utf8_off does not work on tainted values ok All tests successful. Files=1, Tests=498, 0 wallclock secs ( 0.04 usr 0.02 sys + 0.09 cusr 0.01 csys = 0.16 CPU) Result: PASS HTH, -- andreas
On Štv Nov 10 10:53:21 2016, andreas.koenig.7os6VVqR@franz.ak.mind.de wrote: Show quoted text
> All tests successful. > Files=1, Tests=498, 0 wallclock secs ( 0.04 usr 0.02 sys + 0.09
That is correct. Thank you for testing!
On Pia Nov 11 05:10:13 2016, PALI wrote: Show quoted text
> On Štv Nov 10 10:53:21 2016, andreas.koenig.7os6VVqR@franz.ak.mind.de wrote:
> > All tests successful. > > Files=1, Tests=498, 0 wallclock secs ( 0.04 usr 0.02 sys + 0.09
> > That is correct. Thank you for testing!
Patch is waiting in this pull request: https://github.com/dankogai/p5-encode/pull/83
On Uto Nov 29 16:57:57 2016, PALI wrote: Show quoted text
> On Pia Nov 11 05:10:13 2016, PALI wrote:
> > On Štv Nov 10 10:53:21 2016, andreas.koenig.7os6VVqR@franz.ak.mind.de > > wrote:
> > > All tests successful. > > > Files=1, Tests=498, 0 wallclock secs ( 0.04 usr 0.02 sys + 0.09
> > > > That is correct. Thank you for testing!
> > Patch is waiting in this pull request: https://github.com/dankogai/p5- > encode/pull/83
Now it is part of Encode 2.88.