Closed Bug 3734 Opened 26 years ago Closed 25 years ago

MLK: 104 bytes leaked- Leaking some HTML attributes

Categories

(Core :: Layout, defect, P3)

defect

Tracking

()

VERIFIED WORKSFORME

People

(Reporter: bruce, Assigned: pollmann)

References

Details

(Keywords: memory-leak)

This one doesn't seem to be that common in a partial run through the test sites. Pull/build from March 14, 1999. MLK: 104 bytes leaked in 2 blocks * This memory was allocated from: malloc [rtlib.o] __bUiLtIn_nEw [libgcc.a] __builtin_new [rtlib.o] HTMLAttributesImpl::operator new(unsigned int) [nsHTMLAttributes.cpp:263] NS_NewHTMLAttributes(nsIHTMLAttributes**,nsIHTMLStyleSheet*,void(*)(nsIHTMLAttri butes*,nsIStyleContext*,nsIPresContext*)) [nsHTMLAttributes.cpp:862] HTMLStyleSheetImpl::EnsureSingleAttributes(nsIHTMLAttributes*&,void(*)(nsIHTMLAt tributes*,nsIStyleContext*,nsIPresContext*),int,nsIHTMLAttributes*&) [nsHTMLStyleSheet.cpp:739] HTMLStyleSheetImpl::SetAttributeFor(nsIAtom*,const nsHTMLValue&,nsIHTMLContent*,nsIHTMLAttributes*&) [nsHTMLStyleSheet.cpp:845] nsGenericHTMLElement::SetHTMLAttribute(nsIAtom*,const nsHTMLValue&,int) [nsGenericHTMLElement.cpp:661] nsGenericHTMLElement::SetAttribute(int,nsIAtom*,const nsString&,int) [nsGenericHTMLElement.cpp:578] nsHTMLFormElement::SetAttribute(int,nsIAtom*,const nsString&,int) [nsHTMLFormElement.cpp:101] AddAttributes(const nsIParserNode&,nsIHTMLContent*,nsIScriptContextOwner*) [nsHTMLContentSink.cpp:473] SinkContext::AddLeaf(const nsIParserNode&) [nsHTMLContentSink.cpp:1059] HTMLContentSink::AddLeaf(const nsIParserNode&) [nsHTMLContentSink.cpp:1884] HTMLContentSink::OpenForm(const nsIParserNode&) [nsHTMLContentSink.cpp:1751] CNavDTD::OpenForm(const nsIParserNode&) [CNavDTD.cpp:2166] CNavDTD::OpenContainer(const nsIParserNode&,int) [CNavDTD.cpp:2312] CNavDTD::HandleDefaultStartToken(CToken*,nsHTMLTag,nsIParserNode&) [CNavDTD.cpp:906] CNavDTD::HandleStartToken(CToken*) [CNavDTD.cpp:1064] NavDispatchTokenHandler(CToken*,nsIDTD*) [CNavDTD.cpp:247] CTokenHandler::operator ()(CToken*,nsIDTD*) [nsTokenHandler.cpp:80] CNavDTD::HandleToken(CToken*,nsIParser*) [CNavDTD.cpp:594] CNavDTD::BuildModel(nsIParser*,nsITokenizer*,nsITokenObserver*,nsIContentSink*) [CNavDTD.cpp:501] nsParser::BuildModel() [nsParser.cpp:799] nsParser::ResumeParse(nsIDTD*) [nsParser.cpp:751] nsParser::OnDataAvailable(nsIURL*,nsIInputStream*,unsigned int) [nsParser.cpp:963] nsDocumentBindInfo::OnDataAvailable(nsIURL*,nsIInputStream*,unsigned int) [nsDocLoader.cpp:1783] stub_put_block(_NET_StreamClass*,const char*,int) [nsStubContext.cpp:647] net_read_file_chunk [mkfile.c:956] net_ProcessFile [mkfile.c:1327] NET_ProcessNet [mkgeturl.c:3371] * Block of 52 bytes (2 times); last block at 0x612580
Is this one related? MLK: 64 bytes leaked in 4 blocks * This memory was allocated from: malloc [rtlib.o] __bUiLtIn_nEw [libgcc.a] __builtin_new [rtlib.o] HTMLAttributesImpl::SetAttribute(nsIAtom*,const nsString&,int&) [nsHTMLAttributes.cpp:542] HTMLStyleSheetImpl::SetAttributeFor(nsIAtom*,const nsString&,nsIHTMLContent*,nsIHTMLAttributes*&) [nsHTMLStyleSheet.cpp:703] nsGenericHTMLElement::SetAttribute(int,nsIAtom*,const nsString&,int) [nsGenericHTMLElement.cpp:587] nsHTMLFormElement::SetAttribute(int,nsIAtom*,const nsString&,int) [nsHTMLFormElement.cpp:101] AddAttributes(const nsIParserNode&,nsIHTMLContent*,nsIScriptContextOwner*) [nsHTMLContentSink.cpp:473] SinkContext::AddLeaf(const nsIParserNode&) [nsHTMLContentSink.cpp:1059] HTMLContentSink::AddLeaf(const nsIParserNode&) [nsHTMLContentSink.cpp:1884] HTMLContentSink::OpenForm(const nsIParserNode&) [nsHTMLContentSink.cpp:1751] CNavDTD::OpenForm(const nsIParserNode&) [CNavDTD.cpp:2166] CNavDTD::OpenContainer(const nsIParserNode&,int) [CNavDTD.cpp:2312] CNavDTD::HandleDefaultStartToken(CToken*,nsHTMLTag,nsIParserNode&) [CNavDTD.cpp:906] CNavDTD::HandleStartToken(CToken*) [CNavDTD.cpp:1064] NavDispatchTokenHandler(CToken*,nsIDTD*) [CNavDTD.cpp:247] CTokenHandler::operator ()(CToken*,nsIDTD*) [nsTokenHandler.cpp:80] CNavDTD::HandleToken(CToken*,nsIParser*) [CNavDTD.cpp:594] CNavDTD::BuildModel(nsIParser*,nsITokenizer*,nsITokenObserver*,nsIContentSink*) [CNavDTD.cpp:501] nsParser::BuildModel() [nsParser.cpp:799] nsParser::ResumeParse(nsIDTD*) [nsParser.cpp:751] nsParser::OnDataAvailable(nsIURL*,nsIInputStream*,unsigned int) [nsParser.cpp:963] nsDocumentBindInfo::OnDataAvailable(nsIURL*,nsIInputStream*,unsigned int) [nsDocLoader.cpp:1783] stub_put_block(_NET_StreamClass*,const char*,int) [nsStubContext.cpp:647] net_read_file_chunk [mkfile.c:956] net_ProcessFile [mkfile.c:1327] NET_ProcessNet [mkgeturl.c:3371] NET_PollSockets [mkselect.c:298] nsNetlibService::NetPollSocketsCallback(nsITimer*,void*) [nsNetService.cpp:1217] TimerImpl::FireTimeout() [nsTimer.cpp:73] * Block of 16 bytes (4 times); last block at 0x6b41f8
Assignee: troy → karnaze
Form related
Status: NEW → ASSIGNED
Target Milestone: M4
Target Milestone: M4 → M5
Moving to M5
Target Milestone: M5 → M6
Reassigning to Eric, moving to M6.
Moving to M8.
Assignee: karnaze → pollmann
Status: ASSIGNED → NEW
Reassigning to Eric.
I'm arbitrarily declaring M8 my UMR/MLK milestone. :)
I still haven't got Purify working on Solaris, and won't receive Purify for NT for a few weeks. Marking these M10
Summary: MLK: Leaking some HTML attributes → MLK: 104 bytes leaked- Leaking some HTML attributes
Blocks: 14516
After careful consideration, I've decided that I probably won't get this bug in for M12. Currently I have nearly 50 bugs scheduled for M13, so there is a possibility that this bug may need to be moved out farther still.
Target Milestone: M13 → M14
Triaged to M14
Keywords: mlk
Moving off to M16 - please speak up of you need this for M14, thanks!
Target Milestone: M14 → M16
Rescheduling (*sigh*) Some of these are from M4. I wonder if they are all still valid?
Target Milestone: M16 → M17
Since HTMLAttributesImpl are refcounted objects, I don't think this bug contains any information about finding a leak, and since there are no steps to reproduce, I think it should be marked WORKSFORME. (Which I may do myself if I don't hear any objection.) There have been soooo many changes since this was filed. At some point I'm planning (yeah, right...) to go through the top100 a little more carefully for leaks, and if I see any HTMLAttributesImpl leaked there, I'll file new bugs.
I agree that this is a very difficult bug to go on - the only information here is that the attribute that was leaked was created when the content sink opened up the form. Without a URL or small set of URL's to test on, it's going to be nearly impossible to tell where the stray reference leaked in that caused the leak. Bruce, any chance you remember? ;) (Come on, it's only been 15 months...) If not, I guess we should close this out and to more systematic leak checking as David proposed above.
Ah, Bruce, we value you too much to make you try to remember the URL :) I'll close this out for now and we'll catch the HTML Attr leaks anew!
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → WORKSFORME
Yay!
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.