Skip Menu |

This queue is for tickets about the IO-Compress-Zlib CPAN distribution.

Report information
The Basics
Id: 39110
Status: resolved
Priority: 0/
Queue: IO-Compress-Zlib

People
Owner: Nobody in particular
Requestors: avar [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.008
Fixed in: (no value)



Subject: IO::Uncompress::RawInflate::mkUncomp doesn't check whether $got is an object before calling methods on it
Catching error: 'Can\'t call method "value" on an undefined value at /usr/local/lib/perl5/5.10.0/x86_64-linux/IO/Uncompress/RawInflate.pm line 64 Regardless of whether this actually happens the routine in question should check whether $got is an object before calling object methods on it. Here's a full backtrace anyway, probably due to mismatch in zlib versions since the routine is passed two params but seems to expect three: IO::Uncompress::RawInflate::mkUncomp(/usr/local/lib/perl5/5.10.0/x86_64-linux/IO/Uncompress/RawInflate.pm:60): 60: my $self = shift ; DB<4> n IO::Uncompress::RawInflate::mkUncomp(/usr/local/lib/perl5/5.10.0/x86_64-linux/IO/Uncompress/RawInflate.pm:61): 61: my $class = shift ; DB<4> n IO::Uncompress::RawInflate::mkUncomp(/usr/local/lib/perl5/5.10.0/x86_64-linux/IO/Uncompress/RawInflate.pm:62): 62: my $got = shift ; DB<4> n IO::Uncompress::RawInflate::mkUncomp(/usr/local/lib/perl5/5.10.0/x86_64-linux/IO/Uncompress/RawInflate.pm:64): 64: my ($obj, $errstr, $errno) = IO::Uncompress::Adapter::Inflate::mkUncompObject( 65: $got->value('CRC32'), 66: $got->value('ADLER32'), 67: $got->value('Scan'), 68: ); DB<4> x $got 0 undef DB<5> T $ = IO::Uncompress::RawInflate::mkUncomp(ref(IO::Uncompress::Gunzip), ref(IO::Compress::Base::Parameters)) called from file `/usr/local/lib/perl5/5.10.0/x86_64-linux/IO/Uncompress/Base.pm' line 471 $ = IO::Uncompress::Base::_create(ref(IO::Uncompress::Gunzip), undef, 0, '/home/hinrik/.cpan/sources/authors/01mailrc.txt.gz', 'Transparent', 1, 'Append', 0, 'AutoClose', 1, 'MultiStream', 1, 'Strict', 0) called from file `/usr/local/lib/perl5/5.10.0/x86_64-linux/IO/Uncompress/Gunzip.pm' line 39 $ = IO::Uncompress::Gunzip::new('IO::Uncompress::Gunzip', '/home/hinrik/.cpan/sources/authors/01mailrc.txt.gz', 'Transparent', 1, 'Append', 0, 'AutoClose', 1, 'MultiStream', 1, 'Strict', 0) called from file `/usr/local/lib/perl5/5.10.0/x86_64-linux/Compress/Zlib.pm' line 142 $ = Compress::Zlib::gzopen('/home/hinrik/.cpan/sources/authors/01mailrc.txt.gz', 'rb') called from file `/usr/local/lib/perl5/5.10.0/CPAN/Tarzip.pm' line 103 $ = CPAN::Tarzip::gtest(ref(CPAN::Tarzip)) called from file `/usr/local/lib/perl5/5.10.0/CPAN/Tarzip.pm' line 132 $ = CPAN::Tarzip::TIEHANDLE('CPAN::Tarzip', '/home/hinrik/.cpan/sources/authors/01mailrc.txt.gz') called from file `/usr/local/lib/perl5/5.10.0/CPAN.pm' line 5047 . = CPAN::Index::rd_authindex('CPAN::Index', '/home/hinrik/.cpan/sources/authors/01mailrc.txt.gz') called from file `/usr/local/lib/perl5/5.10.0/CPAN.pm' line 4881 . = CPAN::Index::reload('CPAN::Index') called from file `/usr/local/lib/perl5/5.10.0/CPAN.pm' line 1219 $ = CPAN::exists(ref(CPAN), 'CPAN::Module', 'CPAN') called from file `/usr/local/lib/perl5/5.10.0/CPAN.pm' line 2855 $ = CPAN::Shell::expandany('CPAN::Shell', 'CPAN') called from file `/usr/local/lib/perl5/5.10.0/CPAN.pm' line 3248 . = CPAN::Shell::rematein('CPAN::Shell', 'install', 'CPAN') called from file `/usr/local/lib/perl5/5.10.0/CPAN.pm' line 3535 . = CPAN::Shell::__ANON__[/usr/local/lib/perl5/5.10.0/CPAN.pm:3535]('CPAN::Shell', 'CPAN') called from file `/usr/local/lib/perl5/5.10.0/CPAN.pm' line 274 . = eval {...} called from file `/usr/local/lib/perl5/5.10.0/CPAN.pm' line 274 . = CPAN::shell() called from -e line 1 DB<5>
Hi I'm not sure how you've got the error you did, so can you run the enclosed script and post the results please? cheers Paul
my @modules = qw( File::GlobMapper IO::Compress::Base IO::Compress::Base::Common IO::Uncompress::Base Compress::Raw::Zlib Compress::Raw::Bzip2 IO::Compress::RawDeflate IO::Uncompress::RawInflate IO::Compress::Deflate IO::Uncompress::Inflate IO::Compress::Gzip IO::Compress::Gzip::Constants IO::Uncompress::Gunzip IO::Compress::Zip IO::Uncompress::Unzip IO::Compress::Bzip2 IO::Uncompress::Bunzip2 IO::Compress::Lzf IO::Uncompress::UnLzf IO::Compress::Lzop IO::Uncompress::UnLzop Compress::Zlib Compress::LZF Compress::LZO ); my $max = 0; grep { $max = $_ if $_ > $max } map { length $_ } @modules; printf("%-${max}s $]\n", "perl"); my %got = (); for my $name (sort @modules) { printf("%-${max}s ", $name); eval "require $name;"; if ($@ eq '') { my $version = ${ $name . "::VERSION" }; print "$version" . libVer($name, $version) . "\n"; $got{$name} ++; } else { print "Not Present\n"; } } print "\n"; sub libVer { my $module = shift; my $version = shift; my $got = ''; if ($module eq 'Compress::Raw::Zlib') { $got .= " (zlib ver " . Compress::Raw::Zlib::zlib_version(); $got .= sprintf " [0x%x])", Compress::Raw::Zlib::ZLIB_VERNUM(); } if ($module eq 'Compress::Zlib' && $version < 2) { $got .= " (zlib ver " . Compress::Zlib::zlib_version(); $got .= sprintf " [0x%x])", Compress::Zlib::ZLIB_VERNUM(); } elsif ($module eq 'Compress::Raw::Bzip2') { $got = " (bzip2 ver " . Compress::Raw::Bzip2::bzlibversion() . ")"; } return $got; }
On Tue Sep 09 05:36:49 2008, PMQS wrote: Show quoted text
> I'm not sure how you've got the error you did, so can you run the > enclosed script and post the results please?
I'm sorry but I've already fixed the offending system so the output of this script wouldn't be useful to you now, but doubtless it was caused a broken installation. Probably through fault of my own. I hadn't done anything other than compiling perl 5.10, installing it and installing CPAN modules however so I don't see why it should have broken. But inserting aforementioned object check might not be useful to a general module release.
On Tue Sep 09 06:18:30 2008, AVAR wrote: Show quoted text
> On Tue Sep 09 05:36:49 2008, PMQS wrote:
> > I'm not sure how you've got the error you did, so can you run the > > enclosed script and post the results please?
> > I'm sorry but I've already fixed the offending system so the output of > this script wouldn't be useful to you now, but doubtless it was
caused a Show quoted text
> broken installation. Probably through fault of my own. > > I hadn't done anything other than compiling perl 5.10, installing it
and Show quoted text
> installing CPAN modules however so I don't see why it should have > broken. But inserting aforementioned object check might not be useful
to Show quoted text
> a general module release.
No worries - I've just figured out how to reproduce the error myself. Paul
On Tue Sep 09 08:04:36 2008, PMQS wrote: Show quoted text
> On Tue Sep 09 06:18:30 2008, AVAR wrote:
> > I hadn't done anything other than compiling perl 5.10, installing > > it and > > installing CPAN modules however so I don't see why it should have > > broken. But inserting aforementioned object check might not be > > useful to > > a general module release.
> > No worries - I've just figured out how to reproduce the error myself.
Can you please fix this bug? When you upgrade the IO::Uncompress module, it breaks CPAN. For "normal" people a very difficult circumstance to fix. This may also be a bug of CPAN....
Fixed in the new IO-Compress 2.017 distribution.