* Perl gives SegFault on DEC Alpha.
@ 1994-04-15 15:43 Ajay Shekhawat
1994-04-16 4:32 ` Mike Iglesias
0 siblings, 1 reply; 2+ messages in thread
From: Ajay Shekhawat @ 1994-04-15 15:43 UTC (permalink / 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;
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: Perl gives SegFault on DEC Alpha. 1994-04-15 15:43 Perl gives SegFault on DEC Alpha Ajay Shekhawat @ 1994-04-16 4:32 ` Mike Iglesias 0 siblings, 0 replies; 2+ messages in thread From: Mike Iglesias @ 1994-04-16 4:32 UTC (permalink / raw) Make sure the enclosed patch is in your copy of the sources. There are a couple more patches floating around that probably should be in there as well, but I can't find my copies of them. Maybe we should get the patches together and put them on one of the Alpha archives? -- Mike Iglesias Internet: iglesias@draco.acs.uci.edu University of California, Irvine phone: (714) 856-6926 Office of Academic Computing FAX: (714) 725-2069 Distributed Computing Support *** toke.c.pl36 Wed Mar 3 16:00:50 1993 --- toke.c Wed Mar 3 18:25:44 1993 *************** *** 1749,1765 **** arg->arg_type = O_ITEM; arg[1].arg_type = A_DOUBLE; arg[1].arg_ptr.arg_str = str_smake(str); ! d = scanident(d,bufend,buf); (void)stabent(buf,TRUE); /* make sure it's created */ for (; d < e; d++) { if (*d == '\\') d++; else if (*d == '$' && d[1] && d[1] != '|' && d[1] != ')') { ! d = scanident(d,bufend,buf); (void)stabent(buf,TRUE); } else if (*d == '@') { ! d = scanident(d,bufend,buf); if (strEQ(buf,"ARGV") || strEQ(buf,"ENV") || strEQ(buf,"SIG") || strEQ(buf,"INC")) (void)stabent(buf,TRUE); --- 1749,1765 ---- arg->arg_type = O_ITEM; arg[1].arg_type = A_DOUBLE; arg[1].arg_ptr.arg_str = str_smake(str); ! d = scanident(d,e,buf); (void)stabent(buf,TRUE); /* make sure it's created */ for (; d < e; d++) { if (*d == '\\') d++; else if (*d == '$' && d[1] && d[1] != '|' && d[1] != ')') { ! d = scanident(d,e,buf); (void)stabent(buf,TRUE); } else if (*d == '@') { ! d = scanident(d,e,buf); if (strEQ(buf,"ARGV") || strEQ(buf,"ENV") || strEQ(buf,"SIG") || strEQ(buf,"INC")) (void)stabent(buf,TRUE); ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1994-04-16 4:32 UTC | newest] Thread overview: 2+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 1994-04-15 15:43 Perl gives SegFault on DEC Alpha Ajay Shekhawat 1994-04-16 4:32 ` Mike Iglesias
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox