Bug 34964 - Leaks tool reports false memory leaks due to Rope implementation.
Summary: Leaks tool reports false memory leaks due to Rope implementation.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Gavin Barraclough
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-15 15:54 PST by Gavin Barraclough
Modified: 2010-02-16 16:02 PST (History)
1 user (show)

See Also:


Attachments
The patch (36.71 KB, patch)
2010-02-16 15:23 PST, Gavin Barraclough
oliver: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gavin Barraclough 2010-02-15 15:54:31 PST
A rope is a recursive data structure where each node in the rope holds a set of pointers, each of which may reference either a string (in UStringImpl form) or another rope node.  A low bit in each pointer is used to distinguish between rope & string elements, in a fashion similar to the recently-removed PtrAndFlags class (see https://bugs.webkit.org/show_bug.cgi?id=33731 ).  Again, this causes a problem for Leaks – refactor to remove the magic pointer mangling.
Comment 1 Gavin Barraclough 2010-02-16 15:23:31 PST
Created attachment 48841 [details]
The patch

No performance impact.
Comment 2 WebKit Review Bot 2010-02-16 15:26:28 PST
Attachment 48841 [details] did not pass style-queue:

Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1
JavaScriptCore/runtime/UStringImpl.h:187:  More than one command on the same line  [whitespace/newline] [4]
JavaScriptCore/runtime/UStringImpl.h:187:  More than one command on the same line in if  [whitespace/parens] [4]
JavaScriptCore/runtime/UStringImpl.h:328:  More than one command on the same line  [whitespace/newline] [4]
JavaScriptCore/runtime/UStringImpl.h:328:  More than one command on the same line in if  [whitespace/parens] [4]
Total errors found: 4


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Oliver Hunt 2010-02-16 15:26:46 PST
Comment on attachment 48841 [details]
The patch

r=me
Comment 4 Gavin Barraclough 2010-02-16 16:02:40 PST
Fixed in r54843.