[Webkit-unassigned] [Bug 14771] Unbounded memory growth in KJS::UString when repeatedly slicing and prepending/appending

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 13 00:55:55 PDT 2007


http://bugs.webkit.org/show_bug.cgi?id=14771





------- Comment #12 from john at johnmoe.com  2007-08-13 00:55 PDT -------
It bothers me a bit that there are other quite similar chunks of Javascript
that should not use enormous amounts, but currently will.  For example:

var lastChars = new Array();
for (var i = 0; i < 10000; i++) {
   var s = "x";
   for (var j = 0; j < 19; j++) {
      s += s;
   }
   lastChars[i] = s.slice(s.length-1,s.length);
}

This wouldn't have to ever use more than about 272 thousand chars, but will end
up using over 2.6 billion chars.

Is it worth fixing only one of several ways to cause this UString unbounded and
unused memory problem?


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list