Bug 26420 - Still seeing occasional leaks from UString::sharedBuffer code
Summary: Still seeing occasional leaks from UString::sharedBuffer code
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: David Levin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-15 15:14 PDT by Andrew Wilson
Modified: 2009-06-29 17:10 PDT (History)
1 user (show)

See Also:


Attachments
sample backtrace for leaking allocation (8.67 KB, text/plain)
2009-06-15 15:19 PDT, Andrew Wilson
no flags Details
Proposed fix. (2.28 KB, patch)
2009-06-29 16:16 PDT, David Levin
oliver: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Wilson 2009-06-15 15:14:02 PDT
I'm still seeing occasional leaks from the sharedBuffer code when running layout tests. They aren't reproducible 100%.

I have a "leaktest" shell script I run to look for leaks in a loop:

#!/bin/bash
rm /tmp/layout-test-results/DumpRenderTree*
until [ -e /tmp/layout-test-results/DumpRenderTree-leaks.txt ]; do
  WebKitTools/Scripts/run-webkit-tests --debug LayoutTests/fast/events/ --leaks
done

In my most recent test, it took about 40 iterations before it finally caught the attached leak (not sure why --leaks is non-deterministic). The backtrace (attached) is different every time, but it is always down in the UString::sharedBuffer code.
Comment 1 Andrew Wilson 2009-06-15 15:19:21 PDT
Created attachment 31310 [details]
sample backtrace for leaking allocation
Comment 2 David Levin 2009-06-29 16:16:51 PDT
Created attachment 32024 [details]
Proposed fix.
Comment 3 Oliver Hunt 2009-06-29 16:23:26 PDT
Comment on attachment 32024 [details]
Proposed fix.

r=me
Comment 4 David Levin 2009-06-29 17:10:50 PDT
Committed as http://trac.webkit.org/changeset/45360