home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!haven.umd.edu!darwin.sura.net!mips!swrinde!sdd.hp.com!usc!news!netlabs!lwall
- From: lwall@netlabs.com (Larry Wall)
- Newsgroups: comp.lang.perl
- Subject: Re: array bug (not infinite recursion)
- Message-ID: <1992Aug17.174512.13975@netlabs.com>
- Date: 17 Aug 92 17:45:12 GMT
- References: <Bt1rC8.E6J.1@cs.cmu.edu> <Bt3F0D.G3K.1@cs.cmu.edu>
- Sender: news@netlabs.com
- Organization: NetLabs, Inc.
- Lines: 34
- Nntp-Posting-Host: scalpel.netlabs.com
-
- In article <Bt3F0D.G3K.1@cs.cmu.edu> jfriedl@cs.cmu.edu writes:
- : |> The following (contrived) program dumps core with 4.035
- : |>
- : |> &foo;
- : |> sub foo {
- : |> ($a, $b) = &foo('fi','b');
- : |> }
- :
- : Ok,ok, I guess I should have been more verbose and not assumed I would
- : be taken for a two-year-old (no, even a two-year old knows infinite
- : recursion is a no-no :-) I made the mistake of assuming the perl.gods would
- : actually try the program.
-
- Well, I did, and it didn't fail the way you said. But that was with my
- current copy. I just tried it with stock perl4.035 and it does fail the
- way you say. Paint me sorry.
-
- : Perl dumps core before &foo is called a 2nd time (i.e. before it is
- : called even once recursively).
- :
- : It seems to die when it's trying to save local variables. There are none,
- : so some pointer is zero. This pointer isn't being checked before being
- : dereferenced [see code snippet at end of message]. I don't have enough
- : of a global understanding of the internals to know exactly what's wrong
- : (i.e. that the pointer isn't being checked, or that it shouldn't be null
- : to begin with).
-
- The problem isn't actually the null pointer. The problem is that the
- other argument says there are entries when there aren't, because the
- earlier analysis code was being overly gullible. Turns out someone
- already sent me a patch for it, and I installed it on my copy. It just
- hasn't made its way out yet.
-
- Larry
-