Bug 122378
Summary: | Perl SEGV's while running "make test" for perl module Crypt::Random | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 3 | Reporter: | Sam Kimery <sam.kimery> |
Component: | perl | Assignee: | Jason Vas Dias <jvdias> |
Status: | CLOSED ERRATA | QA Contact: | |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 3.0 | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i686 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | RHBA-2006-0294 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2006-05-10 21:56:29 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 187539 |
Description
Sam Kimery
2004-05-03 20:49:40 UTC
Also dies on FreeBSD 4.8 with Perl 5.8.3 during 'make install': Running make test PERL_DL_NONLAZY=1 /usr/local/bin/perl "-MExtUtils::Command::MM" "- e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/generator..........^C /usr/bin/make test -- NOT OK Sorry for the delay in processing this bug. With the latest perl-5.8.0-90.2, the Crypt::Random tests no longer cause perl to dump core. But all the tests which use the 'Crypt::Random::Provider::devurandom' module fail - this is because the Class::Loader module fails to load any module in a subdirectory of a module directory when UTF-8 is enabled. Yes, that's right : UTF-8 !! WORKAROUND: run your cpan installs with : # LC_ALL=C perl -MCPAN -e shell This problem is demonstrated by this simple test module, which consists of modules pm::p, and pm::p::pm : --- file pm/p.pm : #!/usr/bin/perl package pm::p; use Class::Loader; $VERSION = 0.1; sub new { bless {}; } sub f { my $loader = new Class::Loader; my $po = $loader->_load ( Module => "pm::p::pm" ) || die("Unable to load pm:p:pm $!: $?"); print $po->f, "\n"; } 1; --- file pm/p/pm.pm : #!/usr/bin/perl package pm::p::pm; sub new { bless {}; } sub f { return "OK"; } 1; --- Here's what happens with perl-5.8.0x and Class-Loader-2.0.3 : $ perl -I. -e 'use pm::p; pm::p::f();' Unable to load pm::p::pm : 0 at pm/p.pm line 11 $ LC_ALL=C perl -I. -e 'use pm::p; pm::p::f();' OK Interestingly, this problem is circumenvented by using Class::Loader to load pm::p: $ perl -I. -e 'use Class::Loader; $l = new Class::Loader; $pm = $l->_load(Module=>"pm::p") || die ("Unable to load pm::p: $? $! $@"); $pm->f(),"\n";' OK I am investigating this - short of backporting 5.8.7's UTF implementation (which effectively means upgrading perl in RHEL-3 to 5.8.7) I'm not sure how to fix yet - this could take some time. This bug is now finally fixed with perl-5.8.0-92.0 . The problem goes beyond the original bug report : --- $ cat t.pm #!/usr/bin/perl package t; sub f { my %a = @_; for (keys %a){ ${lc($_)} = $a{$_}; print lc($_),' = ',$a{$_},"\n"}; print "v: $v\n"; } return 1; $ $ perl -Mutf8 -I. -e 'use t; t::f(v=>1);' v = 1 v: $ perl -I. -e 'use t; t::f(v=>1);' v = 1 v: 1 --- The problem does not occur if you do not use lc($_), but just $_. This is because utf8's swash_init() function incorrectly changed the active namespace without restoring it, so that in the example above, "$::v" was set to 1, not "$t::v" . This problem is now fixed with perl-5.8.0-92.0, shortly available from: http://people.redhat.com/~jvdias/perl/RHEL-3 perl-5.8.0-92.0, is now available from: http://people.redhat.com/~jvdias/perl/RHEL-3 With this version, the install of Crypt::Random and all module dependencies (Class::Loader, Math::Pari) complete successfully. An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2006-0294.html |