Bug 83823 - StructureStubInfo::reset() causes leaks of PolymorphicAccessStructureList and ExecutableMemoryHandle objects
Summary: StructureStubInfo::reset() causes leaks of PolymorphicAccessStructureList and...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Michael Saboff
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-12 14:38 PDT by Michael Saboff
Modified: 2012-04-12 17:14 PDT (History)
1 user (show)

See Also:


Attachments
Patch (1.34 KB, patch)
2012-04-12 14:41 PDT, Michael Saboff
barraclough: review+
webkit.review.bot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ec2-cq-02 (6.49 MB, application/zip)
2012-04-12 16:50 PDT, WebKit Review Bot
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Saboff 2012-04-12 14:38:20 PDT
The current implementation of StructureStubInfo::reset() causes leaks.

        void reset()
        {
            accessType = access_unset;
            deref();
            stubRoutine = MacroAssemblerCodeRef();
        }

deref() depends on accessType to delete referenced objects, but clearing of accessType to access_unset eliminate these delete calls.

The fix is to change the order of the two statements.

This can lead to large (100KB) leaks of PolymorphicAccessStructureList and ExecutableMemoryHandle objects.  From looking at the code it can also lead to PolymorphicPutByIdList leaks as well, but these haven't been observed.
Comment 1 Michael Saboff 2012-04-12 14:41:32 PDT
Created attachment 136978 [details]
Patch
Comment 2 WebKit Review Bot 2012-04-12 16:50:39 PDT
Comment on attachment 136978 [details]
Patch

Rejecting attachment 136978 [details] from commit-queue.

New failing tests:
svg/transforms/text-with-mask-with-svg-transform.svg
Full output: http://queues.webkit.org/results/12396443
Comment 3 WebKit Review Bot 2012-04-12 16:50:44 PDT
Created attachment 136997 [details]
Archive of layout-test-results from ec2-cq-02

The attached test failures were seen while running run-webkit-tests on the commit-queue.
Bot: ec2-cq-02  Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'>  Platform: Linux-2.6.35-28-virtual-x86_64-with-Ubuntu-10.10-maverick
Comment 4 Michael Saboff 2012-04-12 17:11:30 PDT
(In reply to comment #2)
> (From update of attachment 136978 [details])
> Rejecting attachment 136978 [details] from commit-queue.
> 
> New failing tests:
> svg/transforms/text-with-mask-with-svg-transform.svg
> Full output: http://queues.webkit.org/results/12396443

THere is no reason that this change should cause this failure.  The change is in JSC JIT code which chromium doesn't use.  Checking in manually.
Comment 5 Michael Saboff 2012-04-12 17:14:02 PDT
Committed r114052: <http://trac.webkit.org/changeset/114052>