From: ajay@albali.cs.buffalo.edu (Ajay Shekhawat)
Subject: Perl gives SegFault on DEC Alpha.
Date: Fri, 15 Apr 1994 15:43:33 GMT [thread overview]
Message-ID: <CoB50M.ICD@acsu.buffalo.edu> (raw)
I have a small (69 lines) perl script which causes a seg-fault in Perl
on a DEC Alpha. The same script also bombs on the public DEC machine
(axposf.pa.dec.com). Gdb says that the problem is in hash.c:
0x12005d898 in hfetch () at hash.c:76
hash.c:76: No such file or directory.
Can someone clue me in as to what's the problem? The script is attached
below.
Also, where can I get the latest Alpha port of Perl? (couldn't find this
in the FAQs).
Thanks!
Ajay
<Clueless in Buffalo>
---snip---
#!/usr/local/bin/perl
$Usage = "Usage: $0 <base directory> <image name> <ZIP> [ZIP ZIP ZIP...]\n";
die $Usage unless ($#ARGV >= 2);
$image_name = $ARGV[0];
while ($zip = shift) {
$zips .= " $zip";
}
if (!defined($image_name) || !defined($dir) || !defined($zips)) {
die $Usage;
}
die "\"$image_name\" not found or is empty!!\n" unless -s "$image_name";
$dir = "$dir/Code";
$snorm = "$dir/bin/snorm" ;
$create_cities = "$dir/scripts/get_city_list";
$templates = "$dir/bin/HGR_Data/t_40k_c8";
$bc_code = $$ ;
$hgr_dir = "$dir/bin";
$mesg_favata = "/tmp/Favata.err.$bc_code";
$output_favata = "$image_name.results" ;
$lex = "/tmp/cities.$bc_code";
$temp_image = "/tmp/temp_image.$bc_code";
$| = 1;
##----------------------------------------------------------------------------
print STDERR "Creating lexicon...\n";
open(LEX, "$create_cities $dir/scripts $zips | sort -u |") ||
die "Unable to spawn process to create lexicon: $!\n";
open(LEXOUT,"| sort -u > $lex") ||
die "Unable to write to lexicon file: $!\n";
$count = 0;
# Create table of lexicon entries.
# Strip out spaces from multi-word city names.
while (<LEX>) {
chop;
$count++;
$city = $_;
if (/ /) {
$stripped = $city;
$stripped =~ s/ //g;
$myindex{$stripped} = $count;
print LEXOUT "$stripped\n";
} else {
print LEXOUT "$city\n";
}
$myindex{$city} = $count;
$table[$count] = $city;
}
close(LEX);
close(LEXOUT);
#----------------------------------------------------------------------------
#$lexsize = (stat($lex))[7];
$lexsize = $count;
if ($lexsize == 0) {
print "0.00 REJECT\n";
goto boink;
}
boink:
while (</tmp/*>) { unlink if (/${bc_code}/) ; }
unlink $temp, $dictionary, $temp_image;
next reply other threads:[~1994-04-15 15:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1994-04-15 15:43 Ajay Shekhawat [this message]
1994-04-16 4:32 ` Perl gives SegFault on DEC Alpha Mike Iglesias
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox