<?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>71259</bug_id>
          
          <creation_ts>2011-10-31 17:57:23 -0700</creation_ts>
          <short_desc>Leaks seen in RenderRegion::setRenderBoxRegionInfo on Leaks bot</short_desc>
          <delta_ts>2011-11-07 13:15:14 -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>Layout and Rendering</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://build.webkit.org/LeaksViewer/?url=http%3A%2F%2Fbuild.webkit.org%2F%2Fresults%2FSnowLeopard%20Intel%20Leaks%2Fr98879%20(19849)%2F</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar, MakingBotsRed</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>57312</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Adam Roben (:aroben)">aroben</reporter>
          <assigned_to name="Mihnea Ovidenie">mihnea</assigned_to>
          <cc>darin</cc>
    
    <cc>hyatt</cc>
    
    <cc>mihnea</cc>
    
    <cc>mitz</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>493681</commentid>
    <comment_count>0</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2011-10-31 17:57:23 -0700</bug_when>
    <thetext>http://build.webkit.org/LeaksViewer/?url=http%3A%2F%2Fbuild.webkit.org%2F%2Fresults%2FSnowLeopard%20Intel%20Leaks%2Fr98879%20(19849)%2F

malloc_zone_malloc &gt; malloc &gt; fastMalloc &gt; RenderRegion::setRenderBoxRegionInfo

We&apos;re leaking in this function. Looks like we&apos;re allocating a new RenderBoxRegionInfo, storing it in a HashMap, and never deleting it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>493682</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2011-10-31 17:57:35 -0700</bug_when>
    <thetext>&lt;rdar://problem/10374417&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>496762</commentid>
    <comment_count>2</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2011-11-05 18:20:43 -0700</bug_when>
    <thetext>*** Bug 71260 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>496791</commentid>
    <comment_count>3</comment_count>
    <who name="Mihnea Ovidenie">mihnea</who>
    <bug_when>2011-11-06 01:44:14 -0800</bug_when>
    <thetext>I have taken a look at both methods RenderRegion::setRenderBoxRegionInfo and RenderFlowThread::setRegionRangeForBox. Using our current tests, i was not able to find a place where we leak in these functions and their associated data.

What i have found is that  in JavaScriptCore/Parser.cpp, Parser class destructor, we are not freeing the Lexer object that was allocated in the Parser ctor. I will make a patch with that fix unless there is a reason for doing that after https://bugs.webkit.org/show_bug.cgi?id=71138.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>496814</commentid>
    <comment_count>4</comment_count>
    <who name="Mihnea Ovidenie">mihnea</who>
    <bug_when>2011-11-06 10:29:46 -0800</bug_when>
    <thetext>Leaks are reported if one loads fast/regions/overflow-in-uniform-regions-dynamic.html.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>496840</commentid>
    <comment_count>5</comment_count>
    <who name="Mihnea Ovidenie">mihnea</who>
    <bug_when>2011-11-06 12:23:40 -0800</bug_when>
    <thetext>In RenderFlowThread::logicalWidthChangedInRegions, oldInfo is deleted only inside the condition:
if (!newInfo || newInfo-&gt;logicalWidth() != oldInfo-&gt;logicalWidth()) {
....
}

Otherwise, it is left undeleted and leaked.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>496844</commentid>
    <comment_count>6</comment_count>
    <who name="Mihnea Ovidenie">mihnea</who>
    <bug_when>2011-11-06 12:34:23 -0800</bug_when>
    <thetext>The other leak is in function RenderRegion::removeRenderBoxRegionInfo, when the RenderBoxRegionInfo is removed from the map but not deleted.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>496848</commentid>
    <comment_count>7</comment_count>
    <who name="Mihnea Ovidenie">mihnea</who>
    <bug_when>2011-11-06 12:41:59 -0800</bug_when>
    <thetext>Darin,
I can make a patch for this one and another for 71260 if this is ok with you.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>496887</commentid>
    <comment_count>8</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2011-11-06 14:28:43 -0800</bug_when>
    <thetext>Sure, if you want to handle this, that’s fine.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>497076</commentid>
    <comment_count>9</comment_count>
      <attachid>113846</attachid>
    <who name="Mihnea Ovidenie">mihnea</who>
    <bug_when>2011-11-07 04:51:08 -0800</bug_when>
    <thetext>Created attachment 113846
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>497412</commentid>
    <comment_count>10</comment_count>
      <attachid>113846</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2011-11-07 13:15:09 -0800</bug_when>
    <thetext>Comment on attachment 113846
Patch

Clearing flags on attachment: 113846

Committed r99467: &lt;http://trac.webkit.org/changeset/99467&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>497413</commentid>
    <comment_count>11</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2011-11-07 13:15:14 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>113846</attachid>
            <date>2011-11-07 04:51:08 -0800</date>
            <delta_ts>2011-11-07 13:15:09 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>71259.patch</filename>
            <type>text/plain</type>
            <size>2448</size>
            <attacher name="Mihnea Ovidenie">mihnea</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZyBiL1NvdXJjZS9XZWJDb3JlL0No
YW5nZUxvZwppbmRleCBiNWQzNDcwLi5mZjBhZGVjIDEwMDY0NAotLS0gYS9Tb3VyY2UvV2ViQ29y
ZS9DaGFuZ2VMb2cKKysrIGIvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMjAg
QEAKKzIwMTEtMTEtMDcgIE1paG5lYSBPdmlkZW5pZSAgPG1paG5lYUBhZG9iZS5jb20+CisKKyAg
ICAgICAgTGVha3Mgc2VlbiBpbiBSZW5kZXJSZWdpb246OnNldFJlbmRlckJveFJlZ2lvbkluZm8g
b24gTGVha3MgYm90CisgICAgICAgIGh0dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNn
aT9pZD03MTI1OQorCisgICAgICAgIFJldmlld2VkIGJ5IE5PQk9EWSAoT09QUyEpLgorCisgICAg
ICAgIExlYWsgZml4ZXMgY292ZXJlZCBieSBleGlzdGluZyB0ZXN0cy4KKworICAgICAgICAqIHJl
bmRlcmluZy9SZW5kZXJGbG93VGhyZWFkLmNwcDoKKyAgICAgICAgKFdlYkNvcmU6OlJlbmRlckZs
b3dUaHJlYWQ6OmxvZ2ljYWxXaWR0aENoYW5nZWRJblJlZ2lvbnMpOgorICAgICAgICBUaGUgUmVu
ZGVyQm94UmVnaW9uSW5mbyB0YWtlbiBvdXQgb2YgUmVuZGVyUmVnaW9uIG11c3QgYmUg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ckJveCogYm94KQogCiB2b2lkIFJlbmRlclJlZ2lvbjo6cmVtb3ZlUmVuZGVyQm94UmVnaW9uSW5m
byhjb25zdCBSZW5kZXJCb3gqIGJveCkKIHsKLSAgICBtX3JlbmRlckJveFJlZ2lvbkluZm8ucmVt
b3ZlKGJveCk7CisgICAgZGVsZXRlIG1fcmVuZGVyQm94UmVnaW9uSW5mby50YWtlKGJveCk7CiB9
CiAKIHZvaWQgUmVuZGVyUmVnaW9uOjpkZWxldGVBbGxSZW5kZXJCb3hSZWdpb25JbmZvKCkK
</data>

          </attachment>
      

    </bug>

</bugzilla>