New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bleadperl v5.15.7-414-g2e2b257 breaks DAGOLDEN/Capture-Tiny-0.16.tar.gz #11963
Comments
From @andkgit bisect commit 2e2b257 perl #77654: quotemeta quotes non-ASCII consistently diagnostics Test Summary Report t/08-stdin-closed.t (Wstat: 46336 Tests: 872 Failed: 181) perl -V Summary of my perl5 (revision 5 version 15 subversion 7) configuration: Characteristics of this binary (from libperl): -- |
From @khwilliamsonOn 02/18/2012 11:40 PM, (Andreas J. Koenig) (via RT) wrote:
On 02/08/2012 04:36 AM, Nicholas Clark wrote: When Nicholas said that, I thought he was being metaphorical in the use And the character that is failing these tests isn't the Pound Sterling The offending blead commit changed things so that WHITE SMILING FACE is |
The RT System itself - Status changed from 'new' to 'open' |
From @xdgThe errors occur in a test for the case of STDIN being closed before I'm perplexed as to how this commit could be responsible for breaking |
From @khwilliamsonOn 02/19/2012 09:11 PM, David Golden via RT wrote:
I agree that my analysis was superficial. There is something deeper What the quotemeta commit did is essentially extend quoting to non-ASCII (In UTF-8 strings, all the non-ASCII Latin1 chars were treated the same The line that was failing in Capture::Tiny's tests as a result of the unicode => 'Hi! \x{263A}\n' U+263A is "WHITE SMILING FACE", which is a \W character, and so should unicode => 'Hi! \\\x{263A}\n' And all tests passed. I did not understand precisely why, but I don't The module author asked me to come up with a patch that would work prior unicode => 'Hi! \x{100}\n' \x{100} should not be quoted. But things still fail, including tests pp_quotemeta appears to allocate enough space to allow every character |
From @xdgMore data, but no answers: I have confirmed that simply removing "close I.e. this change is sufficient to pass tests: diff --git a/t/08-stdin-closed.t b/t/08-stdin-closed.t Capture::Tiny does temporarily reopen a closed STDIN while setting up |
From @xdgNext "clue": with Capture::Tiny debugging output uncommented and Diff'ing the two and ignoring refaddr changes, somewhere in the middle I -# open STDIN, </dev/null as 0 Note that when STDIN is closed (i.e. when C<! defined fileno STDIN>), I have not been able to replicate this outside Capture::Tiny yet, however. |
From @khwilliamsonOn 02/21/2012 01:01 PM, David Golden via RT wrote:
I did verify that there were no errors found by valgrind perl -Ilib -E "say quotemeta 'Hi! \x{263A}\n'" However, the result was unexpected, as I forgot that quotemeta on a \x{} Hi\!\ \\x\{263A\}\\n It doesn't treat it as a sequence, but individual characters. Thus However, this is a single-quoted string. I don't know how it actually |
From @xdgn Tue, Feb 21, 2012 at 7:55 PM, Karl Williamson
FWIW, the text in the Capture::Tiny tests gets run through eval and qq $ /opt/perl/perl5.15.7-afterbreak/bin/perl -C -wE 'say quotemeta eval (There are various reasons why the tests work in that convoluted -- David |
From @khwilliamsonOn 02/21/2012 08:16 PM, David Golden wrote:
So, I later tested valgrind ./perl -Ilib -E 'my $x = "Hi! \x{263A}\n"; say quotemeta $x' And it works correctly, valgrind gave no buffer read/write errors |
From @xdgI narrowed down the source of error. This change (disabling the Inline Patchdiff --git a/pp.c b/pp.c
index 93e59fa..e8a3db6 100644
--- a/pp.c
+++ b/pp.c
@@ -4102,7 +4102,7 @@ PP(pp_quotemeta)
to_quote = TRUE;
}
}
- else if (_is_utf8_quotemeta(s)) {
+ else if (0) {
to_quote = TRUE;
}
Inline Patchdiff --git a/pp.c b/pp.c
index 93e59fa..5e370c4 100644
--- a/pp.c
+++ b/pp.c
@@ -4106,7 +4106,7 @@ PP(pp_quotemeta)
to_quote = TRUE;
}
- if (to_quote) {
+ if (0) {
*d++ = '\\';
}
if (ulen > len)
-- David |
From @xdgOn Tue Feb 21 21:14:22 2012, dagolden@cpan.org wrote:
My hypothesis/wild-guess is that something in the on-demand swash -- David |
From @xdgMore triangulation: in the failing Capture::Tiny test file, calling It *does* give a workaround to get Capture::Tiny passing again on blead, Inline Patchdiff --git a/t/08-stdin-closed.t b/t/08-stdin-closed.t
index 81fd6dc..c0606aa 100644
--- a/t/08-stdin-closed.t
+++ b/t/08-stdin-closed.t
@@ -19,6 +19,8 @@ plan 'no_plan';
my $builder = Test::More->builder;
binmode($builder->failure_output, ':utf8') if $] >= 5.008;
+my $qm = quotemeta("\x{263a}");
+
save_std(qw/stdin/);
ok( close STDIN, "closed STDIN" ); |
From @khwilliamsonOn 02/21/2012 10:42 PM, David Golden via RT wrote:
This makes some sense. The code that does that load is in local $@; where $file has been set up to point to the file that contains the However, that jogged my memory with these lines from the pod of charnames: "Since evaluation of the translation function (see L</CUSTOM I don't know enough about this area of Perl to know if that statement is |
From @xdgIssues were determined on IRC to be related to an existing bug: https://rt-archive.perl.org/perl5/Ticket/Display.html?id=37033 I'm closing this ticket as Capture::Tiny 0.17 has a passable workaround |
From [Unknown Contact. See original ticket]Issues were determined on IRC to be related to an existing bug: https://rt-archive.perl.org/perl5/Ticket/Display.html?id=37033 I'm closing this ticket as Capture::Tiny 0.17 has a passable workaround |
@xdg - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#111070 (status was 'resolved')
Searchable as RT111070$
The text was updated successfully, but these errors were encountered: