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 v5.15.5-306-gb50b205 breaks RIBASUSHI/namespace-clean-0.21.tar.gz #11807

Closed
p5pRT opened this issue Dec 15, 2011 · 14 comments
Closed

Bleadperl v5.15.5-306-gb50b205 breaks RIBASUSHI/namespace-clean-0.21.tar.gz #11807

p5pRT opened this issue Dec 15, 2011 · 14 comments
Labels

Comments

@p5pRT
Copy link
Collaborator

@p5pRT p5pRT commented Dec 15, 2011

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

Searchable as RT106282$

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Dec 15, 2011

From @andk

git bisect


commit b50b205
Author​: Father Chrysostomos <sprout@​cpan.org>
Date​: Tue Dec 6 18​:12​:14 2011 -0800

  Implement new ‘use 5.xxx' plan

diagnostics


You need to install in this order​:

(1) B​::Hooks​::EndOfScope
(2) Devel​::Hide
(3) namespace​::clean

Otherwise the test will get skipped.

The test output looks like
http​://www.cpantesters.org/cpan/report/37eccc4c-2312-11e1-9975-feb7dc02392a

perl -V


Summary of my perl5 (revision 5 version 15 subversion 5) configuration​:
  Commit id​: b50b205
  Platform​:
  osname=linux, osvers=2.6.32-5-amd64, archname=x86_64-linux
  uname='linux k83 2.6.32-5-amd64 #1 smp thu nov 3 03​:41​:26 utc 2011 x86_64 gnulinux '
  config_args='-Dprefix=/home/src/perl/repoperls/installed-perls/perl/v5.15.5-306-gb50b205/165a -Dmyhostname=k83 -Dinstallusrbinperl=n -Uversiononly -Dusedevel -des -Ui_db -Uuseithreads -Uuselongdouble -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=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 -g',
  cppflags='-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
  ccversion='', gccversion='4.4.5', 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/../lib /usr/lib/../lib /lib /usr/lib /lib64 /usr/lib64
  libs=-lnsl -ldb -ldl -lm -lcrypt -lutil -lc
  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 -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_PERLIO USE_PERL_ATOF
  Built under linux
  Compiled at Dec 15 2011 07​:20​:57
  @​INC​:
  /home/src/perl/repoperls/installed-perls/perl/v5.15.5-306-gb50b205/165a/lib/site_perl/5.15.5/x86_64-linux
  /home/src/perl/repoperls/installed-perls/perl/v5.15.5-306-gb50b205/165a/lib/site_perl/5.15.5
  /home/src/perl/repoperls/installed-perls/perl/v5.15.5-306-gb50b205/165a/lib/5.15.5/x86_64-linux
  /home/src/perl/repoperls/installed-perls/perl/v5.15.5-306-gb50b205/165a/lib/5.15.5
  .

--
andreas

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Dec 15, 2011

From @nwc10

On Wed, Dec 14, 2011 at 11​:12​:02PM -0800, Andreas J. Koenig via RT wrote​:

commit b50b205
Author​: Father Chrysostomos <sprout@​cpan.org>
Date​: Tue Dec 6 18​:12​:14 2011 -0800

Implement new ???use 5\.xxx' plan

diagnostics
-----------
You need to install in this order​:

(1) B​::Hooks​::EndOfScope
(2) Devel​::Hide
(3) namespace​::clean

Otherwise the test will get skipped.

The test output looks like
http​://www.cpantesters.org/cpan/report/37eccc4c-2312-11e1-9975-feb7dc02392a

# Failed test 'Exit 139 from​: /home/sand/src/perl/repoperls/installed-perls/perl/v5.15.5-366-ga877535/9980/bin/perl -MDevel​::Hide=B​::Hooks​::EndOfScope /tmp/loop_over_bdir-UX21EL/namespace-clean-0.21-jqdYWh/t/02-inheritance.t'
# at t/10-pure-perl.t line 37.

Not looked at this further than spotting the above.
(And hoping that others will get a chance to look at it properly ahead of
me)

But to me (and to my surprise, not Wikipedia) 139 is "SEGV with coredump".

Nicholas Clark

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Dec 15, 2011

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

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Dec 18, 2011

From @cpansprout

On Wed Dec 14 23​:12​:02 2011, andreas.koenig.7os6VVqR@​franz.ak.mind.de wrote​:

git bisect
----------
commit b50b205
Author​: Father Chrysostomos <sprout@​cpan.org>
Date​: Tue Dec 6 18​:12​:14 2011 -0800

Implement new ‘use 5\.xxx' plan

diagnostics
-----------
You need to install in this order​:

(1) B​::Hooks​::EndOfScope
(2) Devel​::Hide
(3) namespace​::clean

Otherwise the test will get skipped.

The test output looks like
http​://www.cpantesters.org/cpan/report/37eccc4c-2312-11e1-9975-
feb7dc02392a

I don’t know that I’ll have time to look at this today, but here are C
and Perl backtraces from running

  perl5.15.5 -Mblib -MDevel​::Hide=B​::Hooks​::EndOfScope t/02-inheritance.t

where perl5.15.5 is actually v5.15.5-425-g5dca8ed​:

#0 Perl_sv_magic (sv=0x0, obj=0x0, how=104, name=0x8a9340 "???",
namlen=-2) at sv.c​:5304
#1 0x000a3dd2 in Perl_hv_copy_hints_hv (ohv=0x882e10) at hv.c​:1468
#2 0x000db668 in Perl_save_hints () at scope.c​:598
#3 0x000e5509 in S_doeval (gimme=<value temporarily unavailable, due to
optimizations>, startop=0x0, outside=<value temporarily unavailable, due
to optimizations>, seq=2432, hh=0x8a9220) at pp_ctl.c​:3543
#4 0x000e9a40 in Perl_pp_entereval () at pp_ctl.c​:4274
#5 0x000a66f3 in Perl_runops_standard () at run.c​:41
#6 0x00020240 in Perl_call_sv (sv=0x8a9150, flags=14) at perl.c​:2695
#7 0x000206ab in Perl_call_list (oldscope=16, paramList=0x882df0) at
perl.c​:4768
#8 0x00003a5b in S_process_special_blocks (fullname=<value temporarily
unavailable, due to optimizations>, gv=0x8a9130, cv=0x8a9150) at op.c​:6859
#9 0x00017bcb in Perl_newATTRSUB (floor=282, o=0x33a100, proto=0x0,
attrs=0x0, block=0x33a0e0) at op.c​:6829
#10 0x000164dd in Perl_utilize (aver=1, floor=282, version=0x0,
idop=0x2e90a0, arg=0x2e98f0) at op.c​:4662
#11 0x0005ba46 in Perl_yyparse (gramtype=258) at perly.y​:361
#12 0x000e518d in S_doeval (gimme=<value temporarily unavailable, due to
optimizations>, startop=0x0, outside=<value temporarily unavailable, due
to optimizations>, seq=1896, hh=0x0) at pp_ctl.c​:3589
#13 0x000eb145 in Perl_pp_require () at pp_ctl.c​:4146
#14 0x000a66f3 in Perl_runops_standard () at run.c​:41
#15 0x00020240 in Perl_call_sv (sv=0x882c60, flags=14) at perl.c​:2695
#16 0x000206ab in Perl_call_list (oldscope=9, paramList=0x882bb0) at
perl.c​:4768
#17 0x00003a5b in S_process_special_blocks (fullname=<value temporarily
unavailable, due to optimizations>, gv=0x8235d0, cv=0x882c60) at op.c​:6859
#18 0x00017bcb in Perl_newATTRSUB (floor=136, o=0x2e87c0, proto=0x0,
attrs=0x0, block=0x2e87a0) at op.c​:6829
#19 0x000164dd in Perl_utilize (aver=1, floor=136, version=0x0,
idop=0x2e8520, arg=0x2e8570) at op.c​:4662
#20 0x0005ba46 in Perl_yyparse (gramtype=258) at perly.y​:361
#21 0x000e518d in S_doeval (gimme=<value temporarily unavailable, due to
optimizations>, startop=0x0, outside=<value temporarily unavailable, due
to optimizations>, seq=1632, hh=0x823080) at pp_ctl.c​:3589
#22 0x000e9a40 in Perl_pp_entereval () at pp_ctl.c​:4274
#23 0x000a66f3 in Perl_runops_standard () at run.c​:41
#24 0x000229b0 in perl_run (my_perl=0x200190) at perl.c​:2392
#25 0x0000200d in main (argc=4, argv=0xbfffe858, env=0xbfffe86c) at
perlmain.c​:120

blah blah blah at (eval
25)[/Users/sprout/.cpan/build/namespace-clean-0.21-xTzmzo/blib/lib/base.pm​:81]
line 1
  eval 'require Tie​::ExtraHash
;' called at
/Users/sprout/.cpan/build/namespace-clean-0.21-xTzmzo/blib/lib/base.pm
line 81
  base​::import('base', 'Tie​::ExtraHash') called at (eval
23)[/Users/sprout/.cpan/build/namespace-clean-0.21-xTzmzo/blib/lib/namespace/clean.pm​:30]
line 10
  namespace​::clean​::_TieHintHash​::BEGIN() called at (eval
25)[/Users/sprout/.cpan/build/namespace-clean-0.21-xTzmzo/blib/lib/base.pm​:81]
line 0
  eval {...} called at (eval
25)[/Users/sprout/.cpan/build/namespace-clean-0.21-xTzmzo/blib/lib/base.pm​:81]
line 0
  eval '
  use Tie​::Hash ();

  {
  package namespace​::clean​::_TieHintHash;

  use warnings;
  use strict;

  use base \'Tie​::ExtraHash\';
  }

  {
  package namespace​::clean​::_ScopeGuard;

  use warnings;
  use strict;

  sub arm { bless [ $_[1] ] }

  sub DESTROY { $_[0]->[0]->() }
  }

  sub on_scope_end (&) {
  $^H |= 0x020000;

  if( my $stack = tied( %^H ) ) {
  if ( (my $c = ref $stack) ne \'namespace​::clean​::_TieHintHash\') {
  die <<EOE;

  !!! F A T A L E R R O R !!!

  foreign tie() of %^H detected

namespace​::clean is currently operating in pure-perl fallback mode, because
your system is lacking the necessary dependency B​::Hooks​::EndOfScope
$b_h_eos_req.
In this mode namespace​::clean expects to be able to tie() the hinthash %^H,
however it is apparently already tied by means unknown to the tie-class
$c

Since this is a no-win situation execution will abort here and now. Please
try to find out which other module is relying on hinthash tie() ability,
and file a bug for both the perpetrator and namespace​::clean, so that the
authors can figure out an acceptable way of moving forward.

EOE
  }
  push @​$stack, namespace​::clean​::_ScopeGuard->arm(shift);
  }
  else {
  tie( %^H, \'namespace​::clean​::_TieHintHash\',
namespace​::clean​::_ScopeGuard->arm(shift) );
  }
  }

  1;

;' called at
/Users/sprout/.cpan/build/namespace-clean-0.21-xTzmzo/blib/lib/namespace/clean.pm
line 30
  namespace​::clean​::BEGIN() called at (eval
25)[/Users/sprout/.cpan/build/namespace-clean-0.21-xTzmzo/blib/lib/base.pm​:81]
line 0
  eval {...} called at (eval
25)[/Users/sprout/.cpan/build/namespace-clean-0.21-xTzmzo/blib/lib/base.pm​:81]
line 0
  require namespace/clean.pm called at
/Users/sprout/.cpan/build/namespace-clean-0.21-xTzmzo/t/lib/Inheritance.pm
line 7
  InheritanceParent​::BEGIN() called at (eval
25)[/Users/sprout/.cpan/build/namespace-clean-0.21-xTzmzo/blib/lib/base.pm​:81]
line 0
  eval {...} called at (eval
25)[/Users/sprout/.cpan/build/namespace-clean-0.21-xTzmzo/blib/lib/base.pm​:81]
line 0
  require Inheritance.pm called at (eval
7)[/usr/local/lib/perl5/5.15.5/Test/More.pm​:885] line 2
  main​::BEGIN() called at (eval
25)[/Users/sprout/.cpan/build/namespace-clean-0.21-xTzmzo/blib/lib/base.pm​:81]
line 0
  eval {...} called at (eval
25)[/Users/sprout/.cpan/build/namespace-clean-0.21-xTzmzo/blib/lib/base.pm​:81]
line 0
  eval 'package main;
use Inheritance @​{$args[0]};
1;

;' called at /usr/local/lib/perl5/5.15.5/Test/More.pm line 885
  Test​::More​::_eval('package main;\x{a}use Inheritance
@​{$args[0]};\x{a}1;\x{a}', 'ARRAY(0x85eff0)') called at
/usr/local/lib/perl5/5.15.5/Test/More.pm line 860
  Test​::More​::use_ok('Inheritance') called at
/Users/sprout/.cpan/build/namespace-clean-0.21-xTzmzo/t/02-inheritance.t
line 10

--

Father Chrysostomos

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Dec 18, 2011

From @cpansprout

On Sun Dec 18 13​:24​:34 2011, sprout wrote​:

On Wed Dec 14 23​:12​:02 2011, andreas.koenig.7os6VVqR@​franz.ak.mind.de
wrote​:

git bisect
----------
commit b50b205
Author​: Father Chrysostomos <sprout@​cpan.org>
Date​: Tue Dec 6 18​:12​:14 2011 -0800

Implement new ‘use 5\.xxx' plan

diagnostics
-----------
You need to install in this order​:

(1) B​::Hooks​::EndOfScope
(2) Devel​::Hide
(3) namespace​::clean

Otherwise the test will get skipped.

The test output looks like
http​://www.cpantesters.org/cpan/report/37eccc4c-2312-11e1-9975-
feb7dc02392a

I don’t know that I’ll have time to look at this today, but here are C
and Perl backtraces from running

perl5\.15\.5 \-Mblib \-MDevel&#8203;::Hide=B&#8203;::Hooks&#8203;::EndOfScope t/02\-

inheritance.t

where perl5.15.5 is actually v5.15.5-425-g5dca8ed​:

Notice in particular that the sv passed to Perl_sv_magic is null​:

#0 Perl_sv_magic (sv=0x0, obj=0x0, how=104, name=0x8a9340 "???",
namlen=-2) at sv.c​:5304
#1 0x000a3dd2 in Perl_hv_copy_hints_hv (ohv=0x882e10) at hv.c​:1468
#2 0x000db668 in Perl_save_hints () at scope.c​:598
#3 0x000e5509 in S_doeval (gimme=<value temporarily unavailable, due
to
optimizations>, startop=0x0, outside=<value temporarily unavailable,
due
to optimizations>, seq=2432, hh=0x8a9220) at pp_ctl.c​:3543

--

Father Chrysostomos

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Dec 19, 2011

From @cpansprout

This is what I have reduced it to so far​:

#!/usr/bin/env perl

package namespace​::clean​::_TieHintHash;

sub TIEHASH { my $p = shift; bless [{}, @​_], $p }
sub STORE { $_[0][0]{$_[1]} = $_[2] }
sub FIRSTKEY { my $a = scalar keys %{$_[0][0]}; each %{$_[0][0]} }

package main;

use strict;
BEGIN { tie( %^H, 'namespace​::clean​::_TieHintHash' ); }
use strict;

sub bar { foo() }

--

Father Chrysostomos

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Dec 19, 2011

From @cpansprout

On Sun Dec 18 22​:29​:46 2011, sprout wrote​:

This is what I have reduced it to so far​:

#!/usr/bin/env perl

package namespace​::clean​::_TieHintHash;

sub TIEHASH { my $p = shift; bless [{}, @​_], $p }
sub STORE { $_[0][0]{$_[1]} = $_[2] }
sub FIRSTKEY { my $a = scalar keys %{$_[0][0]}; each %{$_[0][0]} }

package main;

use strict;
BEGIN { tie( %^H, 'namespace​::clean​::_TieHintHash' ); }
use strict;

sub bar { foo() }

This started crashing because strict.pm started using the hint hash, and
apparently tying the hint hash is not a good idea.

I can produce the same crash with 5.10 like this​:

use Devel​::Hide 'B​::Hooks​::EndOfScope';
use sort "stable";
use namespace​::clean;
use sort "stable";
{;}

Just using sort.pm instead of strict.pm will do it.

And here is an example that tickles the underlying bug without any modules​:

#!/usr/bin/env perl

package namespace​::clean​::_TieHintHash;

sub TIEHASH { bless[] }
sub STORE { $_[0][0]{$_[1]} = $_[2] }
sub FETCH { $_[0][0]{$_[1]} }
sub FIRSTKEY { my $a = scalar keys %{$_[0][0]}; each %{$_[0][0]} }

package main;

BEGIN { $^H{foo} = "bar" }
BEGIN { tie( %^H, 'namespace​::clean​::_TieHintHash' ); }
BEGIN { $^H{foo} = "bar" }
{ ; } # crashes on scope entry
__END__

The crash was caused by this change​:

5b9c067 is the first bad commit
commit 5b9c067
Author​: Nicholas Clark <nick@​ccl4.org>
Date​: Sat Apr 1 21​:17​:46 2006 +0000

  Automatically set HINT_LOCALIZE_HH whenever %^H is modified.
 
  p4raw-id​: //depot/perl@​27666

In trying to debug this, I’ve noticed so far that this code in
Perl_hv_copy_hints_hv ends up passing a null SV to sv_magic, because
HeVAL(entry) is null​:

  while ((entry = hv_iternext_flags(ohv, 0))) {
  SV *const sv = newSVsv(HeVAL(entry));
  SV *heksv = newSVhek(HeKEY_hek(entry));
  sv_magic(sv, NULL, PERL_MAGIC_hintselem,
  (char *)heksv, HEf_SVKEY);
  SvREFCNT_dec(heksv);
  (void)hv_store_flags(hv, HeKEY(entry), HeKLEN(entry),
  sv, HeHASH(entry), HeKFLAGS(entry));
  }

But I’m stuck, because I don’t understand magic well enough to what is
*supposed* to happen when two types of magic provide callbacks for the
same action.

If anyone could shed light on that, that would be much appreciated.

--

Father Chrysostomos

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Dec 20, 2011

From @cpansprout

This is now about as fixed as it can get, with this commit​:

commit 95cf236
Author​: Father Chrysostomos <sprout@​cpan.org>
Date​: Tue Dec 20 15​:25​:18 2011 -0800

  [perl #106282] Don’t crash cloning tied %^H
 
  When hv_iternext_flags is called on a tied hash, the hash entry (HE)
  that it returns has no value. Perl_hv_copy_hints_hv, added in commit
  5b9c067, was assuming that it would have a value and calling
  sv_magic on it, resulting in a crash.
 
  Commit b50b205 made namespace​::clean’s test suite crash, because
  strict.pm started using %^H. It was already possible to crash
  namespace​::clean with other hh-using pragmata, like sort​:
 
  # namespace​::clean 0.21 only uses ties in the absence of B​:H​:EOS
  use Devel​::Hide 'B​::Hooks​::EndOfScope';
  use sort "stable";
  use namespace​::clean;
  use sort "stable";
  {;}
 
  It was possible to trigger the crash with no modules like this​:
 
  package namespace​::clean​::_TieHintHash;
 
  sub TIEHASH { bless[] }
  sub STORE { $_[0][0]{$_[1]} = $_[2] }
  sub FETCH { $_[0][0]{$_[1]} }
  sub FIRSTKEY { my $a = scalar keys %{$_[0][0]}; each %{$_[0][0]} }
  sub NEXTKEY { each %{$_[0][0]} }
 
  package main;
 
  BEGIN {
  $^H{foo} = "bar";
  tie( %^H, 'namespace​::clean​::_TieHintHash' );
  $^H{foo} = "bar";
  }
  { ; }
 
  This commit puts in a simple null check before calling sv_magic. Tied
  hint hashes still do not work, but they now only work as badly as in
  5.8 (i.e., they don’t crash).
 
  I don’t think tied hint hashes can ever be made to work properly, even
  if we do make Perl_hv_copy_hints_hv copy the hash properly, because in
  the scope where %^H is tied, the tie magic takes precedence over hint
  magic, preventing the underlying he chain from being updated. So
  hints set in that scope will just not stick.

--

Father Chrysostomos

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Dec 20, 2011

From [Unknown Contact. See original ticket]

This is now about as fixed as it can get, with this commit​:

commit 95cf236
Author​: Father Chrysostomos <sprout@​cpan.org>
Date​: Tue Dec 20 15​:25​:18 2011 -0800

  [perl #106282] Don’t crash cloning tied %^H
 
  When hv_iternext_flags is called on a tied hash, the hash entry (HE)
  that it returns has no value. Perl_hv_copy_hints_hv, added in commit
  5b9c067, was assuming that it would have a value and calling
  sv_magic on it, resulting in a crash.
 
  Commit b50b205 made namespace​::clean’s test suite crash, because
  strict.pm started using %^H. It was already possible to crash
  namespace​::clean with other hh-using pragmata, like sort​:
 
  # namespace​::clean 0.21 only uses ties in the absence of B​:H​:EOS
  use Devel​::Hide 'B​::Hooks​::EndOfScope';
  use sort "stable";
  use namespace​::clean;
  use sort "stable";
  {;}
 
  It was possible to trigger the crash with no modules like this​:
 
  package namespace​::clean​::_TieHintHash;
 
  sub TIEHASH { bless[] }
  sub STORE { $_[0][0]{$_[1]} = $_[2] }
  sub FETCH { $_[0][0]{$_[1]} }
  sub FIRSTKEY { my $a = scalar keys %{$_[0][0]}; each %{$_[0][0]} }
  sub NEXTKEY { each %{$_[0][0]} }
 
  package main;
 
  BEGIN {
  $^H{foo} = "bar";
  tie( %^H, 'namespace​::clean​::_TieHintHash' );
  $^H{foo} = "bar";
  }
  { ; }
 
  This commit puts in a simple null check before calling sv_magic. Tied
  hint hashes still do not work, but they now only work as badly as in
  5.8 (i.e., they don’t crash).
 
  I don’t think tied hint hashes can ever be made to work properly, even
  if we do make Perl_hv_copy_hints_hv copy the hash properly, because in
  the scope where %^H is tied, the tie magic takes precedence over hint
  magic, preventing the underlying he chain from being updated. So
  hints set in that scope will just not stick.

--

Father Chrysostomos

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Dec 20, 2011

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

@p5pRT p5pRT closed this Dec 20, 2011
@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Dec 21, 2011

From @andk

On Tue, 20 Dec 2011 15​:28​:12 -0800, "Father Chrysostomos via RT" <perlbug-followup@​perl.org> said​:

  > According to our records, your request regarding
  > "Bleadperl v5.15.5-306-gb50b205 breaks RIBASUSHI/namespace-clean-0.21.tar.gz"
  > has been resolved.

I now get OOM​:

t/08-const-sub.t ......... ok
Out of memory!
Attempt to free unreferenced scalar​: SV 0xafbda0 at /tmp/tmp.2V6nCmp6FH/namespace-clean-0.21-BFmxvt/t/lib/Inheritance.pm line 15.
# Looks like your test exited with 1 before it could output anything.

# Failed test 'Exit 256 from​: /home/sand/src/perl/repoperls/installed-perls/perl/v5.15.6-10-g95cf236/127e/bin/perl -MDevel​::Hide=B​::Hooks​::EndOfScope /tmp/tmp.2V6nCmp6FH/namespace-clean-0.21-BFmxvt/t/02-inheritance.t'
# at t/10-pure-perl.t line 37.
Attempt to free unreferenced scalar​: SV 0x937bf8 at /tmp/tmp.2V6nCmp6FH/namespace-clean-0.21-BFmxvt/t/08-const-sub.t line 4294967295.
# Looks like you failed 1 test of 9.
t/10-pure-perl.t .........
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/9 subtests

Test Summary Report


t/10-pure-perl.t (Wstat​: 256 Tests​: 9 Failed​: 1)
  Failed test​: 3
  Non-zero exit status​: 1

perl -V


Summary of my perl5 (revision 5 version 15 subversion 6) configuration​:
  Commit id​: 95cf236
  Platform​:
  osname=linux, osvers=2.6.32-5-amd64, archname=x86_64-linux-ld
  uname='linux k83 2.6.32-5-amd64 #1 smp thu nov 3 03​:41​:26 utc 2011 x86_64 gnulinux '
  config_args='-Dprefix=/home/src/perl/repoperls/installed-perls/perl/v5.15.6-10-g95cf236/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.4.5', 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/../lib /usr/lib/../lib /lib /usr/lib /lib64 /usr/lib64
  libs=-lnsl -ldb -ldl -lm -lcrypt -lutil -lc
  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 -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 Dec 21 2011 05​:33​:18
  @​INC​:
  /home/src/perl/repoperls/installed-perls/perl/v5.15.6-10-g95cf236/127e/lib/site_perl/5.15.6/x86_64-linux-ld
  /home/src/perl/repoperls/installed-perls/perl/v5.15.6-10-g95cf236/127e/lib/site_perl/5.15.6
  /home/src/perl/repoperls/installed-perls/perl/v5.15.6-10-g95cf236/127e/lib/5.15.6/x86_64-linux-ld
  /home/src/perl/repoperls/installed-perls/perl/v5.15.6-10-g95cf236/127e/lib/5.15.6
  .

--
andreas

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Dec 21, 2011

From @cpansprout

On Tue Dec 20 21​:06​:46 2011, andreas.koenig.7os6VVqR@​franz.ak.mind.de wrote​:

On Tue, 20 Dec 2011 15​:28​:12 -0800, "Father Chrysostomos via RT"
<perlbug-followup@​perl.org> said​:

According to our records, your request regarding
"Bleadperl v5.15.5-306-gb50b205 breaks RIBASUSHI/namespace-
clean-0.21.tar.gz"
has been resolved.

I now get OOM​:

t/08-const-sub.t ......... ok
Out of memory!
Attempt to free unreferenced scalar​: SV 0xafbda0 at
/tmp/tmp.2V6nCmp6FH/namespace-clean-0.21-
BFmxvt/t/lib/Inheritance.pm line 15.
# Looks like your test exited with 1 before it could output anything.

# Failed test 'Exit 256 from​:
/home/sand/src/perl/repoperls/installed-perls/perl/v5.15.6-10-
g95cf236/127e/bin/perl -MDevel​::Hide=B​::Hooks​::EndOfScope
/tmp/tmp.2V6nCmp6FH/namespace-clean-0.21-BFmxvt/t/02-inheritance.t'
# at t/10-pure-perl.t line 37.
Attempt to free unreferenced scalar​: SV 0x937bf8 at
/tmp/tmp.2V6nCmp6FH/namespace-clean-0.21-BFmxvt/t/08-const-sub.t
line 4294967295.
# Looks like you failed 1 test of 9.
t/10-pure-perl.t .........
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/9 subtests

Test Summary Report
-------------------
t/10-pure-perl.t (Wstat​: 256 Tests​: 9 Failed​: 1)
Failed test​: 3
Non-zero exit status​: 1

I believe I have fixed that with commit 7ef9d42.

--

Father Chrysostomos

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Dec 21, 2011

From @andk

On Wed, 21 Dec 2011 06​:06​:08 +0100, andreas.koenig.7os6VVqR@​franz.ak.mind.de (Andreas J. Koenig) said​:

On Tue, 20 Dec 2011 15​:28​:12 -0800, "Father Chrysostomos via RT" <perlbug-followup@​perl.org> said​:
According to our records, your request regarding
"Bleadperl v5.15.5-306-gb50b205 breaks RIBASUSHI/namespace-clean-0.21.tar.gz"
has been resolved.

  > I now get OOM​:

  > t/08-const-sub.t ......... ok
  > Out of memory!

The above was with 5.15.6-10 with -Duselongdouble. Better results with
5.15.6-20 and -Uuselongdouble​:

t/06-other-types.t ....... ok
t/08-const-sub.t ......... ok
Attempt to free unreferenced scalar​: SV 0x1f91d28 at /tmp/tmp.2V6nCmp6FH/namespace-clean-0.21-cEjh6E/t/08-const-sub.t line 4294967295.
t/10-pure-perl.t ......... ok

Here all tests passed.

--
andreas

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Dec 21, 2011

From @ribasushi

Andreas J. Koenig wrote​:

On Wed, 21 Dec 2011 06​:06​:08 +0100, andreas.koenig.7os6VVqR@​franz.ak.mind.de (Andreas J. Koenig) said​:

On Tue, 20 Dec 2011 15​:28​:12 -0800, "Father Chrysostomos via RT" <perlbug-followup@​perl.org> said​:
According to our records, your request regarding
"Bleadperl v5.15.5-306-gb50b205 breaks RIBASUSHI/namespace-clean-0.21.tar.gz"
has been resolved.

I now get OOM​:

t/08-const-sub.t ......... ok
Out of memory!

The above was with 5.15.6-10 with -Duselongdouble. Better results with
5.15.6-20 and -Uuselongdouble​:

t/06-other-types.t ....... ok
t/08-const-sub.t ......... ok
Attempt to free unreferenced scalar​: SV 0x1f91d28 at /tmp/tmp.2V6nCmp6FH/namespace-clean-0.21-cEjh6E/t/08-const-sub.t line 4294967295.
t/10-pure-perl.t ......... ok

Here all tests passed.

Please try with the new namespace​::clean 0.21_01 I shipped an hour ago.

@p5pRT p5pRT added the Severity Low label Oct 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.