Data corruption in CPAN?

10 views
Skip to first unread message

H.Merijn Brand

unread,
Feb 4, 2008, 1:57:52 PM2/4/08
to Perl5 Porters
Maybe this can be even smaller, but the script below runs fine when both
reload functions are commented out. The original script is way longer
and tries to match versions to a database and a spreadsheet.
Enable either of the reload lines and get this:

:
:
Test::Warn
Test::YAML
Text::Abbrev
Can't locate auto/version/("".al in @INC (@INC contains: /pro/lib/perl5/5.8.8/x86_64-linux /pro/lib/perl5/5.8.8 /pro/lib/perl5/site_perl/5.8.8/x86_64-linux /pro/lib/perl5/site_perl/5.8.8 /pro/3gl/CPAN) at /pro/lib/perl5/5.8.8/CPAN.pm line 10254
Exit 2

That is the call to CPAN::Module::parse_version () that calls
MM->parse_version ()

% perl -v

This is perl, v5.8.8 built for x86_64-linux
(with 2 registered patches, see perl -V for more detail)

Copyright 1987-2007, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

% perl -MV=CPAN
CPAN
/pro/lib/perl5/5.8.8/CPAN.pm: 1.9205
% perl -MV=ExtUtils::Installed
ExtUtils::Installed
/pro/lib/perl5/5.8.8/ExtUtils/Installed.pm: 1.43

--8<---
#!/pro/bin/perl

use strict;
use warnings;

use ExtUtils::Installed;
use CPAN;

my %ein;
{ local @INC = grep { $_ ne "." } @INC;
my $ei = ExtUtils::Installed->new ();
foreach my $m ($ei->modules ()) {
my $v = $ei->version ($m) or next;
$ein{$m} = $v;
}
}

#CPAN::Index->force_reload ();
#CPAN::Index->reload ();

my %mod;
my %ssm = ( Cwd => "PathTools" );
foreach my $mod (CPAN::Shell->expand ("Module", "/./")) {
$mod->inst_file or next;
my $cpf = $mod->cpan_file or next;
my $mid = $mod->id;
my $ivs = $mod->inst_version // 0;
$ivs eq "undef" || $ivs eq "0." and $ivs = 0;
my $cpv = $mod->cpan_version;
$mod{$mid} = {
mod => $mod,
id => $mid,
tgz => $cpf,
vsn => $cpv,
ivs => $ivs,
utd => ($mod->uptodate ? 1 : 0),
ein => $ein{$mid} // 0,
};
my $ssm = $ssm{$mid} // $mid;
print STDERR "$mid\n";
}
-->8---

--
H.Merijn Brand Amsterdam Perl Mongers (http://amsterdam.pm.org/)
using & porting perl 5.6.2, 5.8.x, 5.10.x on HP-UX 10.20, 11.00, 11.11,
& 11.23, SuSE 10.1 & 10.2, AIX 5.2, and Cygwin. http://qa.perl.org
http://mirrors.develooper.com/hpux/ http://www.test-smoke.org
http://www.goldmark.org/jeff/stupid-disclaimers/

Andreas J. Koenig

unread,
Feb 4, 2008, 3:39:39 PM2/4/08
to H.Merijn Brand, Perl5 Porters
>>>>> On Mon, 4 Feb 2008 19:57:52 +0100, "H.Merijn Brand" <h.m....@xs4all.nl> said:

> Maybe this can be even smaller, but the script below runs fine when both
> reload functions are commented out. The original script is way longer
> and tries to match versions to a database and a spreadsheet.

Thanks to Frank Wiegand this has been tracked down to a bug in Safe.pm
2.1[34]. Downgrade to Safe 2.12 to restore the original behaviour.

http://rt.cpan.org/Ticket/Display.html?id=32896
http://rt.cpan.org/Ticket/Display.html?id=32897 (duplicate)

--
andreas

H.Merijn Brand

unread,
Feb 4, 2008, 5:03:33 PM2/4/08
to Andreas J. Koenig, Perl5 Porters

Thanks for the quick feedback.

Frank Wiegand

unread,
Feb 4, 2008, 2:24:54 PM2/4/08
to perl5-...@perl.org
Hi,

2008/2/4, H.Merijn Brand <h.m....@xs4all.nl>:


> Can't locate auto/version/("".al in @INC (@INC contains: /pro/lib/perl5/5.8.8/x86_64-linux /pro/lib/perl5/5.8.8 /pro/lib/perl5/site_perl/5.8.8/x86_64-linux /pro/lib/perl5/site_perl/5.8.8 /pro/3gl/CPAN) at /pro/lib/perl5/5.8.8/CPAN.pm line 10254

I reported this as a bugreport against Safe.pm a few days ago:
http://rt.cpan.org/Public/Bug/Display.html?id=32896

Please note that it seems that all users of CPAN.pm and Safe.pm >=
2.13 and 5.8.8 (but not 5.10) are affected by this issue.


Frank

Frank Wiegand

unread,
Feb 4, 2008, 3:39:18 PM2/4/08
to perl5-...@perl.org
Hi,

2008/2/4, H.Merijn Brand <h.m....@xs4all.nl>:


> Can't locate auto/version/("".al in @INC (@INC contains: /pro/lib/perl5/5.8.8/x86_64-linux /pro/lib/perl5/5.8.8 /pro/lib/perl5/site_perl/5.8.8/x86_64-linux /pro/lib/perl5/site_perl/5.8.8 /pro/3gl/CPAN) at /pro/lib/perl5/5.8.8/CPAN.pm line 10254

I reported this as a bugreport against Safe.pm a few days ago:

Rafael Garcia-Suarez

unread,
Feb 5, 2008, 6:07:03 AM2/5/08
to Andreas J. Koenig, H.Merijn Brand, Perl5 Porters
On 04/02/2008, Andreas J. Koenig

That should be fixed with #33236, but I need more testing with non-blead perls.

H.Merijn Brand

unread,
Feb 5, 2008, 6:33:50 AM2/5/08
to H.Merijn Brand, Rafael Garcia-Suarez, Andreas J. Koenig, Perl5 Porters
On Tue, 5 Feb 2008 12:25:11 +0100, "H.Merijn Brand" <h.m....@xs4all.nl>
wrote:

> That change does not apply to Safe-2.14, but if I add those two lines after
> unicode_to_native, test.pl still fails
>
> Change 33236 by rgs@stcosmo on 2008/02/05 11:06:11
>
> Fix CPAN bug #32896: make version.pm loadable in a Safe compartment

$ cp -f ext/Opcode/Safe.pm /pro/lib/perl5/5.8.8/x86_64-linux/Safe.pm
$ perl test.pl

OK

H.Merijn Brand

unread,
Feb 5, 2008, 6:25:11 AM2/5/08
to Rafael Garcia-Suarez, Andreas J. Koenig, Perl5 Porters
On Tue, 5 Feb 2008 12:07:03 +0100, "Rafael Garcia-Suarez"
<rgarci...@gmail.com> wrote:

That change does not apply to Safe-2.14, but if I add those two lines after
unicode_to_native, test.pl still fails

Change 33236 by rgs@stcosmo on 2008/02/05 11:06:11

Fix CPAN bug #32896: make version.pm loadable in a Safe compartment

Affected files ...

... //depot/perl/ext/Opcode/Safe.pm#33 edit

Differences ...

==== //depot/perl/ext/Opcode/Safe.pm#33 (text) ====

@@ -58,6 +58,8 @@
&utf8::downgrade
&utf8::native_to_unicode
&utf8::unicode_to_native
+ $version::VERSION
+ $version::CLASS
], ($] >= 5.010 && qw[
&re::is_regexp
&re::regname

Rafael Garcia-Suarez

unread,
Feb 5, 2008, 11:48:32 AM2/5/08
to Andreas J. Koenig, H.Merijn Brand, Perl5 Porters

What I'd like to know is, do you need a version object to be returned
from a Safe compartment ? because Safe won't let you bless something
in the real version stash, it will give you a fake stash instead.
(unless I add %version:: to the list of shared variables). (As a
workaround you can still re-bless the object the Safe compartment gave
you)

Andreas J. Koenig

unread,
Feb 5, 2008, 4:38:11 PM2/5/08
to Rafael Garcia-Suarez, Andreas J. Koenig, H.Merijn Brand, Perl5 Porters
>>>>> On Tue, 5 Feb 2008 17:48:32 +0100, "Rafael Garcia-Suarez" <rgarci...@gmail.com> said:

> What I'd like to know is, do you need a version object to be returned
> from a Safe compartment ?

Certainly not, it just happened to work that way all the time and only
this bug revealed it.

> because Safe won't let you bless something
> in the real version stash, it will give you a fake stash instead.
> (unless I add %version:: to the list of shared variables). (As a
> workaround you can still re-bless the object the Safe compartment gave
> you)

I'm pretty sure CPAN.pm can get away with less use of Safe. But
offhand I cannot tell what exactly needs to change to find a
compromise with Safe. If that is what you're asking.

--
andreas

Andreas J. Koenig

unread,
Feb 6, 2008, 12:01:44 AM2/6/08
to Rafael Garcia-Suarez, H.Merijn Brand, Perl5 Porters, Andreas J. Koenig
>>>>> On Tue, 05 Feb 2008 22:38:11 +0100, andreas.koe...@franz.ak.mind.de (Andreas J. Koenig) said:

> I'm pretty sure CPAN.pm can get away with less use of Safe. But
> offhand I cannot tell what exactly needs to change to find a
> compromise with Safe. If that is what you're asking.

Ha! The bug in Safe.pm 2.14 goes much deeper than I thought. Watch
this code segfaulting. I took the test case provided by Frank and
removed nearly everything. And it still segfaults:

use Safe;
use version;

my $comp = Safe->new; # never using it!

my $code = <<'EOT';
use version;
qv('3.0.17');
EOT
my $ret = eval($code);
print "$ret"; # should stringify the version


#0 S_regmatch (prog=0x824a85c) at regexec.c:2325
#1 0x0814a592 in S_regmatch (prog=0x824a814) at regexec.c:3818
#2 0x0814a592 in S_regmatch (prog=0x824a804) at regexec.c:3818
#3 0x081434bd in S_regtry (prog=0x824a7c0,
startpos=0xdc10290 "version::(\"\"") at regexec.c:2202
#4 0x0813eb9f in S_find_byclass (prog=0x824a7c0, c=0x824a980,
s=0xdc10290 "version::(\"\"", strend=0xdc1029a "\"\"", norun=0)
at regexec.c:1010
#5 0x08142a2d in Perl_regexec_flags (prog=0x824a7c0,
stringarg=0xdc10290 "version::(\"\"", strend=0xdc1029a "\"\"",
strbeg=0xdc10290 "version::(\"\"", minend=0, sv=0xdc0cce0, data=0x0,
flags=3) at regexec.c:1962
#6 0x080dc4a2 in Perl_pp_match () at pp_hot.c:1341
#7 0x080c21da in Perl_runops_debug () at dump.c:1459
#8 0x0806d9c1 in Perl_amagic_call (left=0xdc0cad0, right=0x818fff8, method=4,
flags=9) at gv.c:1788
#9 0x080e7be5 in Perl_sv_2pv_flags (sv=0xdc0cad0, lp=0xbf2d36d0, flags=34)
at sv.c:2342
#10 0x080e8819 in Perl_sv_copypv (dsv=0xdc0caa0, ssv=0xdc0cad0) at sv.c:2638
#11 0x080d7db9 in Perl_pp_stringify () at pp_hot.c:89
#12 0x080c21da in Perl_runops_debug () at dump.c:1459
#13 0x0806d9c1 in Perl_amagic_call (left=0xdc0c404, right=0x818fff8, method=4,
flags=9) at gv.c:1788
#14 0x080e7be5 in Perl_sv_2pv_flags (sv=0xdc0c404, lp=0xbf2d3a40, flags=34)
at sv.c:2342
#15 0x080e8819 in Perl_sv_copypv (dsv=0xdc0c3d4, ssv=0xdc0c404) at sv.c:2638
#16 0x080d7db9 in Perl_pp_stringify () at pp_hot.c:89
#17 0x080c21da in Perl_runops_debug () at dump.c:1459
#18 0x0806d9c1 in Perl_amagic_call (left=0xdc07034, right=0x818fff8, method=4,
flags=9) at gv.c:1788
#19 0x080e7be5 in Perl_sv_2pv_flags (sv=0xdc07034, lp=0xbf2d3db0, flags=34)
at sv.c:2342
#20 0x080e8819 in Perl_sv_copypv (dsv=0xdc07004, ssv=0xdc07034) at sv.c:2638
#21 0x080d7db9 in Perl_pp_stringify () at pp_hot.c:89
#22 0x080c21da in Perl_runops_debug () at dump.c:1459
#23 0x0806d9c1 in Perl_amagic_call (left=0xdc06968, right=0x818fff8, method=4,
[...ad libitum...]


--
andreas

Rafael Garcia-Suarez

unread,
Feb 6, 2008, 3:31:14 AM2/6/08
to Andreas J. Koenig, H.Merijn Brand, Perl5 Porters
On 06/02/2008, Andreas J. Koenig

<andreas.koe...@franz.ak.mind.de> wrote:
> >>>>> On Tue, 05 Feb 2008 22:38:11 +0100, andreas.koe...@franz.ak.mind.de (Andreas J. Koenig) said:
>
> > I'm pretty sure CPAN.pm can get away with less use of Safe. But
> > offhand I cannot tell what exactly needs to change to find a
> > compromise with Safe. If that is what you're asking.
>
> Ha! The bug in Safe.pm 2.14 goes much deeper than I thought. Watch
> this code segfaulting. I took the test case provided by Frank and
> removed nearly everything. And it still segfaults:

Not for me (in blead), and even valgrind doesn't show any error.
That's with 5.10 ? I've got the impression from the stack trace that
the bug is in version rather than in Safe...

John Peacock

unread,
Feb 6, 2008, 7:47:33 AM2/6/08
to Rafael Garcia-Suarez, Andreas J. Koenig, H.Merijn Brand, Perl5 Porters
Rafael Garcia-Suarez wrote:
> On 06/02/2008, Andreas J. Koenig
>> Ha! The bug in Safe.pm 2.14 goes much deeper than I thought. Watch
>> this code segfaulting. I took the test case provided by Frank and
>> removed nearly everything. And it still segfaults:
>
> Not for me (in blead), and even valgrind doesn't show any error.
> That's with 5.10 ? I've got the impression from the stack trace that
> the bug is in version rather than in Safe...

Not for me in 5.10.0 either. Andreas, can you show me exactly how you ran that
script to see it segfault? I need to know what version of Perl you are running
(and probably what platform just to be on the safe side); it seems from context
that it is 5.10.0, but I haven't been paying that close attention to this bug
until now.

Rahael, how do you think that this is a version.pm problem based on a stack
trace that includes no function calls within the version C code? It looks to me
like the method resolution for overloaded stringify is going into a loop...

John

Rafael Garcia-Suarez

unread,
Feb 6, 2008, 8:07:12 AM2/6/08
to John Peacock, Andreas J. Koenig, H.Merijn Brand, Perl5 Porters
On 06/02/2008, John Peacock <john.p...@havurah-software.org> wrote:
> Not for me in 5.10.0 either. Andreas, can you show me exactly how you ran that
> script to see it segfault? I need to know what version of Perl you are running
> (and probably what platform just to be on the safe side); it seems from context
> that it is 5.10.0, but I haven't been paying that close attention to this bug
> until now.
>
> Rahael, how do you think that this is a version.pm problem based on a stack
> trace that includes no function calls within the version C code? It looks to me
> like the method resolution for overloaded stringify is going into a loop...

Just an intuition that can be dead wrong. However, Safe doesn't call
&version::("" anywhere -- it just uses it in a glob aliasing
assignment. So I suppose that this function is called from somewhere
in the version overloading dispatch code (universal.c). It's also
possible that there's a bad interaction with the new MRO code in
5.10.0. I don't know really -- not until I can reproduce.

H.Merijn Brand

unread,
Feb 6, 2008, 8:59:34 AM2/6/08
to Rafael Garcia-Suarez, John Peacock, Andreas J. Koenig, Perl5 Porters

The machine where I originally hit the problem was using 5.8.8-dor-64all

John Peacock

unread,
Feb 6, 2008, 9:25:53 AM2/6/08
to H.Merijn Brand, Rafael Garcia-Suarez, Andreas J. Koenig, Perl5 Porters
H.Merijn Brand wrote:
> The machine where I originally hit the problem was using 5.8.8-dor-64all

Thanks! I can recreate with a stock 5.8.8 (specs below). I will
rebuild it with debugging enabled (how did I manage to get DEBUGGING
defined yet 'optimize=-O2?' set?) and see what I can find out...

John

---

Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
Platform:
osname=linux, osvers=2.6.18, archname=i586-linux-thread-multi
uname='linux eisler 2.6.18 #1 smp tue nov 21 12:59:21 utc 2006 i686
athlon i386 gnulinux '
config_args='-ds -e -Dprefix=/usr -Dvendorprefix=/usr
-Dinstallusrbinperl -Dusethreads -Di_db -Di_dbm -Di_ndbm -Di_gdbm
-Duseshrplib=true -Doptimize=-O2 -march=i586 -mtune=i686
-fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -g -Wall -pipe'
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef useithreads=define
usemultiplicity=define
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS
-DDEBUGGING -fno-strict-aliasing -pipe -Wdeclaration-after-statement
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O2 -march=i586 -mtune=i686 -fmessage-length=0 -Wall
-D_FORTIFY_SOURCE=2 -g -Wall -pipe',
cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS
-DDEBUGGING -fno-strict-aliasing -pipe -Wdeclaration-after-statement'
ccversion='', gccversion='4.1.2 20061115 (prerelease) (SUSE
Linux)', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=4, prototype=define
Linker and Libraries:
ld='cc', ldflags =''
libpth=/lib /usr/lib /usr/local/lib
libs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
libc=/lib/libc-2.5.so, so=so, useshrplib=true, libperl=libperl.so
gnulibc_version='2.5'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E
-Wl,-rpath,/usr/lib/perl5/5.8.8/i586-linux-thread-multi/CORE'
cccdlflags='-fPIC', lddlflags='-shared'


Characteristics of this binary (from libperl):
Compile-time options: DEBUGGING MULTIPLICITY PERL_IMPLICIT_CONTEXT
PERL_MALLOC_WRAP THREADS_HAVE_PIDS USE_ITHREADS
USE_LARGE_FILES USE_PERLIO USE_REENTRANT_API
Built under linux
Compiled at Nov 25 2006 11:32:18
@INC:
/usr/lib/perl5/5.8.8/i586-linux-thread-multi
/usr/lib/perl5/5.8.8
/usr/lib/perl5/site_perl/5.8.8/i586-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.8
/usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.8/i586-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.8
/usr/lib/perl5/vendor_perl
.

H.Merijn Brand

unread,
Feb 6, 2008, 9:40:20 AM2/6/08
to John Peacock, Rafael Garcia-Suarez, Andreas J. Koenig, Perl5 Porters
On Wed, 06 Feb 2008 09:25:53 -0500, John Peacock
<john.p...@havurah-software.org> wrote:

> H.Merijn Brand wrote:
> > The machine where I originally hit the problem was using 5.8.8-dor-64all
>
> Thanks! I can recreate with a stock 5.8.8 (specs below). I will
> rebuild it with debugging enabled (how did I manage to get DEBUGGING
> defined yet 'optimize=-O2?' set?) and see what I can find out...
>

less INSTALL

Here are the DEBUGGING modes:

−DDEBUGGING
−DEBUGGING
−DEBUGGING=both
Sets both −DDEBUGGING in the ccflags, and adds −g to optimize.

You can actually specify −g and −DDEBUGGING independently (see
below), but usually it’s convenient to have both.

−DEBUGGING=−g
−Doptimize=−g
Adds −g to optimize, but does not set −DDEBUGGING.

(Note: Your system may actually require something like cc −g2.
Check your man pages for cc(1) and also any hint file for your
system.)

−DEBUGGING=none
−UDEBUGGING
Removes −g from optimize, and −DDEBUGGING from ccflags.

John Peacock

unread,
Feb 6, 2008, 9:46:15 AM2/6/08
to H.Merijn Brand, Rafael Garcia-Suarez, Andreas J. Koenig, Perl5 Porters
H.Merijn Brand wrote:
> On Wed, 06 Feb 2008 09:25:53 -0500, John Peacock
>> rebuild it with debugging enabled (how did I manage to get DEBUGGING
>> defined yet 'optimize=-O2?' set?) and see what I can find out...
>>
>
> less INSTALL
>
> Here are the DEBUGGING modes:
>

Actually, I know that. What I was getting at was why I didn't build a
Perl with both, since I do have an XS module that I support which does
deep magic (hint, it is possibly the root of this bug ;-), where being
able to load it up in gdb is vital...

John

Andreas J. Koenig

unread,
Feb 6, 2008, 4:20:43 PM2/6/08
to H.Merijn Brand, Rafael Garcia-Suarez, John Peacock, Andreas J. Koenig, Perl5 Porters
>>>>> On Wed, 6 Feb 2008 14:59:34 +0100, "H.Merijn Brand" <h.m....@xs4all.nl> said:

> The machine where I originally hit the problem was using 5.8.8-dor-64all

Sorry I did not provide build info because elsewhere in this thread it
had already been said that it is a problem with 5.8, not 5.10. I
produced today's stacktrace with a perl@27512 which was short after
perl 5.8.8. Frank produced his SEGV with stock 5.8.8.

This is my perl -V:

% /home/src/perl/repoperls/installed-perls/maint-5.8/pIS17Oa/perl-5.8.0@27512/bin/perl -V

Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
Platform:

osname=linux, osvers=2.6.14, archname=i686-linux-64int
uname='linux k75 2.6.14 #1 fri jan 27 16:22:47 cet 2006 i686 gnulinux '
config_args='-Dprefix=/home/src/perl/repoperls/installed-perls/maint-5.8/pIS17Oa/perl-5.8.0@27512 -Dinstallusrbinperl=n -Uversiononly -Doptimize=-g -des -Duse64bitint -Dusedevel'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=define use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-DDEBUGGING -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-g',
cppflags='-DDEBUGGING -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include'
ccversion='', gccversion='4.0.3 20060304 (prerelease) (Debian 4.0.2-10)', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8


alignbytes=4, prototype=define
Linker and Libraries:

ld='cc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
libc=/lib/libc-2.3.6.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version='2.3.6'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'


Characteristics of this binary (from libperl):

Compile-time options: DEBUGGING PERL_MALLOC_WRAP USE_64_BIT_INT
USE_LARGE_FILES USE_PERLIO
Locally applied patches:
MAINT27284
Built under linux
Compiled at Mar 21 2006 08:16:42
@INC:
/home/src/perl/repoperls/installed-perls/maint-5.8/pIS17Oa/perl-5.8.0@27512/lib/5.8.8/i686-linux-64int
/home/src/perl/repoperls/installed-perls/maint-5.8/pIS17Oa/perl-5.8.0@27512/lib/5.8.8
/home/src/perl/repoperls/installed-perls/maint-5.8/pIS17Oa/perl-5.8.0@27512/lib/site_perl/5.8.8/i686-linux-64int
/home/src/perl/repoperls/installed-perls/maint-5.8/pIS17Oa/perl-5.8.0@27512/lib/site_perl/5.8.8
/home/src/perl/repoperls/installed-perls/maint-5.8/pIS17Oa/perl-5.8.0@27512/lib/site_perl
.


--
andreas

John Peacock

unread,
Feb 6, 2008, 8:15:54 PM2/6/08
to H.Merijn Brand, Rafael Garcia-Suarez, Andreas J. Koenig, Perl5 Porters
H.Merijn Brand wrote:
>
> The machine where I originally hit the problem was using 5.8.8-dor-64all
>

What version of version.pm do you have installed? I'm suddenly not able
to reproduce the failure after I wound up reinstalling version-0.74...

John

p.s. Andreas, this question is for you as well...

John Peacock

unread,
Feb 6, 2008, 9:56:59 PM2/6/08
to H.Merijn Brand, Rafael Garcia-Suarez, Andreas J. Koenig, Perl5 Porters
John Peacock wrote:
> What version of version.pm do you have installed? I'm suddenly not able
> to reproduce the failure after I wound up reinstalling version-0.74...
>
> John
>
> p.s. Andreas, this question is for you as well...

Never mind, I have a debugging Perl that fails now. Still working it...

John

John Peacock

unread,
Feb 6, 2008, 10:24:32 PM2/6/08
to H.Merijn Brand, Rafael Garcia-Suarez, Andreas J. Koenig, Perl5 Porters

OK, here's the deal:

Safe-2.14 includes the following block in the default_share hash:

&version::()
&version::new
&version::(""
&version::stringify
&version::(0+
&version::numify
&version::normal
&version::(cmp
&version::(<=>
&version::vcmp
&version::(bool
&version::boolean
&version::(nomethod
&version::noop
&version::is_alpha
&version::qv

but those methods are hidden inside of

($] >= 5.010 && qw[

in Safe-2.15 (which is in maint-5.8).

If I delete all of the &version* stuff from 2.14, I no longer get a
SIGSEGV. Rafael should just release 2.15 (as it currently exists in
maint-5.8) and all will be right with world again.

John

H.Merijn Brand

unread,
Feb 7, 2008, 2:25:19 AM2/7/08
to John Peacock, Rafael Garcia-Suarez, Andreas J. Koenig, Perl5 Porters
On Wed, 06 Feb 2008 20:15:54 -0500, John Peacock
<john.p...@havurah-software.org> wrote:

> H.Merijn Brand wrote:
> >
> > The machine where I originally hit the problem was using 5.8.8-dor-64all
> >
>
> What version of version.pm do you have installed? I'm suddenly not able
> to reproduce the failure after I wound up reinstalling version-0.74...

$ perl -MV=version
version
/pro/lib/perl5/site_perl/5.8.8/x86_64-linux/version.pm: 0.74

Rafael Garcia-Suarez

unread,
Feb 7, 2008, 4:29:09 AM2/7/08
to John Peacock, H.Merijn Brand, Andreas J. Koenig, Perl5 Porters

Nicholas Clark

unread,
Feb 7, 2008, 5:30:08 AM2/7/08
to John Peacock, H.Merijn Brand, Rafael Garcia-Suarez, Andreas J. Koenig, Perl5 Porters

Um, but those routines aren't in universal.c
So why are they "Safe" to trust?

Nicholas Clark

Nicholas Clark

unread,
Feb 7, 2008, 5:46:08 AM2/7/08
to John Peacock, H.Merijn Brand, Rafael Garcia-Suarez, Andreas J. Koenig, Perl5 Porters

Oh, I'm confused. You're saying that they shouldn't be in the default_share
for any version of perl running Safe?

Nicholas Clark

John Peacock

unread,
Feb 7, 2008, 7:01:17 AM2/7/08
to John Peacock, H.Merijn Brand, Rafael Garcia-Suarez, Andreas J. Koenig, Perl5 Porters
Nicholas Clark wrote:
>> Um, but those routines aren't in universal.c
>> So why are they "Safe" to trust?
>
> Oh, I'm confused. You're saying that they shouldn't be in the default_share
> for any version of perl running Safe?

They aren't in universal.c (or in this case util.c) until 5.10.0, so trusting
them before 5.10.0 is what caused the problem (and why the tests didn't fail
with 5.10.0 or bleadperl). It isn't even sufficient to load version.pm first.

John

Reply all
Reply to author
Forward
0 new messages