Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* 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

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