RE: [ID 20010821.004] Pseudo-hash access does not check for non-n umeric indices
[email protected] ("Wilson, Doug") Tue, 21 Aug 2001 15:19:45 -0700
| Newsgroups | perl.bugmongers,perl.perl5.porters |
|---|---|
| Message-ID | <[email protected]> |
> From: Michael G Schwern [mailto:[email protected]] > > On Tue, Aug 21, 2001 at 01:52:13PM -0700, Sean McAfee wrote: > > ...but my leaving out of the [0] caused $column to be treated as a > > pseudo-hash, causing the index of the "files" member to be > the expression > > [ ], which, in numeric context, evaulates to the address of > the array being > > referenced, which is typically a very large number, > accounting for the huge > > memory usage. Such, at least, is my theory. > > bleadperl says: > > Out of memory during "large" request for 2147487744 > bytes, total sbrk() is 77952 bytes at - line 2. This is like bug 20000519.006, which used to core dump. And the bug didn't really have anything to do with pseudo hashes, just array allocations or memory requests of certain sizes. This still core dumps for me under 5.6.1 and 5.7.2: my $var1 = []; $#$var1 = 2_147_483_647; my $size = @$var1; print $size,"\n";