Closed
Bug 141468
Opened 22 years ago
Closed 22 years ago
Mismatched free() / delete / delete [] at nsHashtable::~nsHashtable(void)
Categories
(Core :: XPCOM, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: pj, Assigned: masaki.katakai)
References
()
Details
How to reproduce: Start mozilla and quit with ^q. ==31521== Mismatched free() / delete / delete [] ==31521== at 0x404B6D87: nsHashtable::~nsHashtable(void) (nsHashtable.cpp:253) ==31521== by 0x450C0711: FreeGlobals(void) (nsFontMetricsGTK.cpp:752) ==31521== by 0x450C2CD5: nsFontMetricsGTK::~nsFontMetricsGTK(void) (nsFontMetricsGTK.cpp:1200) ==31521== by 0x450C2E89: nsFontMetricsGTK::Release(void) (nsFontMetricsGTK.cpp:1204) ==31521== by 0x40315C53: nsFontCache::Flush(void) (nsDeviceContext.cpp:699) ==31521== by 0x4031548C: DeviceContextImpl::FlushFontCache(void) (nsDeviceContext.cpp:522) ==31521== by 0x4619EE8E: DocumentViewerImpl::Hide(void) (nsDocumentViewer.cpp:2096) ==31521== by 0x4748A892: nsHTMLFrameInnerFrame::~nsHTMLFrameInnerFrame(void) (nsFrameFrame.cpp:713) ==31521== by 0x473FF6C6: nsFrame::Destroy(nsIPresContext *) (nsFrame.cpp:464) ==31521== by 0x4759EFA2: nsFrameList::DestroyFrames(nsIPresContext *) (nsFrameList.cpp:130) ==31521== Address 0x42205E5C is 0 bytes inside a block of size 44 alloc'd ==31521== at 0x4004519B: malloc (vg_clientfuncs.c:100) ==31521== by 0x450DC7DC: ??? (../../gcc-2.95.3/gcc/cp/new1.cc:78) ==31521== by 0x450C2241: InitGlobals(void) (nsFontMetricsGTK.cpp:1047) ==31521== by 0x450C31DC: nsFontMetricsGTK::Init(nsFont const &, nsIAtom *, nsIDeviceContext *) (nsFontMetricsGTK.cpp:1259) ==31521== by 0x403158A2: nsFontCache::GetMetricsFor(nsFont const &, nsIAtom *, nsIFontMetrics *&) (nsDeviceContext.cpp:616) ==31521== by 0x4031481C: DeviceContextImpl::GetMetricsFor(nsFont const &, nsIAtom *, nsIFontMetrics *&) (nsDeviceContext.cpp:291) ==31521== by 0x47423FCB: ComputeLineHeight(nsIPresContext *, nsIRenderingContext *, nsIStyleContext *) (nsHTMLReflowState.cpp:2289) ==31521== by 0x47424222: nsHTMLReflowState::CalcLineHeight(nsIPresContext *, nsIRenderingContext *, nsIFrame *) (nsHTMLReflowState.cpp:2335) ==31521== by 0x473F49D4: nsBlockReflowState::nsBlockReflowState(nsHTMLReflowState const &, nsIPresContext *, nsBlockFrame *, nsHTMLReflowMetrics const &, int) (nsBlockReflowState.cpp:178) ==31521== by 0x473E4CAB: nsBlockFrame::Reflow(nsIPresContext *, nsHTMLReflowMetrics &, nsHTMLReflowState const &, unsigned int &) (nsBlockFrame.cpp:753)
The leak is happening in FreeGlobals(..) in nsFontMetricsGTK.cpp. All the nsHashtable variables are calling their Reset method(..), except for gSpecialCharsets and gAliases. Reassigning to bstell for now. Please reassign as necessary.
Assignee: neeti → bstell
Comment 4•22 years ago
|
||
If I read cvsblame correctly gSpecialCharsets and gAliases were added by Erik.
Comment 5•22 years ago
|
||
reassign to katakai- katakai- can you help to fix this memory leak. thanks
Assignee: ftang → katakai
Assignee | ||
Updated•22 years ago
|
Status: NEW → ASSIGNED
Reporter | ||
Comment 6•22 years ago
|
||
This seems to have been fixed. Maybe string changes here too. Closing as worksforme. http://www.ludd.luth.se/~pj/mozilla/valgrind/valgrind.out.long.0721
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → WORKSFORME
Assignee | ||
Comment 7•22 years ago
|
||
Thanks for Peter, Btw, how do I get such leak information? --enable-leaky?
Reporter | ||
Comment 8•22 years ago
|
||
Valgrind, a memory debugger for Linux/x86. http://developer.kde.org/~sewardj.
You need to log in
before you can comment on or make changes to this bug.
Description
•