Skip Menu |

Date: Wed, 1 Nov 2017 11:52:52 -0400
From: James E Keenan <jkeenan [...] pobox.com>
Subject: BBC: Commit e839e6ed99c6b25aee589f56bb58de2f8fa00f41 breaks Bit-Vector-7.4
To: perlbug [...] perl.org
Download (untitled) / with headers
text/plain 795b
This recent commit ... ##### commit e839e6ed99c6b25aee589f56bb58de2f8fa00f41 Author: David Mitchell <davem@iabyn.com> AuthorDate: Tue Aug 8 18:42:14 2017 +0100 Commit: David Mitchell <davem@iabyn.com> CommitDate: Tue Oct 31 15:31:26 2017 +0000 Add OP_MULTICONCAT op Allow multiple OP_CONCAT, OP_CONST ops, plus optionally an OP_SASSIGN or OP_STRINGIFY, to be combined into a single OP_MULTICONCAT op, which can make things a *lot* faster: 4x or more. ... ##### ... appears to have broken CPAN distribution Bit-Vector, version 7.4. 5 unit tests in t/30__overloaded.t start failing at the commit cited. The tests in that test file are not very debugging-friendly. I will attach a reduced test script once I have an RT number. Thank you very much. Jim Keenan
Download e839e6e.perl.V.txt
text/plain 3.3k

Message body is not shown because sender requested not to inline it.

RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 1.1k
On Wed, 01 Nov 2017 15:53:12 GMT, jkeenan@pobox.com wrote: Show quoted text
> > This recent commit ... > > ##### > commit e839e6ed99c6b25aee589f56bb58de2f8fa00f41 > Author: David Mitchell <davem@iabyn.com> > AuthorDate: Tue Aug 8 18:42:14 2017 +0100 > Commit: David Mitchell <davem@iabyn.com> > CommitDate: Tue Oct 31 15:31:26 2017 +0000 > > Add OP_MULTICONCAT op > > Allow multiple OP_CONCAT, OP_CONST ops, plus optionally an OP_SASSIGN > or OP_STRINGIFY, to be combined into a single OP_MULTICONCAT op, > which can > make things a *lot* faster: 4x or more. > ... > ##### > > ... appears to have broken CPAN distribution Bit-Vector, version 7.4. 5 > unit tests in t/30__overloaded.t start failing at the commit cited. > > The tests in that test file are not very debugging-friendly. I will > attach a reduced test script once I have an RT number. > > Thank you very much. > Jim Keenan
Attaching 132385-bit-vector-overload.t. This is a couple of hours work reducing t/30__overload.t from the Bit-Vector CPAN distribution. The 'zzz' tests pass with perl-5.26.0 and start to fail at the commit cited. Thank you very much. -- James E Keenan (jkeenan@cpan.org)
Subject: 132385-bit-vector-overload.t
#!perl -w use strict; no strict "vars"; use Bit::Vector::Overload; $Bit::Vector::CONFIG[2] = 3; use Test::More (tests => 15); # wrong parameter checks: no warnings 'once'; $set = Bit::Vector->new(500); $operator = '.'; %operator_list = ( $operator => 2 ); $parms = $operator_list{$operator}; $obj = 0x000E9CE0; $fake = \$obj; ok(ref($fake) eq 'SCALAR', 'SCALAR reference'); test_fake($parms); $fake = [ ]; ok(ref($fake) eq 'ARRAY', 'ARRAY reference'); test_fake($parms); $fake = { }; ok(ref($fake) eq 'HASH', 'HASH reference'); test_fake($parms); $fake = sub { }; ok(ref($fake) eq 'CODE', 'CODE reference'); test_fake($parms); $obj = { }; $fake = \$obj; ok(ref($fake) eq 'REF', 'REF reference'); test_fake($parms); sub test_fake { my($parms) = @_; my($op,$message); $op = $operator; $op =~ s/^[a-wyz]+$/cmp/; $message = quotemeta("illegal operand type in overloaded '$op' operator"); $action = "\$temp = \$set $operator \$fake"; eval "$action"; ok($@ =~ $message, "yyy"); $action = "\$temp = \$fake $operator \$set"; eval "$action"; ok($@ =~ $message, "zzz"); }
Download (untitled) / with headers
text/plain 226b
Bit::Vector has extensive dependencies: http://deps.cpantesters.org/depended-on-by.pl?dist=Bit-Vector So we should prioritize investigation of these test failures. Thank you very much. -- James E Keenan (jkeenan@cpan.org)
Date: Fri, 03 Nov 2017 21:23:03 +0100
From: Andreas Koenig <andreas.koenig.7os6VVqR [...] franz.ak.mind.de>
Subject: Re: [perl #132385] BBC: Commit e839e6ed99c6b25aee589f56bb58de2f8fa00f41 breaks Bit-Vector-7.4
To: perl5-porters [...] perl.org
Also affected: BRUMMETT/Devel-Chitin-0.11.tar.gz -- andreas
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 607b
On Fri, 03 Nov 2017 20:23:20 GMT, andreas.koenig.7os6VVqR@franz.ak.mind.de wrote: Show quoted text
> Also affected: BRUMMETT/Devel-Chitin-0.11.tar.gz
Here is the output from the failing test. This may be more easily diagnosable than the Bit-Vector problem, as the output has language which points to the part of the code recently changed. Since this is a module that pokes down into the Perl (debugging) internals, it may be a case where the expectations expressed in the failing tests need to be updated to reflect (presumably sound) changes in the internals. Thank you very much. -- James E Keenan (jkeenan@cpan.org)
Subject: 132385-devel-chitin-t-20-optree-t.output.txt.gz

Message body not shown because it is not plain text.

Date: Sat, 4 Nov 2017 11:26:37 +0000
CC: perl5-porters [...] perl.org
To: James E Keenan via RT <perlbug-followup [...] perl.org>
From: Dave Mitchell <davem [...] iabyn.com>
Subject: Re: [perl #132385] BBC: Commit e839e6ed99c6b25aee589f56bb58de2f8fa00f41 breaks Bit-Vector-7.4
Download (untitled) / with headers
text/plain 1.8k
On Wed, Nov 01, 2017 at 09:01:38AM -0700, James E Keenan via RT wrote: Show quoted text
> On Wed, 01 Nov 2017 15:53:12 GMT, jkeenan@pobox.com wrote:
> > > > This recent commit ... > > > > ##### > > commit e839e6ed99c6b25aee589f56bb58de2f8fa00f41 > > Author: David Mitchell <davem@iabyn.com> > > AuthorDate: Tue Aug 8 18:42:14 2017 +0100 > > Commit: David Mitchell <davem@iabyn.com> > > CommitDate: Tue Oct 31 15:31:26 2017 +0000 > > > > Add OP_MULTICONCAT op > > > > Allow multiple OP_CONCAT, OP_CONST ops, plus optionally an OP_SASSIGN > > or OP_STRINGIFY, to be combined into a single OP_MULTICONCAT op, > > which can > > make things a *lot* faster: 4x or more. > > ... > > ##### > > > > ... appears to have broken CPAN distribution Bit-Vector, version 7.4. 5 > > unit tests in t/30__overloaded.t start failing at the commit cited. > > > > The tests in that test file are not very debugging-friendly. I will > > attach a reduced test script once I have an RT number. > > > > Thank you very much. > > Jim Keenan
>
Thanks for the reduction. I've pushed pushed this fix: commit b3ab0375cbf2dd5732e06233d36e4d80d37cf211 Author: David Mitchell <davem@iabyn.com> AuthorDate: Sat Nov 4 10:30:00 2017 +0000 Commit: David Mitchell <davem@iabyn.com> CommitDate: Sat Nov 4 10:33:51 2017 +0000 pp_multiconcat: don't stringify LHS overload arg RT #132385 In something like $a1 . $a2 where $a2 is overloaded, the concat overload method was being called like concat($a2, "$a1", 1); (The 1 indicated that the args are reversed). This commit changes it so that it's called as concat($a2, $a1, 1); i.e. that the original arg is passed in rather than a stringified copy of it. This is important if for example $a1 is a ref. -- That he said that that that that is is is debatable, is debatable.
Subject: Re: [perl #132385] BBC: Commit e839e6ed breaks Bit-Vector-7.4
From: Dave Mitchell <davem [...] iabyn.com>
Date: Sat, 4 Nov 2017 11:29:05 +0000
To: James E Keenan via RT <perlbug-followup [...] perl.org>
CC: perl5-porters [...] perl.org
On Fri, Nov 03, 2017 at 05:28:56PM -0700, James E Keenan via RT wrote: Show quoted text
> On Fri, 03 Nov 2017 20:23:20 GMT, andreas.koenig.7os6VVqR@franz.ak.mind.de wrote:
> > Also affected: BRUMMETT/Devel-Chitin-0.11.tar.gz
> > Here is the output from the failing test. This may be more easily > diagnosable than the Bit-Vector problem, as the output has language > which points to the part of the code recently changed. > > Since this is a module that pokes down into the Perl (debugging) > internals, it may be a case where the expectations expressed in the > failing tests need to be updated to reflect (presumably sound) changes > in the internals.
I haven't looked closely, but this does indeed seem to be the case. The module needs to be updated to know about the OP_MULITCONCAT op. -- Music lesson: a symbiotic relationship whereby a pupil's embellishments concerning the amount of practice performed since the last lesson are rewarded with embellishments from the teacher concerning the pupil's progress over the corresponding period.
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 1.1k
On Sat, 04 Nov 2017 11:29:24 GMT, davem wrote: Show quoted text
> On Fri, Nov 03, 2017 at 05:28:56PM -0700, James E Keenan via RT wrote:
> > On Fri, 03 Nov 2017 20:23:20 GMT, > > andreas.koenig.7os6VVqR@franz.ak.mind.de wrote:
> > > Also affected: BRUMMETT/Devel-Chitin-0.11.tar.gz
> > > > Here is the output from the failing test. This may be more easily > > diagnosable than the Bit-Vector problem, as the output has language > > which points to the part of the code recently changed. > > > > Since this is a module that pokes down into the Perl (debugging) > > internals, it may be a case where the expectations expressed in the > > failing tests need to be updated to reflect (presumably sound) > > changes > > in the internals.
> > I haven't looked closely, but this does indeed seem to be the case. > The module needs to be updated to know about the OP_MULITCONCAT op.
I have opened this ticket in Devel-Chitin's issue tracker: https://rt.cpan.org/Ticket/Display.html?id=123510 I am taking this ticket for the purpose of closing it within 7 days unless new problems are reported. Thank you very much. -- James E Keenan (jkeenan@cpan.org)
Date: Sat, 04 Nov 2017 23:05:34 +0100
Subject: Re: [perl #132385] BBC: Commit e839e6ed breaks Bit-Vector-7.4
From: Andreas Koenig <andreas.koenig.7os6VVqR [...] franz.ak.mind.de>
To: "James E Keenan via RT" <perlbug-followup [...] perl.org>
CC: perl5-porters [...] perl.org
Also affected: VPIT/Lexical-Types-0.16.tar.gz -- andreas
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 1.2k
On Sat, 04 Nov 2017 22:05:55 GMT, andreas.koenig.7os6VVqR@franz.ak.mind.de wrote: Show quoted text
> Also affected: VPIT/Lexical-Types-0.16.tar.gz >
Here is the failure output for this library at commit 83a320f: ##### [Lexical-Types-0.16] 876 $ bleadprove t/24-scalar-tie.t t/24-scalar-tie.t .. 1..12 ok 1 - $x ok 2 - $x contains the right thing ok 3 - $x . "foo" ok 4 - $x . "foo" contains the right thing not ok 5 - $y # Failed test '$y' # at t/24-scalar-tie.t line 49. # got: '' # expected: 'Lexical::Types::Test::Str' ok 6 - $y contains the right thing ok 7 - $x ok 8 - $x contains the right thing ok 9 - $x . "foo" ok 10 - $x . "foo" contains the right thing not ok 11 - $y # Failed test '$y' # at t/24-scalar-tie.t line 49. # got: '' # expected: 'Lexical::Types::Test::Str' ok 12 - $y contains the right thing # Looks like you failed 2 tests of 12. Dubious, test returned 2 (wstat 512, 0x200) Failed 2/12 subtests Test Summary Report ------------------- t/24-scalar-tie.t (Wstat: 512 Tests: 12 Failed: 2) Failed tests: 5, 11 Non-zero exit status: 2 Files=1, Tests=12, 0 wallclock secs ( 0.03 usr 0.00 sys + 0.04 cusr 0.00 csys = 0.07 CPU) Result: FAIL ##### -- James E Keenan (jkeenan@cpan.org)
Date: Sun, 5 Nov 2017 14:04:41 +0000
Subject: Re: [perl #132385] BBC: Commit e839e6ed breaks Bit-Vector-7.4
To: Andreas Koenig <andreas.koenig.7os6VVqR [...] franz.ak.mind.de>
From: Dave Mitchell <davem [...] iabyn.com>
CC: James E Keenan via RT <perlbug-followup [...] perl.org>, perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 669b
On Sat, Nov 04, 2017 at 11:05:34PM +0100, Andreas Koenig wrote: Show quoted text
> Also affected: VPIT/Lexical-Types-0.16.tar.gz
The first test which fails is using this code my Str $y = "bar" . $x; and the OP_MULTICONCAT optimisation optimises away the padsv($y) and sassign. Vincent either needs to fix Lexical-Types to cope with this new reality, or come up with a good reason why concatenation to typed lexicals shouldn't be optimised, or should be optimised in a different way. -- A power surge on the Bridge is rapidly and correctly diagnosed as a faulty capacitor by the highly-trained and competent engineering staff. -- Things That Never Happen in "Star Trek" #9
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 910b
On Sun, 05 Nov 2017 14:05:01 GMT, davem wrote: Show quoted text
> On Sat, Nov 04, 2017 at 11:05:34PM +0100, Andreas Koenig wrote:
> > Also affected: VPIT/Lexical-Types-0.16.tar.gz
> > The first test which fails is using this code > > my Str $y = "bar" . $x; > > and the OP_MULTICONCAT optimisation optimises away the padsv($y) and > sassign. > > Vincent either needs to fix Lexical-Types to cope with this new reality, > or come up with a good reason why concatenation to typed lexicals > shouldn't be optimised, or should be optimised in a different way. >
Dave, that makes it seems as if this code change is a fait accompli. While I think the change is probably beneficial, I suspect I'm not alone in having been unaware of the change until it actually happened. Since the change probably breaks previously legitimate code, can you provide more context? Thank you very much. -- James E Keenan (jkeenan@cpan.org)
To: perl5-porters [...] perl.org
From: "Vincent Pit (VPIT)" <perl [...] profvince.com>
Date: Sun, 5 Nov 2017 16:33:56 +0100
Subject: Re: [perl #132385] BBC: Commit e839e6ed breaks Bit-Vector-7.4
Download (untitled) / with headers
text/plain 698b
Le 05/11/2017 à 15:04, Dave Mitchell a écrit : Show quoted text
> On Sat, Nov 04, 2017 at 11:05:34PM +0100, Andreas Koenig wrote:
>> Also affected: VPIT/Lexical-Types-0.16.tar.gz
> > The first test which fails is using this code > > my Str $y = "bar" . $x; > > and the OP_MULTICONCAT optimisation optimises away the padsv($y) and > sassign. > > Vincent either needs to fix Lexical-Types to cope with this new reality, > or come up with a good reason why concatenation to typed lexicals > shouldn't be optimised, or should be optimised in a different way. >
Vincent might end up fixing this, but for the time being he doesn't feel like he "needs" to do anything. This is volunteer work, after all.
To: Dave Mitchell <davem [...] iabyn.com>, Andreas Koenig <andreas.koenig.7os6VVqR [...] franz.ak.mind.de>
From: Sawyer X <xsawyerx [...] gmail.com>
CC: James E Keenan via RT <perlbug-followup [...] perl.org>, perl5-porters [...] perl.org
Date: Sun, 5 Nov 2017 22:39:55 +0100
Subject: Re: [perl #132385] BBC: Commit e839e6ed breaks Bit-Vector-7.4
Download (untitled) / with headers
text/plain 369b
On 11/05/2017 03:04 PM, Dave Mitchell wrote: Show quoted text
> On Sat, Nov 04, 2017 at 11:05:34PM +0100, Andreas Koenig wrote:
>> Also affected: VPIT/Lexical-Types-0.16.tar.gz
> The first test which fails is using this code > > my Str $y = "bar" . $x; > > and the OP_MULTICONCAT optimisation optimises away the padsv($y) and > sassign.
What is the difference in ops afterwards?
CC: Andreas Koenig <andreas.koenig.7os6VVqR [...] franz.ak.mind.de>, James E Keenan via RT <perlbug-followup [...] perl.org>, perl5-porters [...] perl.org
From: Dave Mitchell <davem [...] iabyn.com>
To: Sawyer X <xsawyerx [...] gmail.com>
Subject: Re: [perl #132385] BBC: Commit e839e6ed breaks Bit-Vector-7.4
Date: Sun, 5 Nov 2017 22:25:20 +0000
On Sun, Nov 05, 2017 at 10:39:55PM +0100, Sawyer X wrote: Show quoted text
> > > On 11/05/2017 03:04 PM, Dave Mitchell wrote:
> > On Sat, Nov 04, 2017 at 11:05:34PM +0100, Andreas Koenig wrote:
> >> Also affected: VPIT/Lexical-Types-0.16.tar.gz
> > The first test which fails is using this code > > > > my Str $y = "bar" . $x; > > > > and the OP_MULTICONCAT optimisation optimises away the padsv($y) and > > sassign.
> > What is the difference in ops afterwards?
Previously: $ perl5260t -MO=Concise,-exec -e' {package Str} my Str $y = "bar" . $x;' ... 7 <$> const[PV "bar"] s 8 <#> gvsv[*x] s 9 <2> concat[t3] sK/2 a <0> padsv[$y:3,4] sRM*/LVINTRO b <2> sassign vKS/2 now: $ ./perl -Ilib -MO=Concise,-exec -e' {package Str} my Str $y = "bar" . $x;' ... 7 <#> gvsv[*x] s 8 <+> multiconcat("bar",3,-1)[$y:3,4] vK/LVINTRO,TARGMY Note that normally, making the lexical var typed makes no difference to the generated optree, or the runtime execution. -- Red sky at night - gerroff my land! Red sky at morning - gerroff my land! -- old farmers' sayings #14
Date: Mon, 13 Nov 2017 16:12:16 +0000
Subject: Re: [perl #132385] BBC: Commit e839e6ed breaks Bit-Vector-7.4
CC: perl5-porters [...] perl.org, "Vincent Pit (VPIT)" <perl [...] profvince.com>
To: James E Keenan via RT <perlbug-followup [...] perl.org>
From: Dave Mitchell <davem [...] iabyn.com>
Download (untitled) / with headers
text/plain 1.9k
On Sun, Nov 05, 2017 at 08:43:12AM -0800, James E Keenan via RT wrote: Show quoted text
> On Sun, 05 Nov 2017 14:05:01 GMT, davem wrote:
> > On Sat, Nov 04, 2017 at 11:05:34PM +0100, Andreas Koenig wrote:
> > > Also affected: VPIT/Lexical-Types-0.16.tar.gz
> > > > The first test which fails is using this code > > > > my Str $y = "bar" . $x; > > > > and the OP_MULTICONCAT optimisation optimises away the padsv($y) and > > sassign. > > > > Vincent either needs to fix Lexical-Types to cope with this new reality, > > or come up with a good reason why concatenation to typed lexicals > > shouldn't be optimised, or should be optimised in a different way. > >
> > Dave, that makes it seems as if this code change is a fait accompli. > While I think the change is probably beneficial, I suspect I'm not alone > in having been unaware of the change until it actually happened. Since > the change probably breaks previously legitimate code, can you provide > more context?
Nothing has changed in normal perl code as far as I'm aware. All 'my Foo $foo' does is, at compile time, mark in the name slot of the pad, that the lexical has type 'Foo'. This normally has no runtime effect, apart from some extra checks in hash ref lookups to implement fields.pm functionality. Lexical-Types is doing something weird to achieve its effect. I had a quick look at the code, but couldn't tell what it was doing to achieve it. Which is why I batted it back into Vincent's court with my badly-phrased "needs to" email. A better phrasing might have been: My very provisional analysis is that perl is not at fault here. I'm happy for someone to convince me otherwise, but in the meantime I'm not imminently planning on investigating this breakage further. -- Spock (or Data) is fired from his high-ranking position for not being able to understand the most basic nuances of about one in three sentences that anyone says to him. -- Things That Never Happen in "Star Trek" #19
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 925b
On Sat, 04 Nov 2017 14:14:47 GMT, jkeenan wrote: Show quoted text
> > > On Fri, 03 Nov 2017 20:23:20 GMT, > > > andreas.koenig.7os6VVqR@franz.ak.mind.de wrote:
> > > > Also affected: BRUMMETT/Devel-Chitin-0.11.tar.gz
> > > > > > Here is the output from the failing test. This may be more easily > > > diagnosable than the Bit-Vector problem, as the output has language > > > which points to the part of the code recently changed. > > > > > > Since this is a module that pokes down into the Perl (debugging) > > > internals, it may be a case where the expectations expressed in the > > > failing tests need to be updated to reflect (presumably sound) > > > changes > > > in the internals.
> >
> I have opened this ticket in Devel-Chitin's issue tracker: > https://rt.cpan.org/Ticket/Display.html?id=123510 >
The author of Devel-Chitin has adjusted that module's code and it now installs against blead. -- James E Keenan (jkeenan@cpan.org)
Date: Thu, 16 Nov 2017 11:42:48 +0100
Subject: Re: [perl #132385] BBC: Commit e839e6ed breaks Bit-Vector-7.4
CC: perl5-porters [...] perl.org, "Vincent Pit (VPIT)" <perl [...] profvince.com>
To: Dave Mitchell <davem [...] iabyn.com>, James E Keenan via RT <perlbug-followup [...] perl.org>
From: Sawyer X <xsawyerx [...] gmail.com>
Download (untitled) / with headers
text/plain 1.9k
On 11/13/2017 05:12 PM, Dave Mitchell wrote: Show quoted text
> On Sun, Nov 05, 2017 at 08:43:12AM -0800, James E Keenan via RT wrote:
>> On Sun, 05 Nov 2017 14:05:01 GMT, davem wrote:
>>> On Sat, Nov 04, 2017 at 11:05:34PM +0100, Andreas Koenig wrote:
>>>> Also affected: VPIT/Lexical-Types-0.16.tar.gz
>>> The first test which fails is using this code >>> >>> my Str $y = "bar" . $x; >>> >>> and the OP_MULTICONCAT optimisation optimises away the padsv($y) and >>> sassign. >>> >>> Vincent either needs to fix Lexical-Types to cope with this new reality, >>> or come up with a good reason why concatenation to typed lexicals >>> shouldn't be optimised, or should be optimised in a different way. >>>
>> Dave, that makes it seems as if this code change is a fait accompli. >> While I think the change is probably beneficial, I suspect I'm not alone >> in having been unaware of the change until it actually happened. Since >> the change probably breaks previously legitimate code, can you provide >> more context?
> Nothing has changed in normal perl code as far as I'm aware. All 'my Foo > $foo' does is, at compile time, mark in the name slot of the pad, that the > lexical has type 'Foo'. This normally has no runtime effect, apart from > some extra checks in hash ref lookups to implement fields.pm > functionality. > > Lexical-Types is doing something weird to achieve its effect. I had a > quick look at the code, but couldn't tell what it was doing to achieve it. > Which is why I batted it back into Vincent's court with my badly-phrased > "needs to" email. > > A better phrasing might have been: > > My very provisional analysis is that perl is not at fault here. I'm > happy for someone to convince me otherwise, but in the meantime I'm > not imminently planning on investigating this breakage further.
This is fine by me, but I would like to keep the ticket open. Once CPAN sees a new release (or, alternatively, if Dave is provided a convincing argument why the change in core should be undone), we could resolve this issue.
From: Andreas Koenig <andreas.koenig.7os6VVqR [...] franz.ak.mind.de>
To: Sawyer X <xsawyerx [...] gmail.com>
Subject: Re: [perl #132385] BBC: Commit e839e6ed breaks Bit-Vector-7.4
Date: Fri, 17 Nov 2017 16:21:19 +0100
CC: Dave Mitchell <davem [...] iabyn.com>, James E Keenan via RT <perlbug-followup [...] perl.org>, perl5-porters [...] perl.org, "Vincent Pit \(VPIT\)" <perl [...] profvince.com>
Als affected: ASG/Whatever-0.23.tar.gz -- andreas
To: Andreas Koenig <andreas.koenig.7os6VVqR [...] franz.ak.mind.de>
Date: Mon, 20 Nov 2017 15:38:55 +0000
Subject: Re: [perl #132385] BBC: Commit e839e6ed breaks Bit-Vector-7.4
CC: Sawyer X <xsawyerx [...] gmail.com>, James E Keenan via RT <perlbug-followup [...] perl.org>, perl5-porters [...] perl.org, "Vincent Pit (VPIT)" <perl [...] profvince.com>
From: Dave Mitchell <davem [...] iabyn.com>
Download (untitled) / with headers
text/plain 1.2k
On Fri, Nov 17, 2017 at 04:21:19PM +0100, Andreas Koenig wrote: Show quoted text
> Als affected: ASG/Whatever-0.23.tar.gz
Fixed with the below: commit 1a98acd9b14cfb3953d2b14eee2394454f92f0c8 Author: David Mitchell <davem@iabyn.com> AuthorDate: Mon Nov 20 15:19:59 2017 +0000 Commit: David Mitchell <davem@iabyn.com> CommitDate: Mon Nov 20 15:26:47 2017 +0000 MULTICONCAT - use distinct TMPS for const overload Because OP_MULTICONCAT optimises away any const SVs, they have to be recreated if a concat overload method is called. Up until now (for efficiency) the same SvTEMP was used to create each const TEMP. This caused problems if an overload method saved a ref to the argument. This is easily fixed by not reusing the TEMP (and the extra inefficiency is small compared to the overall burden of calling out to an overloaded method). With this patch, the following test code changes from getting "BB" to getting "AB": my @a; use overload '.' => sub { push @a, \$_[1]; $_[0] }; my $o = bless []; my $x = $o . "A" . $o . 'B'; is "${$a[0]}${$a[2]}", "AB", "RT #132385"; -- "Emacs isn't a bad OS once you get used to it. It just lacks a decent editor."
RT-Send-CC: perl5-porters [...] perl.org
On Mon, 20 Nov 2017 15:39:20 GMT, davem wrote: Show quoted text
> On Fri, Nov 17, 2017 at 04:21:19PM +0100, Andreas Koenig wrote:
> > Als affected: ASG/Whatever-0.23.tar.gz
> > Fixed with the below: > > commit 1a98acd9b14cfb3953d2b14eee2394454f92f0c8 > Author: David Mitchell <davem@iabyn.com> > AuthorDate: Mon Nov 20 15:19:59 2017 +0000 > Commit: David Mitchell <davem@iabyn.com> > CommitDate: Mon Nov 20 15:26:47 2017 +0000 > > MULTICONCAT - use distinct TMPS for const overload > > Because OP_MULTICONCAT optimises away any const SVs, they have to be > recreated if a concat overload method is called. Up until now (for > efficiency) the same SvTEMP was used to create each const TEMP. This > caused problems if an overload method saved a ref to the argument. > > This is easily fixed by not reusing the TEMP (and the extra inefficiency > is small compared to the overall burden of calling out to an overloaded > method). > > With this patch, the following test code changes from getting "BB" to > getting "AB": > > my @a; > use overload '.' => sub { push @a, \$_[1]; $_[0] }; > my $o = bless []; > my $x = $o . "A" . $o . 'B'; > is "${$a[0]}${$a[2]}", "AB", "RT #132385"; > >
So the only issue left in this ticket is the failure in Lexical-Types, which still is present. ##### t/00-load.t ............... 1/1 # Testing Lexical::Types 0.16, Perl 5.027006, /home/jkeenan/testing/blead/bin/perl t/00-load.t ............... ok t/09-load-threads.t ....... skipped: This perl wasn't built to support threads t/10-args.t ............... ok t/11-integrate.t .......... ok t/12-ro.t ................. ok t/20-scalar-base.t ........ ok t/21-scalar-padsv.t ....... ok t/22-scalar-constants.t ... ok t/23-scalar-object.t ...... ok t/24-scalar-tie.t ......... 1/12 # Failed test '$y' # at t/24-scalar-tie.t line 49. # got: '' # expected: 'Lexical::Types::Test::Str' # Failed test '$y' # at t/24-scalar-tie.t line 49. # got: '' # expected: 'Lexical::Types::Test::Str' # Looks like you failed 2 tests of 12. t/24-scalar-tie.t ......... Dubious, test returned 2 (wstat 512, 0x200) Failed 2/12 subtests t/25-scalar-magic.t ....... skipped: Could not load Variable::Magic t/26-scalar-magic-uvar.t .. skipped: Could not load Variable::Magic 0.35 t/29-scalar-stress.t ...... ok t/70-scope.t .............. ok t/71-peep.t ............... ok t/72-hints.t .............. ok t/80-threads.t ............ skipped: This perl wasn't built to support threads t/81-threads-teardown.t ... skipped: This perl wasn't built to support threads Test Summary Report ------------------- t/24-scalar-tie.t (Wstat: 512 Tests: 12 Failed: 2) Failed tests: 5, 11 Non-zero exit status: 2 Files=18, Tests=1179, 4 wallclock secs ( 0.21 usr 0.03 sys + 1.52 cusr 0.09 csys = 1.85 CPU) Result: FAIL Failed 1/18 test programs. 2/1179 subtests failed. Makefile:1062: recipe for target 'test_dynamic' failed make: *** [test_dynamic] Error 255 FAIL ##### -- James E Keenan (jkeenan@cpan.org)
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 640b
On Wed, 01 Nov 2017 08:53:12 -0700, jkeenan@pobox.com wrote: Show quoted text
> > This recent commit ... > > ##### > commit e839e6ed99c6b25aee589f56bb58de2f8fa00f41 > Author: David Mitchell <davem@iabyn.com> > AuthorDate: Tue Aug 8 18:42:14 2017 +0100 > Commit: David Mitchell <davem@iabyn.com> > CommitDate: Tue Oct 31 15:31:26 2017 +0000 > > Add OP_MULTICONCAT op > > Allow multiple OP_CONCAT, OP_CONST ops, plus optionally an OP_SASSIGN > or OP_STRINGIFY, to be combined into a single OP_MULTICONCAT op, > which can > make things a *lot* faster: 4x or more.
Also affected: CHM/PDL-2.018.tar.gz -- Father Chrysostomos
From: Andreas Koenig <andreas.koenig.7os6VVqR [...] franz.ak.mind.de>
Subject: Re: [perl #132385] BBC: Commit e839e6ed breaks Bit-Vector-7.4
Date: Fri, 24 Nov 2017 06:40:34 +0100
CC: perl5-porters [...] perl.org
To: "Father Chrysostomos via RT" <perlbug-followup [...] perl.org>
Download (untitled) / with headers
text/plain 367b
Show quoted text
> Also affected: CHM/PDL-2.018.tar.gz
I can confirm now after in doubt for a while. Because all tests pass with the perls compiled with -Duselongdouble. It seems like some tests are skipped with uselongdouble. For example, here is a PASS report with v5.27.5-335-gf63f40368c http://www.cpantesters.org/cpan/report/4630a05c-c9c0-11e7-9d4f-d39819dcdcb4 -- andreas
Date: Fri, 24 Nov 2017 21:17:00 +1100
CC: <perl5-porters [...] perl.org>
To: <perlbug-followup [...] perl.org>
Subject: Re: [perl #132385] BBC: Commit e839e6ed breaks Bit-Vector-7.4
From: <sisyphus1 [...] optusnet.com.au>
Download (untitled) / with headers
text/plain 347b
Show quoted text
-----Original Message----- From: Father Chrysostomos via RT Sent: Friday, November 24, 2017 8:48 AM
> Also affected: CHM/PDL-2.018.tar.gz
Is there a link to the details of this breakage ? Is it the consensus of opinion that, where these breakages occur, it is up to the maintainers of the affected modules to provide the fix ? Cheers, Rob
RT-Send-CC: perl5-porters [...] perl.org
On Fri, 24 Nov 2017 10:17:51 GMT, sisyphus wrote: Show quoted text
> > -----Original Message----- > From: Father Chrysostomos via RT > Sent: Friday, November 24, 2017 8:48 AM >
> > Also affected: CHM/PDL-2.018.tar.gz
> > Is there a link to the details of this breakage ? >
It was originally reported in: https://rt.perl.org/Ticket/Display.html?id=132347. See, in particular, comment https://rt.perl.org/Ticket/Display.html?id=132347#txn-1509916. But bisection indicated that the problem was the introduction of the new operator as discussed in this ticket. Show quoted text
> Is it the consensus of opinion that, where these breakages occur, it is up > to the maintainers of the affected modules to provide the fix ? >
Oh, what bliss it would be if we had such a consensus! I think this is a case where, because the breakage is not as easily seen as, say, "'.' no longer present in @INC by default", it's not easy to whip up a patch to present to the CPAN maintainers as a gift. IMO, this is a case where we need discussion among the P5P contributors in question and the CPAN maintainers. -- James E Keenan (jkeenan@cpan.org)
From: <sisyphus1 [...] optusnet.com.au>
Subject: Re: [perl #132385] BBC: Commit e839e6ed breaks Bit-Vector-7.4
CC: <perl5-porters [...] perl.org>
To: <perlbug-followup [...] perl.org>
Date: Sat, 25 Nov 2017 23:52:50 +1100
Download (untitled) / with headers
text/plain 2.3k
Show quoted text
-----Original Message----- From: Father Chrysostomos via RT Sent: Friday, November 24, 2017 8:48 AM To: OtherRecipients of perl Ticket #132385: Cc: perl5-porters@perl.org Subject: [perl #132385] BBC: Commit e839e6ed breaks Bit-Vector-7.4
>On Wed, 01 Nov 2017 08:53:12 -0700, jkeenan@pobox.com wrote:
>> >> This recent commit ... >> >> ##### >> commit e839e6ed99c6b25aee589f56bb58de2f8fa00f41 >> Author: David Mitchell <davem@iabyn.com> >> AuthorDate: Tue Aug 8 18:42:14 2017 +0100 >> Commit: David Mitchell <davem@iabyn.com> >> CommitDate: Tue Oct 31 15:31:26 2017 +0000 >> >> Add OP_MULTICONCAT op >> >> Allow multiple OP_CONCAT, OP_CONST ops, plus optionally an >> OP_SASSIGN >> or OP_STRINGIFY, to be combined into a single OP_MULTICONCAT op, >> which can >> make things a *lot* faster: 4x or more.
> > Also affected: CHM/PDL-2.018.tar.gz
Regarding that t/image2d.t failure in PDL-2.018 with blead, I have this simple script that demonstrates the problem: ########################## use PDL; use PDL::Image2D; my $pa = ones(5,5); my $m = $pa->slice('1:3,1:3'); $m .= $pa->badvalue; print $m; ########################## The expectation is that $m will be: [ [-1.7976931e+308 -1.7976931e+308 -1.7976931e+308] [-1.7976931e+308 -1.7976931e+308 -1.7976931e+308] [-1.7976931e+308 -1.7976931e+308 -1.7976931e+308] ] and that's exactly what we get using perl-5.26.0. But using current blead (ie Karen's 5.27.6 release) we find that $m is: [ [-Inf -Inf -Inf] [-Inf -Inf -Inf] [-Inf -Inf -Inf] ] In order to get that expected value for $m using blead I have only to change the line: my $m = $pa->slice('1:3,1:3'); to $m = $pa->slice('1:3,1:3'); That such a simple change of scope should have such a marked effect has me thinking that blead is probably doing something that it ought not. However, I have not actually come to grips with what PDL's overloading of ".=" is doing - so, FAIK, my mistrust of blead could well be misplaced. (The older I get, the less transparent PDL becomes.) It might be worth pointing out that $pa->badvalue is actually the same value as POSIX::DBL_MAX * -1, and POSIX::DBL_MAX * -1 stringifies to -1.79769313486232e+308. If that value of -1.79769313486232e+308 is assigned to a double, then it is (correctly) assigned as -Inf: C:\>perl -MPOSIX -le "print POSIX::DBL_MAX * -1.0;" -1.79769313486232e+308 C:\>perl -le "print -1.79769313486232e+308;" -Inf Cheers, Rob
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 497b
On Fri, 03 Nov 2017 20:23:20 GMT, andreas.koenig.7os6VVqR@franz.ak.mind.de wrote: Show quoted text
> Also affected: BRUMMETT/Devel-Chitin-0.11.tar.gz
Also affected: Devel-Size-0.81 on OpenBSD. Please see this report: http://www.cpantesters.org/cpan/report/97573e70-ce64-11e7-a450-95551da365d6 The reporter has indicated to me that he did before/after tests which pointed to commit e839e6ed99c6b25aee589f56bb58de2f8fa00f41 ("Add OP_MULTICONCAT op"). Thank you very much. -- James E Keenan (jkeenan@cpan.org)
Subject: Re: [perl #132385] BBC: Commit e839e6ed breaks Bit-Vector-7.4
Date: Tue, 28 Nov 2017 09:25:33 +0000
To: Father Chrysostomos via RT <perlbug-followup [...] perl.org>
CC: perl5-porters [...] perl.org
From: Dave Mitchell <davem [...] iabyn.com>
Download (untitled) / with headers
text/plain 1.4k
On Thu, Nov 23, 2017 at 01:48:18PM -0800, Father Chrysostomos via RT wrote: Show quoted text
> On Wed, 01 Nov 2017 08:53:12 -0700, jkeenan@pobox.com wrote:
> > > > This recent commit ... > > > > ##### > > commit e839e6ed99c6b25aee589f56bb58de2f8fa00f41 > > Author: David Mitchell <davem@iabyn.com> > > AuthorDate: Tue Aug 8 18:42:14 2017 +0100 > > Commit: David Mitchell <davem@iabyn.com> > > CommitDate: Tue Oct 31 15:31:26 2017 +0000 > > > > Add OP_MULTICONCAT op > > > > Allow multiple OP_CONCAT, OP_CONST ops, plus optionally an OP_SASSIGN > > or OP_STRINGIFY, to be combined into a single OP_MULTICONCAT op, > > which can > > make things a *lot* faster: 4x or more.
> > Also affected: CHM/PDL-2.018.tar.gz
Now fixed with the following: commit d7e75038064881b413f76de9315a5acfb21472f0 Author: David Mitchell <davem@iabyn.com> AuthorDate: Tue Nov 28 09:08:09 2017 +0000 Commit: David Mitchell <davem@iabyn.com> CommitDate: Tue Nov 28 09:23:57 2017 +0000 $overloaded .= $x: don't stringify $x RT #132385 This is a variant of the ($ref . $overloaded) bug which was fixed with v5.27.5-195-gb3ab0375cb. Basically, when the overloaded concat method is called, it should pass $x as-is, rather than as "$x". This fixes PDL-2.018 -- "I do not resent criticism, even when, for the sake of emphasis, it parts for the time with reality". -- Winston Churchill, House of Commons, 22nd Jan 1941.
From: Dave Mitchell <davem [...] iabyn.com>
Date: Tue, 28 Nov 2017 09:29:25 +0000
CC: perl5-porters [...] perl.org
To: James E Keenan via RT <perlbug-followup [...] perl.org>
Subject: Re: [perl #132385] BBC: Commit e839e6ed breaks Bit-Vector-7.4
Download (untitled) / with headers
text/plain 954b
On Mon, Nov 27, 2017 at 04:05:38PM -0800, James E Keenan via RT wrote: Show quoted text
> On Fri, 03 Nov 2017 20:23:20 GMT, andreas.koenig.7os6VVqR@franz.ak.mind.de wrote:
> > Also affected: BRUMMETT/Devel-Chitin-0.11.tar.gz
> > Also affected: Devel-Size-0.81 on OpenBSD. Please see this report: > > http://www.cpantesters.org/cpan/report/97573e70-ce64-11e7-a450-95551da365d6 > > The reporter has indicated to me that he did before/after tests which pointed to commit e839e6ed99c6b25aee589f56bb58de2f8fa00f41 ("Add OP_MULTICONCAT op").
I can't reproduce on Linux, neither with 5.27.6 nor with today's blead which includes the new overload fix I just pushed. However, given that the test failures in that report relate to testing typeglob/CV sizes, I would suspect that the recent change to storing CVs in GVs as RVs would be more likely to have affected the test. -- The optimist believes that he lives in the best of all possible worlds. As does the pessimist.
Subject: Re: [perl #132385] BBC: Commit e839e6ed breaks Bit-Vector-7.4
To: James E Keenan via RT <perlbug-followup [...] perl.org>
CC: perl5-porters [...] perl.org
Date: Tue, 28 Nov 2017 12:02:51 +0000
From: Dave Mitchell <davem [...] iabyn.com>
Download (untitled) / with headers
text/plain 1.4k
On Fri, Nov 24, 2017 at 05:58:34AM -0800, James E Keenan via RT wrote: Show quoted text
> > Is it the consensus of opinion that, where these breakages occur, it > > is up to the maintainers of the affected modules to provide the fix ?
> > Oh, what bliss it would be if we had such a consensus! I think this is > a case where, because the breakage is not as easily seen as, say, "'.' > no longer present in @INC by default", it's not easy to whip up a patch > to present to the CPAN maintainers as a gift. IMO, this is a case where > we need discussion among the P5P contributors in question and the CPAN > maintainers.
Ultimately it *has* to be the CPAN maintainers' responsibility - otherwise p5p has just committed to itself to maintaining all of CPAN. Having said that, I make reasonable attempts to have a look at any CPAN issues that have been bisected my changes, and of course if I can identify that it's perl which is at fault, I'll fix perl; or if I can see that the module is at fault, I may suggest a fix. (Or it may be a change in undefined behaviour, in which case we can have a discussion about backwards compatibility trade-offs.) In terms of responsibility for the initial diagnosis, that sometimes depends on the nature of the module: if its a convoluted or domain-specific beastie, then the maintainer can probably more easily strip the code down to something which demonstrates that perl is at fault and bat it back. -- Dave's first rule of Opera: If something needs saying, say it: don't warble it.
From: Andreas Koenig <andreas.koenig.7os6VVqR [...] franz.ak.mind.de>
Subject: Re: [perl #132385] BBC: Commit e839e6ed breaks Bit-Vector-7.4
To: Dave Mitchell <davem [...] iabyn.com>
CC: Sawyer X <xsawyerx [...] gmail.com>, James E Keenan via RT <perlbug-followup [...] perl.org>, perl5-porters [...] perl.org, "Vincent Pit \(VPIT\)" <perl [...] profvince.com>
Date: Fri, 01 Dec 2017 05:33:30 +0100
Also affected: YANICK/XML-XSS-0.3.5.tar.gz -- andreas
From: Dave Mitchell <davem [...] iabyn.com>
Subject: Re: [perl #132385] BBC: Commit e839e6ed breaks Bit-Vector-7.4
CC: perlbug-followup [...] perl.org, perl5-porters [...] perl.org
To: Andreas Koenig <andreas.koenig.7os6VVqR [...] franz.ak.mind.de>
Date: Fri, 1 Dec 2017 15:21:39 +0000
Download (untitled) / with headers
text/plain 660b
On Fri, Dec 01, 2017 at 05:33:30AM +0100, Andreas Koenig wrote: Show quoted text
> Also affected: YANICK/XML-XSS-0.3.5.tar.gz
This failure appears to be due to a change in constant folding behaviour, caused as a side-effect of the MULTICONCAT implementation - coupled with overloading. Formerly, this expression: $overloaded . "a" . "b"; would execute as: $overloaded->concat("a")->concat("b"); but it now does: $overloaded->concat("ab"); The question is whether it's reasonable for perl to do that extra constant folding. Note that perl now constant folds to "ab" even for ($overloaded . "a") . "b"; -- Never work with children, animals, or actors.
Date: Fri, 1 Dec 2017 19:37:16 +0000
To: perl5-porters [...] perl.org
CC: Andreas Koenig <andreas.koenig.7os6VVqR [...] franz.ak.mind.de>
Subject: Re: [perl #132385] BBC: Commit e839e6ed breaks Bit-Vector-7.4
From: Zefram <zefram [...] fysh.org>
Dave Mitchell wrote: Show quoted text
>The question is whether it's reasonable for perl to do that extra constant >folding.
I lean toward the position that it should not be rearranging concatenations so freely. It's fine for multiconcat to rearrange at runtime in ways that rely on associativity, when it knows it's dealing purely with ordinary strings. But at compile time when that's not known, we should allow for non-associative concatenation, and so should always execute the sequence of concatenations implied by the grammatical binding of the operators. This is a finely balanced decision, though. At one level it's a question about how much freedom classes have to implement overloads that have behaviour incompatible with that of the base versions of the operators. We do not, and should not, blindly treat every use of an overloadable operator as an arbitrary function call. I've argued for forcing ordinariness of overloads in [perl #3270] on lvalues, [perl #132489] on truth values, and [perl #132490] on context. The base version of concatenation *is* associative, so there's some question of how reasonable it is for an overloaded concatenation to not be. But there's also the issue that here we can't force the overload to behave unsurprisingly; we can only assume that it will and break if it doesn't. The situation is remeniscent of an issue that arose in early C around floating point arihtmetic. In the pre-ANSI era, a C compiler was permitted to rearrange arithmetic expressions in any way that would be mathematically correct, so for example ((a - b) + c) could be executed as (a + (c - b)) or ((a + c) - b). But floating point arithmetic doesn't actually obey these mathematical identities, so these rearrangements actually affected the result. The C89 standard revoked this freedom of the compiler, and required that floating point expressions be executed strictly as specified by the program. This is not a perfect parallel, because for us the non-identity-preserving behaviour isn't purely built-in behaviour, but it's a lesson we can learn from nevertheless. -zefram
From: Dave Mitchell <davem [...] iabyn.com>
Date: Mon, 4 Dec 2017 12:48:36 +0000
To: Zefram <zefram [...] fysh.org>
CC: perl5-porters [...] perl.org, Andreas Koenig <andreas.koenig.7os6VVqR [...] franz.ak.mind.de>
Subject: Re: [perl #132385] BBC: Commit e839e6ed breaks Bit-Vector-7.4
Download (untitled) / with headers
text/plain 416b
On Fri, Dec 01, 2017 at 07:37:16PM +0000, Zefram wrote: Show quoted text
> Dave Mitchell wrote:
> >The question is whether it's reasonable for perl to do that extra constant > >folding.
> > I lean toward the position that it should not be rearranging > concatenations so freely.
I've now reverted to the former behaviour with v5.27.6-120-gbcc30fd and XML::XSS now passes again. -- I thought I was wrong once, but I was mistaken.
To: perlbug-followup [...] perl.org, perl5-porters [...] perl.org
Date: Sun, 17 Dec 2017 06:35:53 +0100
From: Andreas Koenig <andreas.koenig.7os6VVqR [...] franz.ak.mind.de>
Subject: Re: [perl #132385] BBC: Commit e839e6ed breaks Bit-Vector-7.4
Download (untitled) / with headers
text/plain 544b
Also affected: KMCGRAIL/SpamAssassin/Mail-SpamAssassin-3.4.1.tar.gz Discovered by Slaven. http://www.cpantesters.org/cpan/report/b325f7c6-e224-11e7-8e65-4e77f8b97727 Hints about reproducability: - failing test is t/stripmarkup.t - if you follow optional prerequsites you may encounter different problems, so with CPAN.pm you should set recommends_policy to 0 - on a certain smoker I cannot compile mandatory prereq Crypt::OpenSSL::RSA at the moment, so cannot reproduce the fail - it still fails as of v5.27.6-278-g91ca80c -- andreas
From: Dave Mitchell <davem [...] iabyn.com>
Subject: Re: [perl #132385] BBC: Commit e839e6ed breaks Bit-Vector-7.4
CC: perlbug-followup [...] perl.org, perl5-porters [...] perl.org
To: Andreas Koenig <andreas.koenig.7os6VVqR [...] franz.ak.mind.de>
Date: Tue, 19 Dec 2017 16:03:03 +0000
Download (untitled) / with headers
text/plain 1.1k
On Sun, Dec 17, 2017 at 06:35:53AM +0100, Andreas Koenig wrote: Show quoted text
> Also affected: KMCGRAIL/SpamAssassin/Mail-SpamAssassin-3.4.1.tar.gz
Fixed by v5.27.6-341-g5e501dc. Turns out it was a bug (actually 2 bugs) in my earlier boolean context optimisation work (that appeared in 5.27.3). The first bug was that I only optimised returning the return value of s/// in boolean context in only one of two code paths - the other path was still unoptimised. Second, it turned out that optimised path had a bug when running with tainted values - it would attempt to taint PL_sv_yes, and die with 'Modification of a read-only value'. Adding OP_MULTICONCAT just happened to change the COWness of a variable in such a way that it nudged pp_subst into taking the other code path and thus started hitting the bug. With the mini-branch at v5.27.6-343-gbae26b9 I've fixed things so that both pp_subst branches to the optimisation, I've made the optimisation slightly better, and I've fixed the taint bug. SpamAssassin now passes for me, -- My Dad used to say 'always fight fire with fire', which is probably why he got thrown out of the fire brigade.
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 584b
On Tue, 19 Dec 2017 16:03:25 GMT, davem wrote: [snip] Show quoted text
> SpamAssassin now passes for me, >
Today I attempted to install all the modules mentioned in this RT against blead (v5.27.6-343-gbae26b9). I had success with the big ones: PDL and Mail::SpamAssassin. However, it appears we have re-breakage in Devel::Chitin, the same status for Lexical::Types, and failures and warnings related to given/when in XML-XSS. (Problems in the latter two may be the same as previously reported.) See gzipped failure reports attached. Thank you very much. -- James E Keenan (jkeenan@cpan.org)
Subject: devel-chitin-0.12-failures.txt.gz

Message body not shown because it is not plain text.

Subject: lexical-types-0.16-failures.txt.gz

Message body not shown because it is not plain text.

Subject: xml-xss-0.3.5-failures.txt.gz

Message body not shown because it is not plain text.

From: Dave Mitchell <davem [...] iabyn.com>
CC: perl5-porters [...] perl.org
To: James E Keenan via RT <perlbug-followup [...] perl.org>
Date: Tue, 2 Jan 2018 11:36:44 +0000
Subject: Re: [perl #132385] BBC: Commit e839e6ed breaks Bit-Vector-7.4
Download (untitled) / with headers
text/plain 660b
On Tue, Dec 19, 2017 at 09:38:15AM -0800, James E Keenan via RT wrote: Show quoted text
> Today I attempted to install all the modules mentioned in this RT > against blead (v5.27.6-343-gbae26b9). I had success with the big ones: > PDL and Mail::SpamAssassin.
Show quoted text
> However, it appears we have re-breakage in Devel::Chitin,
A new release was made 2 days later, which uses the new whereso smartmatch stuff, which now breaks in blead due to that having been reverted. But there doesn't appear to be any mutliconcat-related breakage. -- Please note that ash-trays are provided for the use of smokers, whereas the floor is provided for the use of all patrons. -- Bill Royston
CC: srezic [...] cpan.org
From: slaven [...] rezic.de
Date: Fri, 02 Feb 2018 08:20:52 +0100
Subject: Blead Breaks CPAN: MARKOV/XML-Compile-SOAP-Daemon-3.13.tar.gz
To: perlbug [...] perl.org
Download (untitled) / with headers
text/plain 3.5k
This is a bug report for perl from slaven@rezic.de, generated with the help of perlbug 1.41 running under perl 5.27.8. ----------------------------------------------------------------- The t/10fault_ns.t test started to fail with perl 5.27.6. A sample fail report: http://www.cpantesters.org/cpan/report/a56b5fea-fe30-11e7-af10-d5598b4a5ffa There are some difficulties for reproducing the issue: * The dependency Log::Report::Optional was (accidentally?) deleted from CPAN and is only available via BackPAN atm. cpanm can handle this, CPAN.pm cannot. * The test fails only if the optional Net::Server and LWP are installed (hence the CPAN Testers Matrix lists a few passes for >=5.27.6) This could be a variation of perlrt #132252, but I cannot see it from the error messages. ----------------------------------------------------------------- --- Flags: category=core severity=low --- Site configuration information for perl 5.27.8: Configured by eserte at Sat Jan 20 09:22:10 CET 2018. Summary of my perl5 (revision 5 version 27 subversion 8) configuration: Platform: osname=linux osvers=3.16.0-4-amd64 archname=x86_64-linux uname='linux cabulja 3.16.0-4-amd64 #1 smp debian 3.16.51-3 (2017-12-13) x86_64 gnulinux ' config_args='-ds -e -Dprefix=/opt/perl-5.27.8 -Dusedevel -Dusemallocwrap=no -Dcf_email=srezic@cpan.org' hint=recommended useposix=true d_sigaction=define useithreads=undef usemultiplicity=undef use64bitint=define use64bitall=define uselongdouble=undef usemymalloc=n default_inc_excludes_dot=define bincompat5005=undef Compiler: cc='cc' ccflags ='-fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2' optimize='-O2' cppflags='-fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include' ccversion='' gccversion='4.9.2' gccosandvers='' intsize=4 longsize=8 ptrsize=8 doublesize=8 byteorder=12345678 doublekind=3 d_longlong=define longlongsize=8 d_longdbl=define longdblsize=16 longdblkind=3 ivtype='long' ivsize=8 nvtype='double' nvsize=8 Off_t='off_t' lseeksize=8 alignbytes=8 prototype=define Linker and Libraries: ld='cc' ldflags =' -fstack-protector-strong -L/usr/local/lib' libpth=/usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/4.9/include-fixed /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib libs=-lpthread -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc libc=libc-2.19.so so=so useshrplib=false libperl=libperl.a gnulibc_version='2.19' Dynamic Linking: dlsrc=dl_dlopen.xs dlext=so d_dlsymun=undef ccdlflags='-Wl,-E' cccdlflags='-fPIC' lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector-strong' --- @INC for perl 5.27.8: /opt/perl-5.27.8/lib/site_perl/5.27.8/x86_64-linux /opt/perl-5.27.8/lib/site_perl/5.27.8 /opt/perl-5.27.8/lib/5.27.8/x86_64-linux /opt/perl-5.27.8/lib/5.27.8 --- Environment for perl 5.27.8: HOME=/home/eserte LANG=en_US.UTF-8 LANGUAGE (unset) LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/eserte/bin/linux-gnu:/home/eserte/bin/sh:/home/eserte/bin:/home/eserte/bin/pistachio-perl/bin:/usr/games:/home/eserte/devel PERLDOC=-MPod::Perldoc::ToTextOverstrike PERL_BADLANG (unset) SHELL=/bin/zsh
RT-Send-CC: perl5-porters [...] perl.org
On Fri, 02 Feb 2018 07:21:53 GMT, slaven@rezic.de wrote: Show quoted text
> > This is a bug report for perl from slaven@rezic.de, > generated with the help of perlbug 1.41 running under perl 5.27.8. > > > ----------------------------------------------------------------- > The t/10fault_ns.t test started to fail with perl 5.27.6. A sample > fail > report: > http://www.cpantesters.org/cpan/report/a56b5fea-fe30-11e7-af10- > d5598b4a5ffa > > There are some difficulties for reproducing the issue: > * The dependency Log::Report::Optional was (accidentally?) deleted > from > CPAN and is only available via BackPAN atm. cpanm can handle this, > CPAN.pm cannot. > * The test fails only if the optional Net::Server and LWP are > installed (hence the CPAN Testers Matrix lists a few passes for
> >=5.27.6)
> > This could be a variation of perlrt #132252, but I cannot see it from > the error messages. >
Attempting with cpanm, having installed LWP and Net::Server against blead (v5.27.9 (v5.27.8-29-g18dcbbd)): ##### [XML-Compile-SOAP-Daemon-3.13] 547 $ bleadprove -vb t/10fault_ns.t t/10fault_ns.t .. 1..18 ok 1 - require XML::Compile::SOAP::Daemon::NetServer; ok 2 - require LWP::UserAgent; notice: Process Backgrounded ok 3 - Started daemon 4814 ok 4 - An object of class 'XML::Compile::SOAP::Daemon::NetServer' isa 'XML::Compile::SOAP::Daemon::NetServer' ok 5 - An object of class 'LWP::UserAgent' isa 'LWP::UserAgent' ok 6 - An object of class 'HTTP::Response' isa 'HTTP::Response' ok 7 - not POST ok 8 - An object of class 'HTTP::Response' isa 'HTTP::Response' ok 9 - not XML ok 10 - An object of class 'HTTP::Response' isa 'HTTP::Response' not ok 11 - parsing error # Failed test 'parsing error' # at t/10fault_ns.t line 106. # got: '422 # XML syntax error # text/plain # # REF(0x44ffc10) # ' # expected: '422 # XML syntax error # text/plain # # [422] The XML cannot be parsed: error: LIBXML-ERROR # ' ok 12 - An object of class 'HTTP::Response' isa 'HTTP::Response' not ok 13 - no soap envelope # Failed test 'no soap envelope' # at t/10fault_ns.t line 106. # got: '403 # message not SOAP # text/plain # # REF(0x4761880) # ' # expected: '403 # message not SOAP # text/plain # # [403] The message was XML, but not SOAP; not an Envelope but `not-soap' # ' ok 14 - An object of class 'HTTP::Response' isa 'HTTP::Response' not ok 15 - unknown soap envelope # Failed test 'unknown soap envelope' # at t/10fault_ns.t line 106. # got: '501 # SOAP version not supported # text/plain # # REF(0x4761808) # ' # expected: '501 # SOAP version not supported # text/plain # # [501] The soap version `xx' is not supported # ' ok 16 - An object of class 'HTTP::Response' isa 'HTTP::Response' ok 17 - message not found ok 18 - Stopping daemon 4814 # Looks like you failed 3 tests of 18. Dubious, test returned 3 (wstat 768, 0x300) Failed 3/18 subtests Test Summary Report ------------------- t/10fault_ns.t (Wstat: 768 Tests: 18 Failed: 3) Failed tests: 11, 13, 15 Non-zero exit status: 3 Files=1, Tests=18, 2 wallclock secs ( 0.02 usr 0.00 sys + 0.27 cusr 0.04 csys = 0.33 CPU) Result: FAIL ##### Show quoted text
> ----------------------------------------------------------------- > --- > Flags: > category=core > severity=low > --- > Site configuration information for perl 5.27.8: > > Configured by eserte at Sat Jan 20 09:22:10 CET 2018. > > Summary of my perl5 (revision 5 version 27 subversion 8) > configuration: > > Platform: > osname=linux > osvers=3.16.0-4-amd64 > archname=x86_64-linux > uname='linux cabulja 3.16.0-4-amd64 #1 smp debian 3.16.51-3 (2017- > 12-13) x86_64 gnulinux ' > config_args='-ds -e -Dprefix=/opt/perl-5.27.8 -Dusedevel > -Dusemallocwrap=no -Dcf_email=srezic@cpan.org' > hint=recommended > useposix=true > d_sigaction=define > useithreads=undef > usemultiplicity=undef > use64bitint=define > use64bitall=define > uselongdouble=undef > usemymalloc=n > default_inc_excludes_dot=define > bincompat5005=undef > Compiler: > cc='cc' > ccflags ='-fwrapv -fno-strict-aliasing -pipe -fstack-protector- > strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 > -D_FORTIFY_SOURCE=2' > optimize='-O2' > cppflags='-fwrapv -fno-strict-aliasing -pipe -fstack-protector- > strong -I/usr/local/include' > ccversion='' > gccversion='4.9.2' > gccosandvers='' > intsize=4 > longsize=8 > ptrsize=8 > doublesize=8 > byteorder=12345678 > doublekind=3 > d_longlong=define > longlongsize=8 > d_longdbl=define > longdblsize=16 > longdblkind=3 > ivtype='long' > ivsize=8 > nvtype='double' > nvsize=8 > Off_t='off_t' > lseeksize=8 > alignbytes=8 > prototype=define > Linker and Libraries: > ld='cc' > ldflags =' -fstack-protector-strong -L/usr/local/lib' > libpth=/usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/4.9/include- > fixed /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu > /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib > libs=-lpthread -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc > -lgdbm_compat > perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc > libc=libc-2.19.so > so=so > useshrplib=false > libperl=libperl.a > gnulibc_version='2.19' > Dynamic Linking: > dlsrc=dl_dlopen.xs > dlext=so > d_dlsymun=undef > ccdlflags='-Wl,-E' > cccdlflags='-fPIC' > lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector-strong' > > > --- > @INC for perl 5.27.8: > /opt/perl-5.27.8/lib/site_perl/5.27.8/x86_64-linux > /opt/perl-5.27.8/lib/site_perl/5.27.8 > /opt/perl-5.27.8/lib/5.27.8/x86_64-linux > /opt/perl-5.27.8/lib/5.27.8 > > --- > Environment for perl 5.27.8: > HOME=/home/eserte > LANG=en_US.UTF-8 > LANGUAGE (unset) > LD_LIBRARY_PATH (unset) > LOGDIR (unset) > PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/eserte/bin/linux- > gnu:/home/eserte/bin/sh:/home/eserte/bin:/home/eserte/bin/pistachio- > perl/bin:/usr/games:/home/eserte/devel > PERLDOC=-MPod::Perldoc::ToTextOverstrike > PERL_BADLANG (unset) > SHELL=/bin/zsh
-- James E Keenan (jkeenan@cpan.org)
To: perl5-porters [...] perl.org
Date: Mon, 5 Feb 2018 23:33:08 +0000
From: Zefram <zefram [...] fysh.org>
Subject: Re: [perl #132801] Blead Breaks CPAN: MARKOV/XML-Compile-SOAP-Daemon-3.13.tar.gz
Bisects to commit e839e6ed99c6b25aee589f56bb58de2f8fa00f41 "Add OP_MULTICONCAT op". -zefram
CC: srezic [...] cpan.org
Date: Wed, 07 Feb 2018 19:09:25 +0100
From: slaven [...] rezic.de
Subject: Blead Breaks CPAN: PERRETTDL/Acme-Cat-Schroedinger-1.tar.gz
To: perlbug [...] perl.org
Download (untitled) / with headers
text/plain 3.5k
This is a bug report for perl from slaven@rezic.de, generated with the help of perlbug 1.41 running under perl 5.27.9. ----------------------------------------------------------------- A stringification test in Acme-Cat-Schroedinger-1 fails since 5.27.6: # Failed test 'stringification modifies the cat' # at t/basic.t line 19. # $VAR1 = [ # bless( sub { "DUMMY" }, 'Acme::Cat::Schroedinger' ) # ]; # Looks like you failed 1 test of 12. t/basic.t ......... Dubious, test returned 1 (wstat 256, 0x100) Failed 1/12 subtests ----------------------------------------------------------------- --- Flags: category=core severity=low --- Site configuration information for perl 5.27.9: Configured by eserte at Tue Feb 6 19:16:51 CET 2018. Summary of my perl5 (revision 5 version 27 subversion 9) configuration: Commit id: ef80cd9998532b7e2be7823cd9af7ba1198822e5 Platform: osname=linux osvers=3.16.0-4-amd64 archname=x86_64-linux uname='linux cabulja 3.16.0-4-amd64 #1 smp debian 3.16.51-3 (2017-12-13) x86_64 gnulinux ' config_args='-D useshrplib=true -Dprefix=/opt/perl5.27.8-157-gef80cd9 -Dusemymalloc=n -D cc=ccache cc -D usedevel=define -Duse64bit -de' hint=recommended useposix=true d_sigaction=define useithreads=undef usemultiplicity=undef use64bitint=define use64bitall=define uselongdouble=undef usemymalloc=n default_inc_excludes_dot=define bincompat5005=undef Compiler: cc='cc' ccflags ='-fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2' optimize='-O2' cppflags='-fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include' ccversion='' gccversion='4.9.2' gccosandvers='' intsize=4 longsize=8 ptrsize=8 doublesize=8 byteorder=12345678 doublekind=3 d_longlong=define longlongsize=8 d_longdbl=define longdblsize=16 longdblkind=3 ivtype='long' ivsize=8 nvtype='double' nvsize=8 Off_t='off_t' lseeksize=8 alignbytes=8 prototype=define Linker and Libraries: ld='ccache cc' ldflags =' -fstack-protector-strong -L/usr/local/lib' libpth=/usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/4.9/include-fixed /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib libs=-lpthread -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc libc=libc-2.19.so so=so useshrplib=true libperl=libperl.so gnulibc_version='2.19' Dynamic Linking: dlsrc=dl_dlopen.xs dlext=so d_dlsymun=undef ccdlflags='-Wl,-E -Wl,-rpath,/opt/perl5.27.8-157-gef80cd9/lib/5.27.9/x86_64-linux/CORE' cccdlflags='-fPIC' lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector-strong' --- @INC for perl 5.27.9: /opt/perl5.27.8-157-gef80cd9/lib/site_perl/5.27.9/x86_64-linux /opt/perl5.27.8-157-gef80cd9/lib/site_perl/5.27.9 /opt/perl5.27.8-157-gef80cd9/lib/5.27.9/x86_64-linux /opt/perl5.27.8-157-gef80cd9/lib/5.27.9 --- Environment for perl 5.27.9: HOME=/home/eserte LANG=en_US.UTF-8 LANGUAGE (unset) LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/eserte/bin/linux-gnu:/home/eserte/bin/sh:/home/eserte/bin:/home/eserte/bin/pistachio-perl/bin:/usr/games:/home/eserte/devel PERLDOC=-MPod::Perldoc::ToTextOverstrike PERL_BADLANG (unset) SHELL=/bin/zsh
Subject: Re: [perl #132827] Blead Breaks CPAN: PERRETTDL/Acme-Cat-Schroedinger-1.tar.gz
From: Zefram <zefram [...] fysh.org>
Date: Wed, 7 Feb 2018 19:26:11 +0000
To: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 396b
Boils down to: $ perl5.27.5 -lwe 'package Foo { use overload "\"\"" => sub { $_[0] = "a" }; } $f = bless({}, "Foo"); $b = $f."b"; print ref \$f' SCALAR $ perl5.27.6 -lwe 'package Foo { use overload "\"\"" => sub { $_[0] = "a" }; } $f = bless({}, "Foo"); $b = $f."b"; print ref \$f' REF Unsurprisingly bisects to commit e839e6ed99c6b25aee589f56bb58de2f8fa00f41 "Add OP_MULTICONCAT op". -zefram
CC: perl5-porters [...] perl.org
To: Zefram <zefram [...] fysh.org>
Subject: Re: [perl #132801] Blead Breaks CPAN: MARKOV/XML-Compile-SOAP-Daemon-3.13.tar.gz
Date: Fri, 9 Feb 2018 19:46:59 +0000
From: Dave Mitchell <davem [...] iabyn.com>
Download (untitled) / with headers
text/plain 672b
On Mon, Feb 05, 2018 at 11:33:08PM +0000, Zefram wrote: Show quoted text
> Bisects to commit e839e6ed99c6b25aee589f56bb58de2f8fa00f41 "Add > OP_MULTICONCAT op".
Reduces to: use overload '""' => sub { print qq{"" called\n}; "B" }, "." => sub { print qq{. called\n}; bless [] }, ; my $a = "A"; my $obj = bless []; my $s; $s = "$a-$obj"; $ perl5260 ~/tmp/p; echo ===; perl5278 ~/tmp/p . called "" called === . called $ I've added it to my Big List of Overloaded Concat Things That Multiconcat Broke, which I'm currently working on. -- I thought I was wrong once, but I was mistaken.
From: Dave Mitchell <davem [...] iabyn.com>
Subject: Re: [perl #132827] Blead Breaks CPAN: PERRETTDL/Acme-Cat-Schroedinger-1.tar.gz
Date: Tue, 20 Feb 2018 09:20:38 +0000
To: Zefram <zefram [...] fysh.org>
CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 3.2k
On Wed, Feb 07, 2018 at 07:26:11PM +0000, Zefram wrote: Show quoted text
> Boils down to: > > $ perl5.27.5 -lwe 'package Foo { use overload "\"\"" => sub { $_[0] = "a" }; } $f = bless({}, "Foo"); $b = $f."b"; print ref \$f' > SCALAR > $ perl5.27.6 -lwe 'package Foo { use overload "\"\"" => sub { $_[0] = "a" }; } $f = bless({}, "Foo"); $b = $f."b"; print ref \$f' > REF > > Unsurprisingly bisects to commit e839e6ed99c6b25aee589f56bb58de2f8fa00f41 > "Add OP_MULTICONCAT op".
Now fixed with: commit af39014264c90cfc5a35e4f6e39ba038a8fb0c29 Author: David Mitchell <davem@iabyn.com> AuthorDate: Sat Feb 10 15:27:59 2018 +0000 Commit: David Mitchell <davem@iabyn.com> CommitDate: Mon Feb 19 22:06:49 2018 +0000 redo magic/overload handing in pp_multiconcat The way pp_multiconcat handles things like tieing and overloading doesn't work very well at the moment. There's a lot of code to handle edge cases, and there are still open bugs. The basic algorithm in pp_multiconcat is to first stringify (i.e. call SvPV() on) *all* args, then use the obtained values to calculate the total length and utf8ness required, then do a single SvGROW and copy all the bytes from all the args. This ordering is wrong when variables with visible side effects, such as tie/overload, are encountered. The current approach is to stringify args up until such an arg is encountered, concat all args up until that one together via the normal fast route, then jump to a special block of code which concats any remaining args one by one the "hard" way, handling overload etc. This is problematic because we sometimes need to go back in time. For example in ($undef . $overloaded), we're supposed to call $overloaded->concat($undef, reverse=1) so to speak, but by the time of the method call, we've already tried to stringify $undef and emitted a spurious 'uninit var' warning. The new approach taken in this commit is to: 1) Bail out of the stringify loop under a greater range of problematical variable classes - namely we stop when encountering *anything* which might cause external effects, so in addition to tied and overloaded vars, we now stop for any sort of get magic, or any undefined value where warnings are in scope. 2) If we bail out, we throw away any stringification results so far, and concatenate *all* args the slow way, even ones we're already stringified. This solves the "going back in time" problem mentioned above. It's safe because the only vars that get processed twice are ones for which the first stringification could have no side effects. The slow concat loop now uses S_do_concat(), which is a new static inline function which implements the main body of pp_concat() - so they share identical code. An intentional side-effect of this commit is to fix three tickets: RT #132783 RT #132827 RT #132595 so tests for them are included in this commit. One effect of this commit is that string concatenation of magic or undefined vars will now be slower than before, e.g. "pid=$$" "value=$undef" but they will probably still be faster than before pp_multiconcat was introduced. -- Nothing ventured, nothing lost.
To: Zefram <zefram [...] fysh.org>
Subject: Re: [perl #132801] Blead Breaks CPAN: MARKOV/XML-Compile-SOAP-Daemon-3.13.tar.gz
Date: Tue, 20 Feb 2018 09:24:59 +0000
CC: perl5-porters [...] perl.org
From: Dave Mitchell <davem [...] iabyn.com>
Download (untitled) / with headers
text/plain 2.5k
On Fri, Feb 09, 2018 at 07:46:59PM +0000, Dave Mitchell wrote: Show quoted text
> On Mon, Feb 05, 2018 at 11:33:08PM +0000, Zefram wrote:
> > Bisects to commit e839e6ed99c6b25aee589f56bb58de2f8fa00f41 "Add > > OP_MULTICONCAT op".
> > Reduces to: > > use overload > '""' => sub { print qq{"" called\n}; "B" }, > "." => sub { print qq{. called\n}; bless [] }, > ; > > my $a = "A"; > my $obj = bless []; > my $s; > $s = "$a-$obj"; > > $ perl5260 ~/tmp/p; echo ===; perl5278 ~/tmp/p > . called > "" called > === > . called > $ > > I've added it to my Big List of Overloaded Concat Things That Multiconcat > Broke, which I'm currently working on.
Now fixed with the following commit. Note that it merely restores the existing buggy and inconsistent 5.26.0 and earlier behaviour. I'll look into whether to rationalise such behaviour post 5.28.0 release. commit 55b62dee2d8dffa7b36b3b613ee4727fbefdb9e3 Author: David Mitchell <davem@iabyn.com> AuthorDate: Mon Feb 19 11:59:03 2018 +0000 Commit: David Mitchell <davem@iabyn.com> CommitDate: Mon Feb 19 22:06:49 2018 +0000 pp_multiconcat: correctly honour stringify RT #132793, RT #132801 In something like $x .= "$overloaded", the $overloaded stringify method wasn't being called. However, it turns that the existing (pre-multiconcat) behaviour is also buggy and inconsistent. That behaviour has been restored as-is. At some future time, these bugs might be addressed. Here are some comments from the new tests added to overload.t: Since 5.000, any OP_STRINGIFY immediately following an OP_CONCAT is optimised away, on the assumption that since concat will always return a valid string anyway, it doesn't need stringifying. So in "$x", the stringify is needed, but on "$x$y" it isn't. This assumption is flawed once overloading has been introduced, since concat might return an overloaded object which still needs stringifying. However, this flawed behaviour is apparently needed by at least one module, and is tested for in opbasic/concat.t: see RT #124160. There is also a wart with the OPpTARGET_MY optimisation: specifically, in $lex = "...", if $lex is a lexical var, then a chain of 2 or more concats *doesn't* optimise away OP_STRINGIFY: $lex = "$x"; # stringifies $lex = "$x$y"; # doesn't stringify $lex = "$x$y$z..."; # stringifies -- Fire extinguisher (n) a device for holding open fire doors.
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 2.8k
Dana Tue, 20 Feb 2018 01:25:16 -0800, davem reče: Show quoted text
> On Fri, Feb 09, 2018 at 07:46:59PM +0000, Dave Mitchell wrote:
> > On Mon, Feb 05, 2018 at 11:33:08PM +0000, Zefram wrote:
> > > Bisects to commit e839e6ed99c6b25aee589f56bb58de2f8fa00f41 "Add > > > OP_MULTICONCAT op".
> > > > Reduces to: > > > > use overload > > '""' => sub { print qq{"" called\n}; "B" }, > > "." => sub { print qq{. called\n}; bless [] }, > > ; > > > > my $a = "A"; > > my $obj = bless []; > > my $s; > > $s = "$a-$obj"; > > > > $ perl5260 ~/tmp/p; echo ===; perl5278 ~/tmp/p > > . called > > "" called > > === > > . called > > $ > > > > I've added it to my Big List of Overloaded Concat Things That Multiconcat > > Broke, which I'm currently working on.
> > > Now fixed with the following commit. Note that it merely restores the > existing buggy and inconsistent 5.26.0 and earlier behaviour. I'll > look into whether to rationalise such behaviour post 5.28.0 release. > > commit 55b62dee2d8dffa7b36b3b613ee4727fbefdb9e3 > Author: David Mitchell <davem@iabyn.com> > AuthorDate: Mon Feb 19 11:59:03 2018 +0000 > Commit: David Mitchell <davem@iabyn.com> > CommitDate: Mon Feb 19 22:06:49 2018 +0000 > > pp_multiconcat: correctly honour stringify > > RT #132793, RT #132801 > > In something like $x .= "$overloaded", the $overloaded stringify method > wasn't being called. > > However, it turns that the existing (pre-multiconcat) behaviour is also > buggy and inconsistent. That behaviour has been restored as-is. > At some future time, these bugs might be addressed. > > Here are some comments from the new tests added to overload.t: > > Since 5.000, any OP_STRINGIFY immediately following an OP_CONCAT > is optimised away, on the assumption that since concat will always > return a valid string anyway, it doesn't need stringifying. > So in "$x", the stringify is needed, but on "$x$y" it isn't. > This assumption is flawed once overloading has been introduced, since > concat might return an overloaded object which still needs stringifying. > However, this flawed behaviour is apparently needed by at least one > module, and is tested for in opbasic/concat.t: see RT #124160. > > There is also a wart with the OPpTARGET_MY optimisation: specifically, > in $lex = "...", if $lex is a lexical var, then a chain of 2 or more > concats *doesn't* optimise away OP_STRINGIFY: > > $lex = "$x"; # stringifies > $lex = "$x$y"; # doesn't stringify > $lex = "$x$y$z..."; # stringifies >
This issue was closed, but not all affected CPAN modules got a ticket. I created one for Lexical-Types: https://rt.cpan.org/Ticket/Display.html?id=125465 But maybe others have to be checked.
Date: Mon, 4 Jun 2018 11:33:31 +0100
CC: perl5-porters [...] perl.org
Subject: Re: [perl #132385] BBC: Commit e839e6ed breaks Bit-Vector-7.4
From: Dave Mitchell <davem [...] iabyn.com>
To: "slaven [...] rezic.de via RT" <perlbug-followup [...] perl.org>
Download (untitled) / with headers
text/plain 866b
On Sat, Jun 02, 2018 at 07:34:45AM -0700, slaven@rezic.de via RT wrote: Show quoted text
> This issue was closed, but not all affected CPAN modules got a ticket. I created one for Lexical-Types: > https://rt.cpan.org/Ticket/Display.html?id=125465 > But maybe others have to be checked.
All affected distributions mentioned in this ticket now either pass on blead or have the following tickets: PDL - debugging stack HWM issues https://sourceforge.net/p/pdl/bugs/445/ Devel::Size - sparse array issue https://rt.cpan.org/Public/Bug/Display.html?id=124105 Lexical::Types - issue with my Type $foo and MULTICONCAT https://rt.cpan.org/Public/Bug/Display.html?id=125465 -- The crew of the Enterprise encounter an alien life form which is surprisingly neither humanoid nor made from pure energy. -- Things That Never Happen in "Star Trek" #22


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org