From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10259a,7af6bdd3271f45bf,start X-Google-Attributes: gid10259a,public X-Google-Thread: fee84,7af6bdd3271f45bf,start X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-04-15 08:43:33 PST Xref: gmd.de comp.lang.perl:18252 comp.unix.osf.osf1:2893 Newsgroups: comp.lang.perl,comp.unix.osf.osf1 Path: gmd.de!nntp.gmd.de!urmel.informatik.rwth-aachen.de!newsserver.rrzn.uni-hannover.de!hrz-ws11.hrz.uni-kassel.de!news.th-darmstadt.de!fauern!xlink.net!howland.reston.ans.net!europa.eng.gtefsd.com!MathWorks.Com!news.kei.com!ub!acsu.buffalo.edu!albali.cs.buffalo.edu!ajay From: ajay@albali.cs.buffalo.edu (Ajay Shekhawat) Subject: Perl gives SegFault on DEC Alpha. Message-ID: Originator: ajay@albali.cs.buffalo.edu Sender: ajay@albali.cs.buffalo.edu Nntp-Posting-Host: albali.cs.buffalo.edu Reply-To: ajay@albali.cs.buffalo.edu (Ajay Shekhawat) Organization: Department of Computer Science Posting-Software: pnews (version 1.4) Distribution: na Date: Fri, 15 Apr 1994 15:43:33 GMT 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 ---snip--- #!/usr/local/bin/perl $Usage = "Usage: $0 [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 () { 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 () { unlink if (/${bc_code}/) ; } unlink $temp, $dictionary, $temp_image;