RESOLVED FIXED 71259
Leaks seen in RenderRegion::setRenderBoxRegionInfo on Leaks bot
https://bugs.webkit.org/show_bug.cgi?id=71259
Summary Leaks seen in RenderRegion::setRenderBoxRegionInfo on Leaks bot
Adam Roben (:aroben)
Reported 2011-10-31 17:57:23 PDT
http://build.webkit.org/LeaksViewer/?url=http%3A%2F%2Fbuild.webkit.org%2F%2Fresults%2FSnowLeopard%20Intel%20Leaks%2Fr98879%20(19849)%2F malloc_zone_malloc > malloc > fastMalloc > RenderRegion::setRenderBoxRegionInfo We're leaking in this function. Looks like we're allocating a new RenderBoxRegionInfo, storing it in a HashMap, and never deleting it.
Attachments
Patch (2.39 KB, patch)
2011-11-07 04:51 PST, Mihnea Ovidenie
no flags
Radar WebKit Bug Importer
Comment 1 2011-10-31 17:57:35 PDT
Darin Adler
Comment 2 2011-11-05 18:20:43 PDT
*** Bug 71260 has been marked as a duplicate of this bug. ***
Mihnea Ovidenie
Comment 3 2011-11-06 01:44:14 PST
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.
Mihnea Ovidenie
Comment 4 2011-11-06 10:29:46 PST
Leaks are reported if one loads fast/regions/overflow-in-uniform-regions-dynamic.html.
Mihnea Ovidenie
Comment 5 2011-11-06 12:23:40 PST
In RenderFlowThread::logicalWidthChangedInRegions, oldInfo is deleted only inside the condition: if (!newInfo || newInfo->logicalWidth() != oldInfo->logicalWidth()) { .... } Otherwise, it is left undeleted and leaked.
Mihnea Ovidenie
Comment 6 2011-11-06 12:34:23 PST
The other leak is in function RenderRegion::removeRenderBoxRegionInfo, when the RenderBoxRegionInfo is removed from the map but not deleted.
Mihnea Ovidenie
Comment 7 2011-11-06 12:41:59 PST
Darin, I can make a patch for this one and another for 71260 if this is ok with you.
Darin Adler
Comment 8 2011-11-06 14:28:43 PST
Sure, if you want to handle this, that’s fine.
Mihnea Ovidenie
Comment 9 2011-11-07 04:51:08 PST
WebKit Review Bot
Comment 10 2011-11-07 13:15:09 PST
Comment on attachment 113846 [details] Patch Clearing flags on attachment: 113846 Committed r99467: <http://trac.webkit.org/changeset/99467>
WebKit Review Bot
Comment 11 2011-11-07 13:15:14 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.