WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
21924
HashTable internal index is not always deleted
https://bugs.webkit.org/show_bug.cgi?id=21924
Summary
HashTable internal index is not always deleted
Frederic Marmond
Reported
2008-10-28 08:48:01 PDT
HashTable::createTable() allocates new HashEntry array, but HashTable::deleteTable() is not always called, so this array may not be deleted. It can then introduce memory leaks, valgrind gives one of around 800ko on a single gmail visit. My fix is to call the deleteTable() in the HashTable destructor. It is secured and fixes the memory leak.
Attachments
fix a memory leak on HashTable
(1.13 KB, patch)
2008-10-28 08:49 PDT
,
Frederic Marmond
ap
: review-
Details
Formatted Diff
Diff
proposed fix
(1.46 KB, patch)
2008-10-28 09:49 PDT
,
Alexey Proskuryakov
darin
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Frederic Marmond
Comment 1
2008-10-28 08:49:04 PDT
Created
attachment 24714
[details]
fix a memory leak on HashTable
Alexey Proskuryakov
Comment 2
2008-10-28 09:15:59 PDT
Comment on
attachment 24714
[details]
fix a memory leak on HashTable HashTable::deleteTable is called from JSGlobalData destructor to avoid having destructors for static objects, which this patch would introduce. However, the problem is real - in WebCore/bindings/js/JSDOMBinding.cpp, DOMObjectHashTableMap isn't properly cleaned up! This only affects worker threads though.
Alexey Proskuryakov
Comment 3
2008-10-28 09:49:41 PDT
Created
attachment 24719
[details]
proposed fix Fix the problem in WebCore.
Darin Adler
Comment 4
2008-10-28 09:51:46 PDT
Comment on
attachment 24719
[details]
proposed fix r=me
Alexey Proskuryakov
Comment 5
2008-10-29 03:35:44 PDT
Committed revision 37968.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug