User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040707 Firefox/0.9.2 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040707 Firefox/0.9.2 Doing var a = Array(); a = 1; alert(a.join(", ")); hangs Firefox at 95%+ cpu. It eat memory pretty slowly so it doesn't OOM in a timeframe I've been willing to endure. Reproducible: Always Steps to Reproduce: 1. Go to http://www.madmoose.dk/array-join-lockish.html 2. Wait 3. Wait some more Actual Results: Firefox locked up Expected Results: IE says "Out of memory at line: 4" immediately. It probably detects beforehand that it doesn't have the memory to complete the join.
Assignee: general → shaver
Status: UNCONFIRMED → NEW
Ever confirmed: true
This is going to be running for a very long time. Is it reasonable to malloc all the space for the separators up front and then realloc by the string size? That would weed out some of the more bogus calls quickly.
Assignee: shaver → nobody
The patch for bug 310405 addresses this.
Status: NEW → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.