Mailing List Archive

Core dump with 5.002: use/eval/use/$@
use lib "lib";
$lib = "Net::Ping";
eval "use $lib;";
die $@ if $@;
print "Still living\n";

prints "Still living\n" and then dumps core on both irix and
linux. This happens with some modules only (random tries below)

Dumping core Not dumping core
CGI::Base File::Copy
URI::Escape File::Find
URI::URL Socket
Net::Ping SDBM_File

(dbx) where
> 0 sv_clean_objs() ["/usr/sources/perl/perl/perl5.002beta1a.deb/sv.c":200, 0x478b70]
1 perl_destruct(sv_interp = 0x10017008) ["/usr/sources/perl/perl/perl5.002beta1a.deb/perl.c":167, 0x41122c]
2 main(argc = 2, argv = 0x7fffaf14, env = 0x7fffaf20) ["/usr/sources/perl/perl/perl5.002beta1a.deb/perlmain.c":65, 0x410d04]
3 __start() ["crt1text.s":133, 0x410b1c]


regards
andreas
Re: Core dump with 5.002: use/eval/use/$@ [ In reply to ]
On Sat, 25 Nov 1995 02:58:25 +0100, Andreas Koenig wrote:
>
> use lib "lib";
> $lib = "Net::Ping";
> eval "use $lib;";
> die $@ if $@;
> print "Still living\n";
>
>prints "Still living\n" and then dumps core on both irix and
>linux.

Here's a contraction that dumps core on both Linux 1.2.13 and
SunOS 4.1.3:

eval "use Bug qw(AA)";
__END__
Segmentation fault

where Bug.pm contains:

package Bug;
require Exporter;
require DynaLoader;
@ISA = qw(Exporter DynaLoader);
@EXPORT = qw(
A1 B1 C1 D1 E1 F1 G1 H1 I1 J1 K1 L1 M1 N1 O1 P1 Q1 R1 S1 T1 U1 V1
W1 X1 Y1 Z1 A2 B2 C2 D2 E2 F2 G2 H2 I2 J2 K2 L2 M2 N2 O2 P2 Q2 R2
S2 T2 U2 V2 W2 X2 Y2 Z2 A3 B3 C3 D3 E3 F3 G3 H3 I3 J3 K3 L3 M3 N3
O3 P3 Q3 R3 S3 T3 U3 V3 W3 X3 Y3 Z3 AA );
1;

I don't have a DEBUGGING perl handy, so can't look farther than that.

- Sarathy.
gsar@engin.umich.edu