Closed
Bug 510648
Opened 15 years ago
Closed 15 years ago
[HTML5][Patch] HTML 5 Parser Tests Expose memory leaks on Tinderbox
Categories
(Core :: DOM: HTML Parser, defect, P1)
Tracking
()
RESOLVED
FIXED
People
(Reporter: cmtalbert, Assigned: hsivonen)
References
Details
Attachments
(2 files)
34 bytes,
text/html
|
Details | |
621 bytes,
patch
|
Details | Diff | Splinter Review |
The HTML5 Parser tests landed in changeset: http://hg.mozilla.org/mozilla-central/rev/fc7d931fd75b have exposed a set of memory leaks.
This bug is to track a fix for these leaks.
* Mac: http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1250290216.1250297120.27303.gz&fulltext=1
* Linux: http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1250289345.1250297823.2793.gz&fulltext=1
* Windows: http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1250289876.1250295308.7559.gz&fulltext=1
Comment 1•15 years ago
|
||
I did a little investigation on this. After the new HTML 5 parser tests were backed out, I ran the original set of parser tests (test_html5_tree_construction.html) in their original state (without the HTML 5 parser enabled) => no memory leak. Then I added the following code to enable the HTML 5 parser and re-ran the tests: 352387 bytes leaked.
netscape.security.PrivilegeManager
.enablePrivilege("UniversalXPConnect");
Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranch)
.setBoolPref("html5.enable", true);
Assignee | ||
Updated•15 years ago
|
Priority: -- → P1
Summary: HTML 5 Parser Tests Expose memory leaks on Tinderbox → [HTML5] HTML 5 Parser Tests Expose memory leaks on Tinderbox
Comment 2•15 years ago
|
||
The original HTML parser tests are still leaking with the HTML 5 parser enabled; this will have to be fixed before the HTML 5 parser can be enabled by default on m-c. Currently, running the tests yields these leaks:
== BloatView: ALL (cumulative) LEAK AND BLOAT STATISTICS
|<----------------Class--------------->|<-----Bytes------>|<----------------Objects---------------->|<--------------References-------------->|
Per-Inst Leaked Total Rem Mean StdDev Total Rem Mean StdDev
0 TOTAL 27 64 4051408 4 ( 6467.48 +/- 5530.36) 6326856 1 ( 2073.44 +/- 3449.29)
445 nsHtml5AttributeName 16 32 588 2 ( 294.48 +/- 169.48) 0 0 ( 0.00 +/- 0.00)
448 nsHtml5HtmlAttributes 24 24 205 1 ( 3.12 +/- 1.86) 0 0 ( 0.00 +/- 0.00)
648 nsStringBuffer 8 8 88446 1 ( 9876.60 +/- 4361.59) 157043 1 (11973.00 +/- 4844.34)
nsTraceRefcntImpl::DumpStatistics: 831 entries
TEST-UNEXPECTED-FAIL | automationutils.processLeakLog() | leaked 64 bytes during test execution
TEST-UNEXPECTED-FAIL | automationutils.processLeakLog() | leaked 2 instances of nsHtml5AttributeName with size 16 bytes each (32 bytes total)
TEST-UNEXPECTED-FAIL | automationutils.processLeakLog() | leaked 1 instance of nsHtml5HtmlAttributes with size 24 bytes
TEST-UNEXPECTED-FAIL | automationutils.processLeakLog() | leaked 1 instance of nsStringBuffer with size 8 bytes
To repro:
python runtests.py --test-path=parser/htmlparser/tests/mochitest/test_html5_tree_construction.html --setpref=html5.enable=true
It would be nice to fix this sooner, so that the new HTML 5 tests can be enabled on tinderbox and thus would be able to identify regressions; currently, they're not run at all due to this leak.
Comment 3•15 years ago
|
||
Loading this test case (one of the HTML 5 tree construction tests) is enough to trigger the memory leak.
Assignee | ||
Comment 4•15 years ago
|
||
Assignee: nobody → hsivonen
Status: NEW → ASSIGNED
Assignee | ||
Updated•15 years ago
|
Summary: [HTML5] HTML 5 Parser Tests Expose memory leaks on Tinderbox → [HTML5][Patch] HTML 5 Parser Tests Expose memory leaks on Tinderbox
Assignee | ||
Comment 5•15 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•