home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!glasgow!ram
- From: ram@eiffel.com (Raphael Manfredi)
- Newsgroups: comp.lang.perl
- Subject: A simple test for perl 5.0
- Summary: Bug report for perl 4.0 PL35
- Keywords: bug
- Message-ID: <42@glasgow.eiffel.com>
- Date: 27 Jan 93 02:25:29 GMT
- Organization: Interactive Software Engineering, Santa Barbara CA
- Lines: 72
-
- Larry,
-
- Please make sure the following does not dump core with perl 5.0 :-) :-)
-
- --------------------------
- &verify('a', 'b', 'c');
-
- sub verify {
- local($a, $b, $c) = @_;
- local($deplist);
- local($dummy);
- print "In verify\n";
- ($deplist, $dummy) = &explore($a, $b, $c);
- }
-
- sub explore {
- local($x, $y, $z) = @_;
- print "Calling verify\n";
- &verify($x, $y, $z);
- }
- --------------------------
-
- With perl 4.0 PL35 on my MIPS, I get:
-
- In verify
- Calling verify
- Memory fault - core dumped
-
- Which is peculiar... Removing one of the 'local' declarations in 'verify'
- on simply avoiding assignment of &explore() into an array makes the
- program loop indefinitely, as expected.
-
- Running this program under the debugger produces the expected results.
-
- Here is the dbx stack:
-
- dbx version 2.11
- Copyright 1988, 1989 MIPS Computer Systems Inc.
- Type 'help' for help.
- Corefile produced from file "perl"
- Child died at pc 0x4039cc of signal : Segmentation fault
- reading symbolic information ...
- [using memory image in core]
- (dbx) where
- > 0 savelist(sarg = 0x100236b4, maxsarg = 1) ["cmd.c":1163, 0x4039c8]
- 1 do_subr(0x1, 0x7fff982c, 0x44b6a0, 0x0, 0x10023f68) ["doarg.c":1156, 0x40f848]
- 2 eval.eval(0x1, 0x5, 0x3, 0x0, 0x0) ["eval.c":1283, 0x426070]
- 3 cmd_exec(cmdparm = 0x10028a3c, gimme = 1, sp = 1) ["cmd.c":657, 0x4026f0]
- 4 do_subr(0x1, 0x7fff9a44, 0x40360c, 0x0, 0x403628) ["doarg.c":1158, 0x40f864]
- 5 eval.eval(0x1, 0x5, 0xffffffba, 0xd, 0x43b0b8) ["eval.c":1283, 0x426070]
- 6 eval.eval(0x0, 0x1, 0x3, 0x0, 0x0) ["eval.c":163, 0x41ffe4]
- 7 cmd_exec(cmdparm = 0x10027a94, gimme = 0, sp = -1) ["cmd.c":657, 0x4026f0]
- 8 do_subr(0x0, 0x7fff9d54, 0x43b0b8, 0x100032f6, 0x43b0ec) ["doarg.c":1158, 0x40f864]
- 9 eval.eval(0x0, 0x3, 0x10023f68, 0x0, 0x0) ["eval.c":1283, 0x426070]
- 10 cmd_exec(cmdparm = 0x10027144, gimme = 0, sp = -1) ["cmd.c":657, 0x4026f0]
- 11 .block5 ["perl.c":890, 0x43054c]
- 12 main(argc = 0, argv = 0x7fff9f0c, env = 0x7fff9f10) ["perl.c":890, 0x43054c]
- (dbx) quit
-
- I think someone else reported a similar problem a long time ago. Everyone
- had laughed at him (myself included, in a private mail), telling him to get
- rid of the infinite recursion... However, this seems to be a serious problem.
- --
- Raphael Manfredi <ram@eiffel.com>
- Interactive Software Engineering Inc.
- 270 Storke Road, Suite #7 / Tel +1 (805) 685-1006 \
- Goleta, California 93117, USA \ Fax +1 (805) 685-6869 /
-