home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / perl / 5491 < prev    next >
Encoding:
Text File  |  1992-08-25  |  2.1 KB  |  58 lines

  1. Newsgroups: comp.lang.perl
  2. Path: sparky!uunet!stanford.edu!snorkelwacker.mit.edu!bloom-picayune.mit.edu!athena.mit.edu!fabbott
  3. From: fabbott@athena.mit.edu (Freeland K Abbott III)
  4. Subject: Help: SCO_3 aliasing?!
  5. Message-ID: <FABBOTT.92Aug25182403@e40-008-12.mit.edu>
  6. Sender: news@athena.mit.edu (News system)
  7. Nntp-Posting-Host: e40-008-12.mit.edu
  8. Organization: Massachusetts Institute of Technology
  9. Distribution: comp
  10. Date: Tue, 25 Aug 1992 22:24:13 GMT
  11. Lines: 45
  12.  
  13.  
  14. I'm attempting to compile perl 4.019---no, I'm attempting to use it;
  15. it compiled just fine.  I took hints for i386 and sco_3, and used
  16. perl's malloc; the rest was taken from the hints, including "undef"
  17. for $i_varargs.  Without perl's malloc, lots of tests failed; with it,
  18. only lib/big test 61 fails.  But I can't find a better result, using
  19. SCO 3.2 rev4.0....
  20.  
  21. However, I did find one particularly interesting behavior: here's the
  22. code:
  23.  
  24.     local(*x,*y);
  25.     $x = 3;
  26.     print("x=$x, y=$y\n");
  27.     $y = 4;
  28.     print("x=$x, y=$y\n");
  29.     $x[0] = "hi";
  30.     $y[0] = "bye";
  31.     print ("$x[0]\n");
  32.  
  33. produces this output:
  34.     x=3, y=3
  35.     x=4, y=4
  36.     bye
  37.  
  38. Huh?!  Somehow x and y are aliased to be identical...
  39.  
  40. Anyway, what I need is a Clue.  This is straight 4.019, which we have
  41. working on lots of other machines: it's not perl, it's something in
  42. the configuration with which I compiled.  I'm startled that with such
  43. a basic problem so many of the tests pass... also, we've got a (much
  44. more complicated) program which, left to run for a while, causes a
  45. kernel panic: we need to figure these out, and I've already tried all
  46. the easy permutations in Configure.
  47.  
  48. Incidentally, if we declare variables in separate local statements
  49. (i.e. local(*x); local(*y)... rather nasty in the case of
  50. local(..)=@_;), we get "correct" (non-aliased) results.  The complex
  51. case still dies, but not in a kernel panic (at least not from just one
  52. run)... I'm still looking for that one, but need help with the simple
  53. case first.
  54. --
  55. Freeland K. Abbott              fabbott@athena.mit.edu
  56. 104 Madison Ave.                now working for Cambridge Technology Group
  57. Arlington, MA 02174             "And I thought 14-hr days would be over now"
  58.