Skip to content
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

new padrange op breaks various CPAN modules #12548

Closed
p5pRT opened this issue Nov 11, 2012 · 20 comments
Closed

new padrange op breaks various CPAN modules #12548

p5pRT opened this issue Nov 11, 2012 · 20 comments

Comments

@p5pRT
Copy link

p5pRT commented Nov 11, 2012

Migrated from rt.perl.org#115684 (status was 'resolved')

Searchable as RT115684$

@p5pRT
Copy link
Author

p5pRT commented Nov 11, 2012

From @andk

git bisect


commit a7fd8ef
Author​: David Mitchell <davem@​iabyn.com>
Date​: Mon Sep 24 13​:50​:22 2012 +0100

  add padrange op

diagnostics


  Test Summary Report
  -------------------
  t/10-base.t (Wstat​: 512 Tests​: 4 Failed​: 2)
  Failed tests​: 2-3
  Non-zero exit status​: 2
  t/15-constants.t (Wstat​: 512 Tests​: 6 Failed​: 2)
  Failed tests​: 2-3
  Non-zero exit status​: 2
  Files=21, Tests=1117, 1 wallclock secs ( 0.13 usr 0.02 sys + 0.57 cusr 0.08 csys = 0.80 CPU)
  Result​: FAIL

perl -V


Summary of my perl5 (revision 5 version 17 subversion 6) configuration​:
  Commit id​: a7fd8ef
  Platform​:
  osname=linux, osvers=3.2.0-4-amd64, archname=x86_64-linux-ld
  uname='linux k83 3.2.0-4-amd64 #1 smp debian 3.2.32-1 x86_64 gnulinux '
  config_args='-Dprefix=/home/src/perl/repoperls/installed-perls/perl/v5.17.5-191-ga7fd8ef/127e -Dmyhostname=k83 -Dinstallusrbinperl=n -Uversiononly -Dusedevel -des -Ui_db -Uuseithreads -Duselongdouble -DDEBUGGING=-g'
  hint=recommended, useposix=true, d_sigaction=define
  useithreads=undef, usemultiplicity=undef
  useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
  use64bitint=define, use64bitall=define, uselongdouble=define
  usemymalloc=n, bincompat5005=undef
  Compiler​:
  cc='cc', ccflags ='-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
  optimize='-O2 -g',
  cppflags='-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
  ccversion='', gccversion='4.7.2', gccosandvers=''
  intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
  d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
  ivtype='long', ivsize=8, nvtype='long double', nvsize=16, Off_t='off_t', lseeksize=8
  alignbytes=16, prototype=define
  Linker and Libraries​:
  ld='cc', ldflags =' -fstack-protector -L/usr/local/lib'
  libpth=/usr/local/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib /usr/lib
  libs=-lnsl -ldb -ldl -lm -lcrypt -lutil -lc
  perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
  libc=, so=so, useshrplib=false, libperl=libperl.a
  gnulibc_version='2.13'
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
  cccdlflags='-fPIC', lddlflags='-shared -O2 -g -L/usr/local/lib -fstack-protector'

Characteristics of this binary (from libperl)​:
  Compile-time options​: HAS_TIMES PERLIO_LAYERS PERL_DONT_CREATE_GVSV
  PERL_MALLOC_WRAP PERL_PRESERVE_IVUV PERL_USE_DEVEL
  USE_64_BIT_ALL USE_64_BIT_INT USE_LARGE_FILES
  USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE
  USE_LOCALE_NUMERIC USE_LONG_DOUBLE USE_PERLIO
  USE_PERL_ATOF
  Built under linux
  Compiled at Nov 11 2012 09​:21​:42
  @​INC​:
  /home/src/perl/repoperls/installed-perls/perl/v5.17.5-191-ga7fd8ef/127e/lib/site_perl/5.17.6/x86_64-linux-ld
  /home/src/perl/repoperls/installed-perls/perl/v5.17.5-191-ga7fd8ef/127e/lib/site_perl/5.17.6
  /home/src/perl/repoperls/installed-perls/perl/v5.17.5-191-ga7fd8ef/127e/lib/5.17.6/x86_64-linux-ld
  /home/src/perl/repoperls/installed-perls/perl/v5.17.5-191-ga7fd8ef/127e/lib/5.17.6
  .

--
andreas

@p5pRT
Copy link
Author

p5pRT commented Nov 11, 2012

From @andk

RCLAMP/Devel-Caller-2.05.tar.gz also affected​:

PERL_DL_NONLAZY=1 /home/sand/src/perl/repoperls/installed-perls/perl/v5.17.5-191-ga7fd8ef/127e/bin/perl "-MExtUtils​::Command​::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
was expecting a pushmark, not a padrange at /tmp/loop_over_bdir-6D2iDy/Devel-Caller-2.05-_1aFjg/blib/lib/Devel/Caller.pm line 26.
# Looks like you planned 72 tests but ran 3.
# Looks like your test exited with 255 just after 3.
t/Devel-Caller.t ..
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 69/72 subtests

Test Summary Report


t/Devel-Caller.t (Wstat​: 65280 Tests​: 3 Failed​: 0)
  Non-zero exit status​: 255
  Parse errors​: Bad plan. You planned 72 tests but ran 3.
Files=1, Tests=3, 0 wallclock secs ( 0.02 usr 0.01 sys + 0.03 cusr 0.00 csys = 0.06 CPU)
Result​: FAIL

--
andreas

@p5pRT
Copy link
Author

p5pRT commented Nov 11, 2012

From @andk

By https://rt-archive.perl.org/perl5//Public/Bug/Display.html?id=115684 also
affected​: MAUKE/Function-Parameters-1.00.tar.gz

Diagnostics​:

Test Summary Report


t/bonus.t (Wstat​: 768 Tests​: 13 Failed​: 3)
  Failed tests​: 11-13
  Non-zero exit status​: 3
t/checkered_2.t (Wstat​: 1024 Tests​: 120 Failed​: 4)
  Failed tests​: 85, 93-94, 104
  Non-zero exit status​: 4
t/defaults.t (Wstat​: 65280 Tests​: 43 Failed​: 4)
  Failed tests​: 11, 14, 40-41
  Non-zero exit status​: 255
  Parse errors​: Bad plan. You planned 46 tests but ran 43.
t/foreign/Method-Signatures/defaults.t (Wstat​: 256 Tests​: 16 Failed​: 1)
  Failed test​: 11
  Non-zero exit status​: 1
t/foreign/Method-Signatures/named.t (Wstat​: 256 Tests​: 7 Failed​: 1)
  Failed test​: 2
  Non-zero exit status​: 1
t/foreign/Method-Signatures/optional.t (Wstat​: 256 Tests​: 9 Failed​: 1)
  Failed test​: 3
  Non-zero exit status​: 1
t/foreign/Method-Signatures/too_many_args.t (Wstat​: 65280 Tests​: 10 Failed​: 0)
  Non-zero exit status​: 255
  Parse errors​: No plan found in TAP output
t/named_params.t (Wstat​: 65280 Tests​: 28 Failed​: 1)
  Failed test​: 28
  Non-zero exit status​: 255
  Parse errors​: Bad plan. You planned 134 tests but ran 28.
Files=66, Tests=912, 4 wallclock secs ( 0.23 usr 0.06 sys + 2.42 cusr 0.38 csys = 3.09 CPU)
Result​: FAIL

--
andreas

@p5pRT
Copy link
Author

p5pRT commented Nov 11, 2012

From @andk

By https://rt-archive.perl.org/perl5//Public/Bug/Display.html?id=115684 also
affected​: JJORE/Runops-Trace-0.14.tar.gz

Test Summary Report


t/07perl_Hook.t (Wstat​: 256 Tests​: 80 Failed​: 1)
  Failed test​: 70
  Non-zero exit status​: 1
Files=13, Tests=103, 0 wallclock secs ( 0.06 usr 0.01 sys + 0.24 cusr 0.08 csys = 0.39 CPU)
Result​: FAIL

--
andreas

@p5pRT
Copy link
Author

p5pRT commented Nov 11, 2012

From @mauke

On 11.11.2012 12​:01, Andreas Koenig wrote​:

By https://rt-archive.perl.org/perl5//Public/Bug/Display.html?id=115684 also
affected​: MAUKE/Function-Parameters-1.00.tar.gz

Diagnostics​:

Test Summary Report
-------------------
t/bonus.t (Wstat​: 768 Tests​: 13 Failed​: 3)
Failed tests​: 11-13
Non-zero exit status​: 3

I haven't had time to take a closer look, but is it possible that the
padrange optimization assumes that in a list of (pushmark,
padsv/lvintro, padsv/lvintro, ...) the declared variables must have
contiguous pad indexes? Because that would certainly wreak havoc with
code generated by Function​::Parameters.

Here's a more reduced testcase (fails with blead)​:

#!perl
use warnings;
use strict;
use Function​::Parameters;
use Test​::More tests => 3;

my $outer = "outer";
fun foo($bar, $baz = $outer) {
  return "$bar $baz";
}

is $outer, "outer";
is foo("A"), "A outer";
is $outer, "outer";
__END__

$ perl -Mblib wtf
1..3
ok 1
Use of uninitialized value $baz in concatenation (.) or string at wtf
line 9.
not ok 2
# Failed test at wtf line 13.
# got​: 'A '
# expected​: 'A outer'
not ok 3
# Failed test at wtf line 14.
# got​: undef
# expected​: 'outer'
# Looks like you failed 2 tests of 3.

It looks like it's clearing $outer instead of $baz on entry.

@p5pRT
Copy link
Author

p5pRT commented Nov 11, 2012

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Nov 12, 2012

From @iabyn

On Mon, Nov 12, 2012 at 12​:54​:33AM +0100, Lukas Mai wrote​:

On 11.11.2012 12​:01, Andreas Koenig wrote​:

By https://rt-archive.perl.org/perl5//Public/Bug/Display.html?id=115684 also
affected​: MAUKE/Function-Parameters-1.00.tar.gz

Diagnostics​:

Test Summary Report
-------------------
t/bonus.t (Wstat​: 768 Tests​: 13 Failed​: 3)
Failed tests​: 11-13
Non-zero exit status​: 3

I haven't had time to take a closer look, but is it possible that
the padrange optimization assumes that in a list of (pushmark,
padsv/lvintro, padsv/lvintro, ...) the declared variables must have
contiguous pad indexes? Because that would certainly wreak havoc
with code generated by Function​::Parameters.

The new optimisation code in rpeep() looks for a pushmark followed
by one or more pad ops with contiguous targs. In the non-intro case it
simply stops before the first non-contiguous pad op; in the intro case,
it asserts that they must be continuous.

--
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

@p5pRT
Copy link
Author

p5pRT commented Dec 16, 2012

From @andk

(Andreas J. Koenig) (via RT) <perlbug-followup@​perl.org> writes​:

# New Ticket Created by (Andreas J. Koenig)
# Please include the string​: [perl #115684]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl5/Ticket/Display.html?id=115684 >

After having applied https://rt.cpan.org/Ticket/Display.html?id=78148 to
ZEFRAM/Data-Alias-1.16.tar.gz it finds it next hurdle in this commit.

--
andreas

@p5pRT
Copy link
Author

p5pRT commented Jan 10, 2013

From @iabyn

According to this ticket, various CPAN distributions have been broken by
my commit v5.17.5-191-ga7fd8ef, which introduced a new padrange op
optimisation that replaces a pushmask and multiple pad ops (and possibly
list and nextstate ops) with a single padrange op​:

  VPIT/Lexical-Types-0.12
  RCLAMP/Devel-Caller-2.05.tar.gz
  MAUKE/Function-Parameters-1.00.tar.gz
  JJORE/Runops-Trace-0.14.tar.gz
  ZEFRAM/Data-Alias-1.16.tar.gz

Apart from Function-Parameters, I've seen no response from any of the
authors. I haven't looked at any of the modules yet, but I've been
*assuming* that its not an issue with my padrange work, but instead that
these modules just need updating to cope with the new op. If this isn't
the case, then it would be nice to get some feedback so that I can fix
things in time for 5.18.

As regards Function-Parameters, one issue that was identified was that my
code assumed that pad indexes were contiguous in my(...) declarations;
I've since fixed that; was that enough to fix Function-Parameters?

Thanks.

--
A walk of a thousand miles begins with a single step...
then continues for another 1,999,999 or so.

@p5pRT
Copy link
Author

p5pRT commented Jan 10, 2013

From @doy

On Thu, Jan 10, 2013 at 11​:49​:13AM +0000, Dave Mitchell wrote​:

According to this ticket, various CPAN distributions have been broken by
my commit v5.17.5-191-ga7fd8ef, which introduced a new padrange op
optimisation that replaces a pushmask and multiple pad ops (and possibly
list and nextstate ops) with a single padrange op​:

    VPIT/Lexical\-Types\-0\.12
RCLAMP/Devel\-Caller\-2\.05\.tar\.gz
MAUKE/Function\-Parameters\-1\.00\.tar\.gz
JJORE/Runops\-Trace\-0\.14\.tar\.gz
ZEFRAM/Data\-Alias\-1\.16\.tar\.gz

Apart from Function-Parameters, I've seen no response from any of the
authors. I haven't looked at any of the modules yet, but I've been
*assuming* that its not an issue with my padrange work, but instead that
these modules just need updating to cope with the new op. If this isn't
the case, then it would be nice to get some feedback so that I can fix
things in time for 5.18.

As regards Function-Parameters, one issue that was identified was that my
code assumed that pad indexes were contiguous in my(...) declarations;
I've since fixed that; was that enough to fix Function-Parameters?

Devel​::Caller is definitely an issue with the module and not the
padrange work itself (it relies a bit heavily on the specific layout of
the optree). I couldn't follow its logic quite well enough to come up
with a patch for it though.

-doy

@p5pRT
Copy link
Author

p5pRT commented Jan 11, 2013

From @mauke

On 10.01.2013 12​:49, Dave Mitchell wrote​:

According to this ticket, various CPAN distributions have been broken by
my commit v5.17.5-191-ga7fd8ef, which introduced a new padrange op
optimisation that replaces a pushmask and multiple pad ops (and possibly
list and nextstate ops) with a single padrange op​:

     VPIT/Lexical\-Types\-0\.12
RCLAMP/Devel\-Caller\-2\.05\.tar\.gz
MAUKE/Function\-Parameters\-1\.00\.tar\.gz
JJORE/Runops\-Trace\-0\.14\.tar\.gz
ZEFRAM/Data\-Alias\-1\.16\.tar\.gz

Apart from Function-Parameters, I've seen no response from any of the
authors. I haven't looked at any of the modules yet, but I've been
*assuming* that its not an issue with my padrange work, but instead that
these modules just need updating to cope with the new op. If this isn't
the case, then it would be nice to get some feedback so that I can fix
things in time for 5.18.

As regards Function-Parameters, one issue that was identified was that my
code assumed that pad indexes were contiguous in my(...) declarations;
I've since fixed that; was that enough to fix Function-Parameters?

Yes, the problem was that Function​::Parameters manually generates
optrees and in some cases it generates code that the normal perl parser
couldn't have, like non-contiguous pad indexes.

After your fix everything's working fine.

--
Lukas Mai <l.mai@​web.de>

@p5pRT
Copy link
Author

p5pRT commented Jan 19, 2013

From @ilmari

This is fixed in Devel-Caller-2.06

--
"The surreality of the universe tends towards a maximum" -- Skud's Law
"Never formulate a law or axiom that you're not prepared to live with
the consequences of." -- Skud's Meta-Law

@p5pRT
Copy link
Author

p5pRT commented Feb 16, 2013

From @rjbs

It sounds like the issue here is that downstream modules need to be updated for changes to
perlguts. This seems like not exactly a blocker, but it would be nice if we could provide patches,
if that's straightforward. (Also, some of the authors are probably already on p5p reading this,
and could chime in, "Don't worry, I'll take care of it!")

--
rjbs

@p5pRT
Copy link
Author

p5pRT commented Feb 18, 2013

From @jkeenan

On Fri Feb 15 19​:16​:10 2013, rjbs wrote​:

It sounds like the issue here is that downstream modules need to be
updated for changes to
perlguts. This seems like not exactly a blocker, but it would be nice
if we could provide patches,
if that's straightforward. (Also, some of the authors are probably
already on p5p reading this,
and could chime in, "Don't worry, I'll take care of it!")

Latest run of 'make test' for Lexical​::Types against blead is attached.

@p5pRT
Copy link
Author

p5pRT commented Feb 18, 2013

From @jkeenan

  VPIT/Lexical-Types-0.12.tar.gz
  /usr/bin/make -- OK
Prepending /Users/jimk/.cpan/build/Char-EUCJP-0.86-9wQiXa/blib/arch /Users/jimk/.cpan/build/Char-EUCJP-0.86-9wQiXa/blib/lib to PERL5LIB for 'test'
Running make test
PERL_DL_NONLAZY=1 /Users/jimk/perl5/perlbrew/perls/perl-blead/bin/perl5.17.9 "-MExtUtils​::Command​::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00-load.t ............... 1/1 # Testing Lexical​::Types 0.12, Perl 5.017009, /Users/jimk/perl5/perlbrew/perls/perl-blead/bin/perl5.17.9
t/00-load.t ............... ok
t/10-base.t ............... 1/4
# Failed test 'double (a)'
# at t/10-base.t line 17.
# got​: undef
# expected​: '16'

# Failed test 'double (b)'
# at t/10-base.t line 18.
# got​: undef
# expected​: '16'
# Looks like you failed 2 tests of 4.
t/10-base.t ............... Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/4 subtests
t/11-args.t ............... ok
t/12-integrate.t .......... ok
t/13-padsv.t .............. ok
t/14-ro.t ................. ok
t/15-constants.t .......... 1/6
# Failed test 'my constant_type ($y,'
# at t/15-constants.t line 25.
# got​: undef
# expected​: 'int​:MyTypes​::Int'

# Failed test 'my constant_type $z)'
# at t/15-constants.t line 26.
# got​: undef
# expected​: 'int​:MyTypes​::Int'
# Looks like you failed 2 tests of 6.
t/15-constants.t .......... Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/6 subtests
t/16-scope.t .............. ok
t/17-peep.t ............... ok
t/18-hints.t .............. ok
t/20-object.t ............. ok
t/21-tie.t ................ ok
t/22-magic.t .............. skipped​: Variable​::Magic required to test magic
t/23-magic-uvar.t ......... skipped​: Variable​::Magic 0.35 on 5.10 required to test uvar magic
t/30-threads.t ............ skipped​: This perl wasn't built to support threads
t/31-threads-teardown.t ... skipped​: This perl wasn't built to support threads
t/40-stress.t ............. ok
t/91-pod.t ................ skipped​: Test​::Pod 1.22 required for testing POD
t/92-pod-coverage.t ....... skipped​: Test​::Pod​::Coverage 1.08 required for testing POD coverage
t/95-portability-files.t .. skipped​: Test​::Portability​::Files required for testing filenames portability
t/99-kwalitee.t ........... skipped​: Test​::Kwalitee not installed

Test Summary Report


t/10-base.t (Wstat​: 512 Tests​: 4 Failed​: 2)
  Failed tests​: 2-3
  Non-zero exit status​: 2
t/15-constants.t (Wstat​: 512 Tests​: 6 Failed​: 2)
  Failed tests​: 2-3
  Non-zero exit status​: 2
Files=21, Tests=1117, 10 wallclock secs ( 1.08 usr 0.34 sys + 3.69 cusr 0.93 csys = 6.04 CPU)
Result​: FAIL
Failed 2/21 test programs. 4/1117 subtests failed.
make​: *** [test_dynamic] Error 255
  VPIT/Lexical-Types-0.12.tar.gz
  /usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try​:
  reports VPIT/Lexical-Types-0.12.tar.gz
Failed during this command​:
VPIT/Lexical-Types-0.12.tar.gz : make_test NO

@p5pRT
Copy link
Author

p5pRT commented Feb 18, 2013

From @jkeenan

On Mon Feb 18 12​:11​:18 2013, jkeenan wrote​:

On Fri Feb 15 19​:16​:10 2013, rjbs wrote​:

It sounds like the issue here is that downstream modules need to be
updated for changes to
perlguts. This seems like not exactly a blocker, but it would be nice
if we could provide patches,
if that's straightforward. (Also, some of the authors are probably
already on p5p reading this,
and could chime in, "Don't worry, I'll take care of it!")

Latest run of 'make test' for Lexical​::Types against blead is attached.

I have changed the name of this RT to reflect the fact that a change in
perl affects various CPAN modules.

@p5pRT
Copy link
Author

p5pRT commented Feb 18, 2013

From perl@profvince.com

Le 18/02/13 17​:11, James E Keenan via RT a écrit :

On Fri Feb 15 19​:16​:10 2013, rjbs wrote​:

It sounds like the issue here is that downstream modules need to be
updated for changes to
perlguts. This seems like not exactly a blocker, but it would be nice
if we could provide patches,
if that's straightforward. (Also, some of the authors are probably
already on p5p reading this,
and could chime in, "Don't worry, I'll take care of it!")

Latest run of 'make test' for Lexical​::Types against blead is attached.

---
via perlbug​: queue​: perl5 status​: open
https://rt-archive.perl.org/perl5/Ticket/Display.html?id=115684

The module needs to be updated to Dave's new padrange optimization.
Please don't block the 5.18 release on it.

Vincent

@p5pRT
Copy link
Author

p5pRT commented Mar 12, 2013

From @rjbs

It appears that in all cases, it is the modules which must be reworked. I do not see a use for this
ticket to remain open so unless someone has one​: leave it closed. Closed!
--
rjbs

@p5pRT
Copy link
Author

p5pRT commented Mar 12, 2013

From [Unknown Contact. See original ticket]

It appears that in all cases, it is the modules which must be reworked. I do not see a use for this
ticket to remain open so unless someone has one​: leave it closed. Closed!
--
rjbs

@p5pRT
Copy link
Author

p5pRT commented Mar 12, 2013

@rjbs - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant