mozilla/amo-validator — pull request #97 by mattbasta (2011-12-18 01:42:39+00:00)
Title: Fixed resource consumption issue

Arbitrary array assignment at high indices creates too many null JSWrapper objects. The value has been capped at 100,000.

I can't think of an effective way to test for this. A test failure will crash the machine if the fix doesn't work. A test that the cap exists doesn't mean anything because the value is relatively arbitrary. A functional test would probably be most appropriate, but again, a failure would crash the machine.

I did test that there are no other `while` loops in the JS engine, so I don't think infinite loops will be an issue. There are no generators in the JS engine, so `for` loops won't be an issue with that either.