Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!spool.mu.edu!mips!sdd.hp.com!wuarchive!uunet!stanford.edu!leland.Stanford.EDU!elaine16.Stanford.EDU!cwitty From: cwitty@cs.Stanford.EDU (Carl Witty) Newsgroups: comp.lang.perl Subject: Perl 4.010 crashes (two bugs) Message-ID: Date: 13 Jun 91 09:12:42 GMT Article-I.D.: elaine16.cwitty.676804362 Sender: news@leland.Stanford.EDU (Mr News) Organization: AIR, Stanford University Lines: 40 I mailed these bug reports to Larry, but they must have fallen between the cracks. SunOS 4.1.1, Perl 4.010, Sparcstation 1 uname -a output: SunOS elaine16. 4.1.1 1 sun4c 1) The manual seems to imply that the following two lines are equivalent: if {1;} {2;} if (do {1;}) {2;} However, the second executes fine, but the first segmentation faults. 2) This comment from stab.c yearns toward a state of affairs that doesn't actually exist: /* hopefully this is only called on local symbol table entries */ Here is a program that segmentation faults because stab_clear() is called on a non-local symbol table entry. (As a workaround, I took out the "local" declaration for the symbol table entries in my program.) ---- cut here ---- #!/afs/ir/@sys/local/bin/perl { local(*c); %foo = (); *c = *foo; } $foo = ' ' x 3; ---- cut here ---- Carl Witty cwitty@cs.stanford.edu