<?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>119049</bug_id>
          
          <creation_ts>2013-07-24 10:41:29 -0700</creation_ts>
          <short_desc>JavaScriptCore Doesn&apos;t GC Typed Arrays</short_desc>
          <delta_ts>2013-07-24 14:55:47 -0700</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.8</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>119064</dup_id>
          
          <bug_file_loc>http://people.cs.umass.edu/~jvilk/safari-crash.html</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="John Vilk">webkit</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>feross</cc>
    
    <cc>fpizlo</cc>
    
    <cc>ggaren</cc>
    
    <cc>mhahnenberg</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>911356</commentid>
    <comment_count>0</comment_count>
    <who name="John Vilk">webkit</who>
    <bug_when>2013-07-24 10:41:29 -0700</bug_when>
    <thetext>Summary:

Safari does not appear to garbage collect typed arrays / ArrayBuffers. Once allocated, they remain a part of Safari&apos;s memory footprint, even when they are no longer reachable by the JavaScript program. As a result, a web page that makes regular use of typed arrays can crash Safari through a series of allocations.

I am unsure of which version of JavaScriptCore/WebKit is applicable. I am using the latest Safari on Mountain Lion.

Steps to Reproduce:

1) Visit http://people.cs.umass.edu/~jvilk/safari-crash.html
2) Click on one of the buttons in Safari.

(Or more generally)

1) Repeatedly allocate a 1MB ArrayBuffer to the same variable a large number of times (such that you allocate more than your system&apos;s memory). Each allocation should make the previous allocation unreachable.

Expected Results:

Safari does not freeze. The page pops up an alert with either &quot;Congratulations, your browser didn&apos;t crash! Check your memory usage, though.&quot;, or &quot;Looks like your browser limits how much we allocate. Received the following exception: [exception text]&quot;.

Actual Results:

Safari uses all system memory, starts swapping to disk, and either becomes completely unresponsive or crashes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>911362</commentid>
    <comment_count>1</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2013-07-24 10:58:04 -0700</bug_when>
    <thetext>&lt;rdar://problem/14535469&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>911366</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2013-07-24 11:12:34 -0700</bug_when>
    <thetext>See also: bug 118223, bug 114824.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>911433</commentid>
    <comment_count>3</comment_count>
    <who name="Filip Pizlo">fpizlo</who>
    <bug_when>2013-07-24 14:55:36 -0700</bug_when>
    <thetext>I&apos;m so over our typed array implementation.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>911435</commentid>
    <comment_count>4</comment_count>
    <who name="Filip Pizlo">fpizlo</who>
    <bug_when>2013-07-24 14:55:47 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 119064 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>