home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / perl / 8020 < prev    next >
Encoding:
Internet Message Format  |  1993-01-28  |  2.7 KB

  1. Path: sparky!uunet!glasgow!ram
  2. From: ram@eiffel.com (Raphael Manfredi)
  3. Newsgroups: comp.lang.perl
  4. Subject: A simple test for perl 5.0
  5. Summary: Bug report for perl 4.0 PL35
  6. Keywords: bug
  7. Message-ID: <42@glasgow.eiffel.com>
  8. Date: 27 Jan 93 02:25:29 GMT
  9. Organization: Interactive Software Engineering, Santa Barbara CA
  10. Lines: 72
  11.  
  12. Larry,
  13.  
  14. Please make sure the following does not dump core with perl 5.0 :-) :-)
  15.  
  16. --------------------------
  17. &verify('a', 'b', 'c');
  18.  
  19. sub verify {
  20.     local($a, $b, $c) = @_;
  21.     local($deplist);
  22.     local($dummy);
  23.     print "In verify\n";
  24.     ($deplist, $dummy) = &explore($a, $b, $c);
  25. }
  26.  
  27. sub explore {
  28.     local($x, $y, $z) = @_;
  29.     print "Calling verify\n";
  30.     &verify($x, $y, $z);
  31. }
  32. --------------------------
  33.  
  34. With perl 4.0 PL35 on my MIPS, I get:
  35.  
  36. In verify
  37. Calling verify
  38. Memory fault - core dumped
  39.  
  40. Which is peculiar... Removing one of the 'local' declarations in 'verify'
  41. on simply avoiding assignment of &explore() into an array makes the
  42. program loop indefinitely, as expected.
  43.  
  44. Running this program under the debugger produces the expected results.
  45.  
  46. Here is the dbx stack:
  47.  
  48. dbx version 2.11
  49. Copyright 1988, 1989 MIPS Computer Systems Inc.
  50. Type 'help' for help.
  51. Corefile produced from file "perl"
  52. Child died at pc 0x4039cc of signal : Segmentation fault
  53. reading symbolic information ...
  54. [using memory image in core]
  55. (dbx) where
  56. >  0 savelist(sarg = 0x100236b4, maxsarg = 1) ["cmd.c":1163, 0x4039c8]
  57.    1 do_subr(0x1, 0x7fff982c, 0x44b6a0, 0x0, 0x10023f68) ["doarg.c":1156, 0x40f848]
  58.    2 eval.eval(0x1, 0x5, 0x3, 0x0, 0x0) ["eval.c":1283, 0x426070]
  59.    3 cmd_exec(cmdparm = 0x10028a3c, gimme = 1, sp = 1) ["cmd.c":657, 0x4026f0]
  60.    4 do_subr(0x1, 0x7fff9a44, 0x40360c, 0x0, 0x403628) ["doarg.c":1158, 0x40f864]
  61.    5 eval.eval(0x1, 0x5, 0xffffffba, 0xd, 0x43b0b8) ["eval.c":1283, 0x426070]
  62.    6 eval.eval(0x0, 0x1, 0x3, 0x0, 0x0) ["eval.c":163, 0x41ffe4]
  63.    7 cmd_exec(cmdparm = 0x10027a94, gimme = 0, sp = -1) ["cmd.c":657, 0x4026f0]
  64.    8 do_subr(0x0, 0x7fff9d54, 0x43b0b8, 0x100032f6, 0x43b0ec) ["doarg.c":1158, 0x40f864]
  65.    9 eval.eval(0x0, 0x3, 0x10023f68, 0x0, 0x0) ["eval.c":1283, 0x426070]
  66.   10 cmd_exec(cmdparm = 0x10027144, gimme = 0, sp = -1) ["cmd.c":657, 0x4026f0]
  67.   11 .block5 ["perl.c":890, 0x43054c]
  68.   12 main(argc = 0, argv = 0x7fff9f0c, env = 0x7fff9f10) ["perl.c":890, 0x43054c]
  69. (dbx) quit
  70.  
  71. I think someone else reported a similar problem a long time ago. Everyone
  72. had laughed at him (myself included, in a private mail), telling him to get
  73. rid of the infinite recursion... However, this seems to be a serious problem.
  74. -- 
  75. Raphael Manfredi <ram@eiffel.com>
  76. Interactive Software Engineering Inc.
  77. 270 Storke Road, Suite #7                      / Tel +1 (805) 685-1006 \
  78. Goleta, California 93117, USA                  \ Fax +1 (805) 685-6869 /
  79.