<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>17047</bug_id>
          
          <creation_ts>2008-01-28 12:31:15 -0800</creation_ts>
          <short_desc>Out of Memory Error with .split(&quot;&quot;) due to large number of live objects</short_desc>
          <delta_ts>2008-12-29 21:58:15 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>JavaScriptCore</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://ejohn.org/files/bugs/split/</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>HasReduction, InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="John Resig">jresig</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ggaren</cc>
    
    <cc>mjs</cc>
    
    <cc>mrowe</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>68472</commentid>
    <comment_count>0</comment_count>
    <who name="John Resig">jresig</who>
    <bug_when>2008-01-28 12:31:15 -0800</bug_when>
    <thetext>I&apos;ve been hitting some weird Out of Memory errors in the latest nightly builds of WebKit, see the attached URL for an example. It only occurs with .split(&quot;&quot;) and a mix of closures and intervals. Full script below:

var str = &quot;&quot;, ret, fn = [];

for ( var i = 0; i &lt; 16384; i++ )
  str += &quot;a&quot;;

for ( var i = 16384; i &lt;= 131072; i *= 2 ) (function(i){
  fn.push(function(){
    ret = str.split(&quot;&quot;);
  });

  str += str;
})();

window.onload = function(){
        setInterval(function(){
                if ( fn.length )
                        fn.shift()();
        }, 13);
};</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68473</commentid>
    <comment_count>1</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2008-01-28 12:35:55 -0800</bug_when>
    <thetext>After loading &lt;http://ejohn.org/files/bugs/split/&gt; the Caches window shows around 800,000 live objects, which is enough to trigger the &quot;Out of Memory&quot; error.  Forcing a collection manually drops this down to around 270,000.  Closing the tab drops back to around 8,000, which shows nothing is actually being leaked.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68474</commentid>
    <comment_count>2</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2008-01-28 12:38:07 -0800</bug_when>
    <thetext>&lt;rdar://problem/5710766&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71628</commentid>
    <comment_count>3</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2008-02-23 13:27:24 -0800</bug_when>
    <thetext>Fixed by r30492?

http://trac.webkit.org/projects/webkit/changeset/30492

</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>