Closed Bug 268874 Opened 20 years ago Closed 19 years ago

memory leak in nsHTMLContentSink.cpp

Categories

(SeaMonkey :: General, defect)

x86
Linux
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED EXPIRED

People

(Reporter: andrew.tong, Unassigned)

Details

(Keywords: memory-leak)

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a5) Gecko/20041103
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a5) Gecko/20041103

we detect memory leak in mozilla1.7 on sparc using libumem.so and mdb.
Here is the output we got:
5360 bytes for 134 allocations with data size 40:
         libumem.so.1`umem_cache_alloc+0x210
         libumem.so.1`umem_alloc+0x60
         libumem.so.1`malloc+0x28
         libCrun.so.1`void*operator new+0x28
         libgklayout.so`unsigned NS_NewTextNode+0x2c
         libgklayout.so`unsigned SinkContext::FlushText+0x248
         libgklayout.so`unsigned SinkContext::FlushTextAndRelease+0x20
         libgklayout.so`unsigned SinkContext::OpenContainer+0x34
         libgklayout.so`unsigned HTMLContentSink::OpenContainer+0x70
         libhtmlpars.so`unsigned CNavDTD::OpenContainer+0x470
         libhtmlpars.so`unsigned CNavDTD::HandleDefaultStartToken+0x5ec
         libhtmlpars.so`unsigned CNavDTD::HandleStartToken+0x518
         libhtmlpars.so`unsigned CNavDTD::HandleToken+0x8cc
         libhtmlpars.so`unsigned CNavDTD::BuildModel+0x4f8
         libhtmlpars.so`unsigned nsParser::BuildModel+0x130

Reproducible: Always
Steps to Reproduce:
1.export LD_PRELOAD=libumem.so
  export UMEM_DEBUG=default
2../mozilla -g -d mdb
3.run mozilla and get the output

Actual Results:  
memory leak happens.
Severity: normal → critical
Keywords: mlk
That's weird, mLastTextNode is an nsCOMPtr<> member, it's not necessary to
release it in the destructor since nsCOMPtr<> destructor for that member
variable should be called and the pointer should be released automatically:
http://lxr.mozilla.org/aviarybranch/source/content/html/document/src/nsHTMLContentSink.cpp#744
Product: Browser → Seamonkey
Bernard, this may be a cycle.  The node (mStack) may hold onto the sink. 
Clearing the reference break the cycle and may fix the leak.
The only thing holding on to the sink ought to be the parser, which is held on
to by the document.  The latter ref is dropped in EndLoad(), however.

I'd be curious to know what XPCOM refcount logging says in this case.
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Firefox:     http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey:   http://www.mozilla.org/projects/seamonkey/
This bug has been automatically resolved after a period of inactivity (see above
comment). If anyone thinks this is incorrect, they should feel free to reopen it.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → EXPIRED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: