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

Bleadperl ac56e7d breaks Devel-Cover-0.70 #10592

Closed
p5pRT opened this issue Aug 31, 2010 · 7 comments
Closed

Bleadperl ac56e7d breaks Devel-Cover-0.70 #10592

p5pRT opened this issue Aug 31, 2010 · 7 comments

Comments

@p5pRT
Copy link

p5pRT commented Aug 31, 2010

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

Searchable as RT77542$

@p5pRT
Copy link
Author

p5pRT commented Aug 31, 2010

From @andk

cpan rt ticket​:

  https://rt.cpan.org/Ticket/Display.html?id=60901 

git bisect​:

  commit ac56e7d
  Author​: Nicholas Clark <nick@​ccl4.org>
  Date​: Fri Aug 27 21​:48​:55 2010 +0100

  Peephole optimise adjacent pairs of nextstate ops.

perl -V​:

  Summary of my perl5 (revision 5 version 13 subversion 4) configuration​:
  Commit id​: ac56e7d
  Platform​:
  osname=linux, osvers=2.6.32-2-amd64, archname=x86_64-linux
  uname='linux k81 2.6.32-2-amd64 #1 smp fri feb 12 00​:01​:47 utc 2010 x86_64 gnulinux '
  config_args='-Dprefix=/home/src/perl/repoperls/installed-perls/perl/v5.13.4-59-gac56e7d -Dinstallusrbinperl=n -Uversiononly -Dusedevel -des -Ui_db -Uuseithreads -Uuselongdouble'
  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=undef
  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',
  cppflags='-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
  ccversion='', gccversion='4.4.4', 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='double', nvsize=8, Off_t='off_t', lseeksize=8
  alignbytes=8, prototype=define
  Linker and Libraries​:
  ld='cc', ldflags =' -fstack-protector -L/usr/local/lib'
  libpth=/usr/local/lib /lib /usr/lib /lib64 /usr/lib64
  libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat
  perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
  libc=/lib/libc-2.11.2.so, so=so, useshrplib=false, libperl=libperl.a
  gnulibc_version='2.11.2'
  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'

  Characteristics of this binary (from libperl)​:
  Compile-time options​: PERL_DONT_CREATE_GVSV PERL_MALLOC_WRAP PERL_USE_DEVEL
  USE_64_BIT_ALL USE_64_BIT_INT USE_LARGE_FILES
  USE_PERLIO USE_PERL_ATOF
  Built under linux
  Compiled at Aug 31 2010 04​:14​:47
  @​INC​:
  /home/src/perl/repoperls/installed-perls/perl/v5.13.4-59-gac56e7d/lib/site_perl/5.13.4/x86_64-linux
  /home/src/perl/repoperls/installed-perls/perl/v5.13.4-59-gac56e7d/lib/site_perl/5.13.4
  /home/src/perl/repoperls/installed-perls/perl/v5.13.4-59-gac56e7d/lib/5.13.4/x86_64-linux
  /home/src/perl/repoperls/installed-perls/perl/v5.13.4-59-gac56e7d/lib/5.13.4
  .

--
andreas

@p5pRT
Copy link
Author

p5pRT commented Aug 31, 2010

From @pjcj

On Tue, Aug 31, 2010 at 04​:36​:21AM +0200, Andreas J. Koenig wrote​:

cpan rt ticket​:

https://rt.cpan.org/Ticket/Display.html?id=60901 

git bisect​:

commit ac56e7d
Author​: Nicholas Clark <nick@​ccl4.org>
Date​: Fri Aug 27 21​:48​:55 2010 +0100

Peephole optimise adjacent pairs of nextstate ops.

Thanks very much for flagging this up so quickly.

The primary effect of the optimisation Nick made here, as far as
Devel​::Cover's tests are concerned, is that each "use" statement now
translates into two statements rather then three, as had been the case
previously.

The solution is simple. I will fix up the tests and put out a new
release of Devel​::Cover. However, I won't do this until there has been
a perl release with this optimisation, otherwise people using 5.13.4
will start getting failures. (I track behavioural changes based on
perl's version number. I don't think it makes any sense to be more fine
grained than that.)

In the meantime, anyone wanting to use Devel​::Cover under bleadperl can
simply ignore the test failures and note that their coverage has
probably gone down as a result of this optimisation.

I read someone's blog yesterday where they had made a git commit hook
which failed if the coverage with the commit was lower than the previous
coverage. They may get a surprise the first time they commit something
under 5.14.0.

--
Paul Johnson - paul@​pjcj.net
http​://www.pjcj.net

@p5pRT
Copy link
Author

p5pRT commented Aug 31, 2010

From @tonycoz

22​:35 <@​pjcj> I forgot to explicitly mention it, but the original ticket
can be
  closed since it's not a bug in perl

@p5pRT
Copy link
Author

p5pRT commented Aug 31, 2010

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

@p5pRT
Copy link
Author

p5pRT commented Aug 31, 2010

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

@p5pRT p5pRT closed this as completed Aug 31, 2010
@p5pRT
Copy link
Author

p5pRT commented Sep 3, 2010

From @andk

On Tue, 31 Aug 2010 05​:38​:42 -0700, "Tony Cook via RT" <perlbug-followup@​perl.org> said​:

  > 22​:35 <@​pjcj> I forgot to explicitly mention it, but the original ticket
  > can be
  > closed since it's not a bug in perl

But it is useful for keeping track of all CPAN modules that depend on
it. The changes file for 5.13.5 will probably want to mention such
breakages when the CPAN releases take a bit longer than 3 weeks.

Next module I just discovered, surprise, Devel-NYTProf-4.04 also fails
tests starting with this patch.

--
andreas

@p5pRT
Copy link
Author

p5pRT commented Sep 4, 2010

From @timbunce

[Resent. Previous one didn't reference RT or CC perlbug-followup.]

On Fri, Sep 03, 2010 at 08​:03​:17AM +0200, Andreas J. Koenig wrote​:

Next module I just discovered, surprise, Devel-NYTProf-4.04 also fails
tests starting with this patch.

The test failures seem to indicate that ac56e7d has wider effects than
its description implies.

t/10-run.t pipes the following to perl

  1+1;
  2+2;

and does some analysis of the profile. One test checks that the number
of statements executed is 2. That test is failing because, when run with
use_db_sub=0, the number of statements executed is 1.

t/70-subname.t pases but generates Attempt to free unreferenced scalar​:
SV 0x822dd0 warnings.

A bunch of other tests fail in a way that suggests the statement on the
first line (and perhaps sometimes the last) isn't getting profiled.

The tests that fail only do so for the use_db_sub=0 case (the default).
That's the mode that uses opcode-redirection (instead of the DB​::sub sub)
to do profiling. The OP_NEXTSTATE op is redirected to the
pp_stmt_profiler() sub which does the profiling then calls the original op.

perl 5.12.0​:
$ perl -MO=Terse -e '1+1;' -e '2+2;'
LISTOP (0x534f20) leave [1]
  OP (0x5099d0) enter
  COP (0x508b30) nextstate
  OP (0x509710) null [5]
  COP (0x515f10) nextstate
  OP (0x55e5a0) null [5]

perl-blead​:
$ perl -MO=Terse -e '1+1;' -e '2+2;'
LISTOP (0x206d50) leave [1]
  OP (0x201b30) enter
  COP (0x2015e0) nextstate
  OP (0x206de0) null [5]
  OP (0x206a70) null
  OP (0x206a20) null [5]

Any thoughts Nicholas?

Tim.

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