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)

x86
All
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: cmtalbert, Assigned: hsivonen)

References

Details

Attachments

(2 files)

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);
Priority: -- → P1
Summary: HTML 5 Parser Tests Expose memory leaks on Tinderbox → [HTML5] HTML 5 Parser Tests Expose memory leaks on Tinderbox
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.
Attached file testcase (HTML)
Loading this test case (one of the HTML 5 tree construction tests) is enough to trigger the memory leak.
Assignee: nobody → hsivonen
Status: NEW → ASSIGNED
Summary: [HTML5] HTML 5 Parser Tests Expose memory leaks on Tinderbox → [HTML5][Patch] HTML 5 Parser Tests Expose memory leaks on Tinderbox
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.

Attachment

General

Created:
Updated:
Size: