develooper Front page | perl.perl5.porters | Postings from January 2014

Perl or Devel::Cover bug

Thread Next
From:
wolfsage
Date:
January 31, 2014 18:29
Subject:
Perl or Devel::Cover bug
Message ID:
CAJ0K8bguzqd-dNiKEhUi5tj+tq0VNgi4E4-1WFuvRYaZXQNJPw@mail.gmail.com
Porters,

I'm not sure where to file this one. Perl bug or is Devel::Cover doing
something evil?

frew found it when doing coverage tests for
DBIx-Class-DeploymentHandler and I reduced it to this:

  mhorsfall@dory:~$ cat t2.pl
  #!/usr/bin/perl

  use strict;
  use warnings;

  {
          package Cat;

          use overload (
              'bool' => 'meh',
          );

          sub meh { 1 }
  }

  my $string = "hi";
  my $x = bless \$string, "Cat";

  my $fn = eval 'require $x';
  __END__

  mhorsfall@dory:~$ perls/blead-ca58718049/bin/perl -MDevel::Cover -d:cst t2.pl
  Devel::Cover 1.08: Collecting coverage data for branch, condition,
pod, statement, subroutine and time.
  Selecting packages matching:
  Ignoring packages matching:
      /Devel/Cover[./]
  Ignoring packages in:
  Deep recursion on subroutine "Cat::meh" at (eval 60)[t2.pl:19] line 1.
  Segmentation fault (Address not mapped to object [0x7fff2cfd5fdf])
  perls/blead-ca58718049/bin/perl(Perl_Gv_AMupdate+0x14)[0x43fdb4]
  perls/blead-ca58718049/bin/perl(Perl_amagic_call+0x19a)[0x4406ba]
  perls/blead-ca58718049/bin/perl(Perl_sv_2bool_flags+0x6f)[0x4a670f]
  /home/mhorsfall/perls/blead-ca58718049/lib/site_perl/5.19.9/x86_64-linux/auto/Devel/Cover/Cover.so(+0x3ad2)[0x7f192729cad2]
  /home/mhorsfall/perls/blead-ca58718049/lib/site_perl/5.19.9/x86_64-linux/auto/Devel/Cover/Cover.so(+0x5893)[0x7f192729e893]
    perls/blead-ca58718049/bin/perl(Perl_runops_standard+0x13)[0x49db53]
  perls/blead-ca58718049/bin/perl(Perl_amagic_call+0x429)[0x440949]
  perls/blead-ca58718049/bin/perl(Perl_sv_2bool_flags+0x6f)[0x4a670f]
  /home/mhorsfall/perls/blead-ca58718049/lib/site_perl/5.19.9/x86_64-linux/auto/Devel/Cover/Cover.so(+0x3ad2)[0x7f192729cad2]
  /home/mhorsfall/perls/blead-ca58718049/lib/site_perl/5.19.9/x86_64-linux/auto/Devel/Cover/Cover.so(+0x5893)[0x7f192729e893]
  perls/blead-ca58718049/bin/perl(Perl_runops_standard+0x13)[0x49db53]
  perls/blead-ca58718049/bin/perl(Perl_amagic_call+0x429)[0x440949]
  perls/blead-ca58718049/bin/perl(Perl_sv_2bool_flags+0x6f)[0x4a670f]
  /home/mhorsfall/perls/blead-ca58718049/lib/site_perl/5.19.9/x86_64-linux/auto/Devel/Cover/Cover.so(+0x3ad2)[0x7f192729cad2]
  /home/mhorsfall/perls/blead-ca58718049/lib/site_perl/5.19.9/x86_64-linux/auto/Devel/Cover/Cover.so(+0x5893)[0x7f192729e893]
  perls/blead-ca58718049/bin/perl(Perl_runops_standard+0x13)[0x49db53]
  perls/blead-ca58718049/bin/perl(Perl_amagic_call+0x429)[0x440949]
  perls/blead-ca58718049/bin/perl(Perl_sv_2bool_flags+0x6f)[0x4a670f]
  Segmentation fault (core dumped)

perl-5.10.1 fails like this:
  Deep recursion on subroutine "Cat::meh" at (eval 40)[t2.pl:19] line 1.
  Segmentation fault (Address not mapped to object [0xbf1d6ff4])
  /lib/tls/i686/cmov/libc.so.6(__libc_malloc+0x5c)[0x450f9c]
  perl(Perl_safesysmalloc+0x2c)[0x80bec3c]
  perl(Perl_av_extend+0x528)[0x80d2828]
  perl(Perl_new_stackinfo+0x65)[0x8104875]
  perl(Perl_amagic_call+0x1ed)[0x807f4ed]
  perl(Perl_sv_2bool+0x74)[0x80e0c44]
  /usr/local/lib/perl/5.10.1/auto/Devel/Cover/Cover.so(+0x572f)[0xb7372f]
  /usr/local/lib/perl/5.10.1/auto/Devel/Cover/Cover.so(+0x5c47)[0xb73c47]
  perl(Perl_runops_standard+0x18)[0x80d3ee8]
  perl(Perl_amagic_call+0x30c)[0x807f60c]
  perl(Perl_sv_2bool+0x74)[0x80e0c44]
  /usr/local/lib/perl/5.10.1/auto/Devel/Cover/Cover.so(+0x572f)[0xb7372f]
  /usr/local/lib/perl/5.10.1/auto/Devel/Cover/Cover.so(+0x5c47)[0xb73c47]
  perl(Perl_runops_standard+0x18)[0x80d3ee8]
  perl(Perl_amagic_call+0x30c)[0x807f60c]
  perl(Perl_sv_2bool+0x74)[0x80e0c44]
  /usr/local/lib/perl/5.10.1/auto/Devel/Cover/Cover.so(+0x572f)[0xb7372f]
  /usr/local/lib/perl/5.10.1/auto/Devel/Cover/Cover.so(+0x5c47)[0xb73c47]
  Segmentation fault

Cheers,

-- Matthew Horsfall (alh)

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About