in reply to Automagic Array to Hash Conversion? Pseudo-Hash Explosion

Yep, it's a "bug" in the psuedo hashes code. Remember how psuedo hashes work - they're an array ref where the first entry is a hashref identifying the entries. Unfortunately perl checks every arrayref for access like this...

Anyway, what's happening the value it gets from the first entry is a ref, but perl tries to treat it as a number. As you know, a ref looks like: HASH(0x804b55c). Now when we numify that, we get 134_526_303. So perl tries to access the entry somewhere past the 134 millionth entry. And we know that perl tries to autovivify that entry by extending the array that far.

I think this has been fixed in bleedperl, but I can't find the reference to the bug now.

Hope that helps.

  • Comment on Re: Automagic Array to Hash Conversion? Pseudo-Hash Explosion