RESOLVED FIXED57478
REGRESSION (r82400): Leaks seen beneath CSSParser::createFloatingVectorSelector when parsing UA stylesheet
https://bugs.webkit.org/show_bug.cgi?id=57478
Summary REGRESSION (r82400): Leaks seen beneath CSSParser::createFloatingVectorSelect...
Adam Roben (:aroben)
Reported 2011-03-30 11:01:43 PDT
To see the leaks: 1. Go to <http://build.webkit.org/LeaksViewer/?url=http://build.webkit.org/results/SnowLeopard%20Intel%20Leaks/r82400%20(15899)/> 2. Dig into malloc_zone_malloc > malloc -> WTF::fastMalloc The first leak listed here is an allocation inside Vector. If you look a little lower down you'll see the Vector itself is leaking (as indicated by the Vector<OwnPtr<CSSParserSelector> >::operator new leak). Other evidence: r82398, 2439 leaks: http://build.webkit.org/builders/SnowLeopard%20Intel%20Leaks/builds/15898 r82400, 3186 leaks: http://build.webkit.org/builders/SnowLeopard%20Intel%20Leaks/builds/15899
Attachments
Patch (3.25 KB, patch)
2011-03-30 21:51 PDT, Ojan Vafai
aroben: review+
aroben: commit-queue-
Adam Roben (:aroben)
Comment 1 2011-03-30 11:02:03 PDT
r82400 added uses of :-webkit-any to the UA stylesheet, so my guess is that the :-webkit-any implementation is leaky.
Adam Roben (:aroben)
Comment 2 2011-03-30 11:04:26 PDT
Yuta Kitamura
Comment 3 2011-03-30 19:34:43 PDT
The same leaks are observed in Chromium, too. <http://code.google.com/p/chromium/issues/detail?id=77885>
Ojan Vafai
Comment 4 2011-03-30 21:51:09 PDT
Adam Roben (:aroben)
Comment 5 2011-03-30 22:01:55 PDT
Comment on attachment 87665 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=87665&action=review > Source/WebCore/css/CSSGrammar.y:1152 > + OwnPtr<Vector<OwnPtr<CSSParserSelector> > > selectorVector = p->sinkFloatingSelectorVector($4); > + $$->adoptSelectorVector(*selectorVector.get()); No need for the local variable, or the .get(). > Source/WebCore/css/CSSParser.h:188 > Vector<OwnPtr<CSSParserSelector> >* createFloatingSelectorVector(); Seems like we should change createFloatingSelectorVector to return a PassOwnPtr at some point.
Ojan Vafai
Comment 6 2011-03-30 22:13:45 PDT
(In reply to comment #5) > (From update of attachment 87665 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=87665&action=review > > Source/WebCore/css/CSSParser.h:188 > > Vector<OwnPtr<CSSParserSelector> >* createFloatingSelectorVector(); > > Seems like we should change createFloatingSelectorVector to return a PassOwnPtr at some point. Maybe. I was just cargo culting createFloatingSelector. :)
Ojan Vafai
Comment 7 2011-03-30 22:17:52 PDT
WebKit Review Bot
Comment 8 2011-03-30 23:04:18 PDT
http://trac.webkit.org/changeset/82545 might have broken GTK Linux 32-bit Debug
Ojan Vafai
Comment 9 2011-03-30 23:08:15 PDT
(In reply to comment #8) > http://trac.webkit.org/changeset/82545 might have broken GTK Linux 32-bit Debug Looks like a false positive. This bot hasn't successfully run the tests in hours.
Adam Roben (:aroben)
Comment 11 2011-03-31 06:10:50 PDT
And Leaks Viewer says the leaks are gone, too.
Note You need to log in before you can comment on or make changes to this bug.