[Webkit-unassigned] [Bug 80184] New: Memory leak in RuleSet::addToRuleSet

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Mar 2 12:58:51 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=80184

           Summary: Memory leak in RuleSet::addToRuleSet
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: CSS
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: adamk at chromium.org
                CC: koivisto at iki.fi, kling at webkit.org


Detected by the Chromium memory bots.  The supposed rev range was r109464 - r109533, but I don't see anything damning in there. r105093 seems the biggest recent change to memory management in this code, thus CCing anttik and kling.

Valgrind output follows:

Leak_DefinitelyLost
640 bytes in 1 blocks are definitely lost in loss record 4,280 of 4,515
  malloc (m_replacemalloc/vg_replace_malloc.c:1072)
  WTF::fastMalloc(unsigned long) (third_party/WebKit/Source/JavaScriptCore/wtf/FastMalloc.cpp:268)
  WTF::VectorBufferBase<WebCore::RuleData>::allocateBuffer(unsigned long) (third_party/WebKit/Source/JavaScriptCore/wtf/Vector.h:264)
  WTF::Vector<WebCore::RuleData, 0ul>::reserveCapacity(unsigned long) (third_party/WebKit/Source/JavaScriptCore/wtf/Vector.h:899)
  WTF::Vector<WebCore::RuleData, 0ul>::expandCapacity(unsigned long) (third_party/WebKit/Source/JavaScriptCore/wtf/Vector.h:816)
  WTF::Vector<WebCore::RuleData, 0ul>::expandCapacity(unsigned long, WebCore::RuleData const*) (third_party/WebKit/Source/JavaScriptCore/wtf/Vector.h:823)
  void WTF::Vector<WebCore::RuleData, 0ul>::appendSlowCase<WebCore::RuleData>(WebCore::RuleData const&) (third_party/WebKit/Source/JavaScriptCore/wtf/Vector.h:1008)
  WebCore::RuleSet::addToRuleSet(WTF::AtomicStringImpl*, WTF::HashMap<WTF::AtomicStringImpl*, WTF::OwnPtr<WTF::Vector<WebCore::RuleData, 0ul> >, WTF::PtrHash<WTF::AtomicStringImpl*>, WTF::HashTraits<WTF::AtomicStringImpl*>, WTF::HashTraits<WTF::OwnPtr<WTF::Vector<WebCore::RuleData, 0ul> > > >&, WebCore::RuleData const&) (third_party/WebKit/Source/JavaScriptCore/wtf/Vector.h:999)
  WebCore::RuleSet::addRule(WebCore::StyleRule*, WebCore::CSSSelector*, bool, bool) (third_party/WebKit/Source/WebCore/css/CSSStyleSelector.cpp:2364)
  WebCore::RuleSet::addStyleRule(WebCore::StyleRule*, bool, bool) (third_party/WebKit/Source/WebCore/css/CSSStyleSelector.cpp:2473)
  WebCore::RuleSet::addRulesFromSheet(WebCore::CSSStyleSheet*, WebCore::MediaQueryEvaluator const&, WebCore::CSSStyleSelector*, WebCore::Element const*) (third_party/WebKit/Source/WebCore/css/CSSStyleSelector.cpp:2409)
  WebCore::loadFullDefaultStyle() (third_party/WebKit/Source/WebCore/css/CSSStyleSelector.cpp:672)
  WebCore::ensureDefaultStyleSheetsForElement(WebCore::Element*) (third_party/WebKit/Source/WebCore/css/CSSStyleSelector.cpp:707)
  WebCore::CSSStyleSelector::styleForElement(WebCore::Element*, WebCore::RenderStyle*, bool, bool, WebCore::RenderRegion*) (third_party/WebKit/Source/WebCore/css/CSSStyleSelector.cpp:1566)
  WebCore::Document::styleForElementIgnoringPendingStylesheets(WebCore::Element*) (third_party/WebKit/Source/WebCore/dom/Document.cpp:1736)
  WebCore::Element::computedStyle(WebCore::PseudoId) (third_party/WebKit/Source/WebCore/dom/Element.cpp:1611)
  WebCore::HTMLTitleElement::textWithDirection() (third_party/WebKit/Source/WebCore/html/HTMLTitleElement.cpp:82)
  WebCore::HTMLTitleElement::childrenChanged(bool, WebCore::Node*, WebCore::Node*, int) (third_party/WebKit/Source/WebCore/html/HTMLTitleElement.cpp:61)
  WebCore::ContainerNode::parserAddChild(WTF::PassRefPtr<WebCore::Node>) (third_party/WebKit/Source/WebCore/dom/ContainerNode.cpp:692)
  WebCore::executeTask(WebCore::HTMLConstructionSiteTask&) (third_party/WebKit/Source/WebCore/html/parser/HTMLConstructionSite.cpp:95)
  WebCore::HTMLConstructionSite::insertTextNode(WTF::String const&, WebCore::WhitespaceMode) (third_party/WebKit/Source/WebCore/html/parser/HTMLConstructionSite.cpp:394)
  WebCore::HTMLTreeBuilder::processCharacterBuffer(WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer&) (third_party/WebKit/Source/WebCore/html/parser/HTMLTreeBuilder.cpp:2395)
  WebCore::HTMLTreeBuilder::processCharacter(WebCore::AtomicHTMLToken&) (third_party/WebKit/Source/WebCore/html/parser/HTMLTreeBuilder.cpp:2268)
  WebCore::HTMLTreeBuilder::processToken(WebCore::AtomicHTMLToken&) (third_party/WebKit/Source/WebCore/html/parser/HTMLTreeBuilder.cpp:509)
  WebCore::HTMLTreeBuilder::constructTreeFromAtomicToken(WebCore::AtomicHTMLToken&) (third_party/WebKit/Source/WebCore/html/parser/HTMLTreeBuilder.cpp:472)
  WebCore::HTMLTreeBuilder::constructTreeFromToken(WebCore::HTMLToken&) (third_party/WebKit/Source/WebCore/html/parser/HTMLTreeBuilder.cpp:459)
  WebCore::HTMLDocumentParser::pumpTokenizer(WebCore::HTMLDocumentParser::SynchronousMode) (third_party/WebKit/Source/WebCore/html/parser/HTMLDocumentParser.cpp:278)
  WebCore::HTMLDocumentParser::pumpTokenizerIfPossible(WebCore::HTMLDocumentParser::SynchronousMode) (third_party/WebKit/Source/WebCore/html/parser/HTMLDocumentParser.cpp:177)
  WebCore::HTMLDocumentParser::append(WebCore::SegmentedString const&) (third_party/WebKit/Source/WebCore/html/parser/HTMLDocumentParser.cpp:370)
  WebCore::DecodedDataDocumentParser::appendBytes(WebCore::DocumentWriter*, char const*, unsigned long) (third_party/WebKit/Source/WebCore/dom/DecodedDataDocumentParser.cpp:50)

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list