Bug 53061 - REGRESSION: Leak in JSParser::Scope::copyCapturedVariablesToVector()
Summary: REGRESSION: Leak in JSParser::Scope::copyCapturedVariablesToVector()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All OS X 10.5
: P1 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-24 21:37 PST by Simon Fraser (smfr)
Modified: 2011-01-25 10:59 PST (History)
10 users (show)

See Also:


Attachments
patch (21.88 KB, patch)
2011-01-25 09:12 PST, Antti Koivisto
oliver: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2011-01-24 21:37:47 PST
Running 'leaks' on DumpRenderTree for some CSS tests is showing lots of leaks in:


	| WebCore::JSMainThreadExecState::evaluate(JSC::ExecState*, JSC::ScopeChain&, JSC::SourceCode const&, JSC::JSValue)
	| JSC::evaluate(JSC::ExecState*, JSC::ScopeChain&, JSC::SourceCode const&, JSC::JSValue)
	| JSC::ProgramExecutable::compile(JSC::ExecState*, JSC::ScopeChainNode*)
	| JSC::ProgramExecutable::compileInternal(JSC::ExecState*, JSC::ScopeChainNode*)
	| WTF::PassRefPtr<JSC::ProgramNode> JSC::Parser::parse<JSC::ProgramNode>(JSC::JSGlobalObject*, JSC::Debugger*, JSC::ExecState*, JSC::SourceCode const&, JSC::FunctionParameters*, JSC::JSParserStrictness, JSC::JSObject**)
	| JSC::Parser::parse(JSC::JSGlobalData*, JSC::FunctionParameters*, JSC::JSParserStrictness, JSC::JSParserMode, int*, JSC::UString*)
	| JSC::jsParse(JSC::JSGlobalData*, JSC::FunctionParameters*, JSC::JSParserStrictness, JSC::JSParserMode, JSC::SourceCode const*)
	| JSC::JSParser::parseProgram()
	| JSC::ASTBuilder::SourceElements JSC::JSParser::parseSourceElements<(JSC::JSParser::SourceElementsMode)0, JSC::ASTBuilder>(JSC::ASTBuilder&)
	| JSC::ASTBuilder::Statement JSC::JSParser::parseStatement<JSC::ASTBuilder>(JSC::ASTBuilder&, JSC::Identifier const*&)
	| JSC::ASTBuilder::Statement JSC::JSParser::parseFunctionDeclaration<JSC::ASTBuilder>(JSC::ASTBuilder&)
	| bool JSC::JSParser::parseFunctionInfo<(JSC::JSParser::FunctionRequirements)1, true, JSC::ASTBuilder>(JSC::ASTBuilder&, JSC::Identifier const*&, JSC::ASTBuilder::FormalParameterList&, JSC::ASTBuilder::FunctionBody&, int&, int&, int&)
	| JSC::JSParser::Scope::saveFunctionInfo(JSC::JSParser::CachedFunctionInfo*)
	| JSC::JSParser::Scope::copyCapturedVariablesToVector(WTF::HashSet<WTF::RefPtr<WTF::StringImpl>, JSC::IdentifierRepHash, WTF::HashTraits<WTF::RefPtr<WTF::StringImpl> > > const&, WTF::Vector<WTF::RefPtr<WTF::StringImpl>, 0ul>&)
	| WTF::Vector<WTF::RefPtr<WTF::StringImpl>, 0ul>::shrinkToFit()
	| WTF::Vector<WTF::RefPtr<WTF::StringImpl>, 0ul>::shrinkCapacity(unsigned long)
	| WTF::VectorBufferBase<WTF::RefPtr<WTF::StringImpl> >::allocateBuffer(unsigned long)
	| WTF::fastMalloc(unsigned long)
Comment 1 Simon Fraser (smfr) 2011-01-24 21:40:44 PST
<rdar://problem/8911590>
Comment 2 Simon Fraser (smfr) 2011-01-24 21:40:59 PST
On SnowLeopard, at r76568.
Comment 3 Simon Fraser (smfr) 2011-01-24 22:07:57 PST
Regressed in http://trac.webkit.org/changeset/76177.
Comment 4 Antti Koivisto 2011-01-25 09:12:19 PST
Created attachment 80069 [details]
patch

Cache did not know about the subclass so failed to fully delete the items. Got rid of the subclass and moved the classes to separate files.
Comment 5 WebKit Review Bot 2011-01-25 09:15:32 PST
Attachment 80069 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/JavaScriptCore/ChangeLog', u'Source..." exit_code: 1

Source/JavaScriptCore/parser/SourceProviderCache.h:39:  The parameter name "item" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/JavaScriptCore/parser/SourceProvider.h:33:  Alphabetical sorting problem.  [build/include_order] [4]
Total errors found: 2 in 11 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 WebKit Review Bot 2011-01-25 09:18:29 PST
Attachment 80069 [details] did not build on gtk:
Build output: http://queues.webkit.org/results/7513332
Comment 7 Early Warning System Bot 2011-01-25 09:24:09 PST
Attachment 80069 [details] did not build on qt:
Build output: http://queues.webkit.org/results/7493340
Comment 8 Build Bot 2011-01-25 09:34:13 PST
Attachment 80069 [details] did not build on win:
Build output: http://queues.webkit.org/results/7507325
Comment 9 Antti Koivisto 2011-01-25 10:45:21 PST
http://trac.webkit.org/changeset/76611 

(with some non-mac build fixes)
Comment 10 WebKit Review Bot 2011-01-25 10:59:16 PST
http://trac.webkit.org/changeset/76611 might have broken Windows Release (Build) and Windows Debug (Build)