Closed
Bug 106858
Opened 24 years ago
Closed 1 years ago
Memory leak of 8 bytes in nsMemory::Alloc
Categories
(MailNews Core :: LDAP Integration, defect, P3)
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: stephend, Unassigned)
References
Details
(Keywords: memory-leak)
While verifying bug 103085, I found the following leak:
Trunk CVS pull @8pm (tonight), Windows 2000.
Using the autocomplete setup provided by hong@netscape.com.
Steps to Reproduce:
1. Mozilla.exe -compose.
2. Type dmos (it'll complete to Dan Mosedale <dmose@netscape.com>).
3. Tab to subject.
4. Exit.
[W] MLK: Memory leak of 8 bytes from 2 blocks allocated in PR_Malloc
Distribution of leaked blocks
Allocation location
malloc+0xc [C:\WINNT\SYSTEM32\msvcrt.DLL ip=0x580013eb]
PR_Malloc+0x2c [.\../../../../pr/src/malloc/prmem.c:50 ip=0x30018c5c]
nsMemory::Alloc(UINT)+0x9a
[c:\moz_src\mozilla\xpcom\base\nsMemoryImpl.cpp:556 ip=0x1003bba1]
if (gMemory == nsnull) {
EnsureGlobalMemoryService();
}
=> return gMemory->Alloc(size);
}
NS_EXPORT void*
nsAbLDAPAutoCompFormatter::GetAttributes(UINT *,char * * *)+0x204
[c:\moz_src\mozilla\mailnews\addrbook\src\nsAbLDAPAutoCompFormatter.cpp:414
ip=0x0d45e5b2]
//
while (rawSearchAttrsSize < count) {
if (!(rawSearchAttrs[rawSearchAttrsSize] =
=> ToNewCString(*(mSearchAttrs.CStringAt(rawSearchAttrsSize)))))
{
NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(rawSearchAttrsSize,
rawSearchAttrs);
NS_ERROR("nsAbLDAPAutoCompFormatter::GetAttributes(): out "
nsLDAPAutoCompleteSession::SetFormatter(nsILDAPAutoCompFormatter *)+0xb1
[c:\moz_src\mozilla\xpfe\components\autocomplete\src\nsLDAPAutoCompleteSession.c
pp:1368 ip=0x0898c797]
// get and cache the attributes that will be used to do lookups
//
=> nsresult rv = mFormatter->GetAttributes(&mSearchAttrsSize,
&mSearchAttrs);
if (NS_FAILED(rv)) {
NS_ERROR("nsLDAPAutoCompleteSession::SetFormatter(): "
" mFormatter->GetAttributes failed");
XPTC_InvokeByIndex+0x75
[c:\moz_src\mozilla\xpcom\reflect\xptcall\src\md\win32\xptcinvoke.cpp:152
ip=0x100d36e2]
XPCWrappedNative::CallMethod(XPCCallContext&,CallMode::XPCWrappedNative)
+0x10bf [c:\moz_src\mozilla\js\src\xpconnect\src\xpcwrappednative.cpp:1951
ip=0x0470a122]
XPC_WN_GetterSetter(JSContext *,JSObject *,UINT,long *,long *)+0x1b0
[c:\moz_src\mozilla\js\src\xpconnect\src\xpcwrappednativejsops.cpp:1290
ip=0x04714ca2]
js_Invoke+0xba4 [c:\moz_src\mozilla\js\src\jsinterp.c:809
ip=0x0442cacc]
js_InternalInvoke+0x1a8 [c:\moz_src\mozilla\js\src\jsinterp.c:901
ip=0x0442d32b]
js_SetProperty+0x10e4 [c:\moz_src\mozilla\js\src\jsobj.c:2681 ip=0x04452537]
js_Interpret+0x9bad [c:\moz_src\mozilla\js\src\jsinterp.c:2611
ip=0x0443799e]
js_Invoke+0xc57 [c:\moz_src\mozilla\js\src\jsinterp.c:826
ip=0x0442cb7f]
js_InternalInvoke+0x1a8 [c:\moz_src\mozilla\js\src\jsinterp.c:901
ip=0x0442d32b]
JS_CallFunctionValue+0x42 [c:\moz_src\mozilla\js\src\jsapi.c:3410
ip=0x043ec41a]
nsJSContext::CallEventHandler(void *,void *,UINT,void *,int *,int)+0x2ad
[c:\moz_src\mozilla\dom\src\base\nsJSEnvironment.cpp:977 ip=0x05b4b132]
nsJSEventListener::HandleEvent(nsIDOMEvent *)+0x64e
[c:\moz_src\mozilla\dom\src\events\nsJSEventListener.cpp:155 ip=0x05b97daa]
nsEventListenerManager::HandleEventSubType(nsListenerStruct *,nsIDOMEvent
*,nsIDOMEventTarget *,UINT,UINT)+0x870
[c:\moz_src\mozilla\content\events\src\nsEventListenerManager.cpp:1213
ip=0x056ae22b]
nsEventListenerManager::HandleEvent(nsIPresContext *,nsEvent *,nsIDOMEvent
* *,nsIDOMEventTarget *,UINT,nsEventStatus *)+0x282d
[c:\moz_src\mozilla\content\events\src\nsEventListenerManager.cpp:1814
ip=0x056b0b7c]
nsXULElement::HandleDOMEvent(nsIPresContext *,nsEvent *,nsIDOMEvent *
*,UINT,nsEventStatus *)+0x144d
[c:\moz_src\mozilla\content\xul\content\src\nsXULElement.cpp:3387 ip=0x055e309f]
Updated•23 years ago
|
Status: NEW → ASSIGNED
Priority: -- → P3
Target Milestone: --- → mozilla0.9.7
Updated•23 years ago
|
Target Milestone: mozilla0.9.7 → mozilla0.9.8
Comment 2•23 years ago
|
||
Mass change: pushing out; as I'm concentrating on feature work at the moment.
Target Milestone: mozilla0.9.8 → mozilla0.9.9
Updated•23 years ago
|
Updated•23 years ago
|
Reporter | ||
Updated•22 years ago
|
QA Contact: gchan → stephend
Target Milestone: mozilla1.2alpha → ---
Updated•20 years ago
|
Product: MailNews → Core
Updated•20 years ago
|
Component: MailNews: LDAP Integration → Address Book
Product: Core → Thunderbird
Target Milestone: --- → Thunderbird1.1
Updated•20 years ago
|
Assignee: dmose → nobody
Status: ASSIGNED → NEW
Component: Address Book → MailNews: LDAP Integration
Product: Thunderbird → Core
Target Milestone: Thunderbird1.1 → ---
Comment 4•18 years ago
|
||
(In reply to comment #3)
> how does one test this?
One has IBM (Rational) Purify, and runs through the steps in comment 0...
Comment 5•18 years ago
|
||
(In reply to comment #3)
> how does one test this?
>
valgrind on linux is quite nice too for catching heap memory usage errors and leaks.
Assignee | ||
Updated•17 years ago
|
Product: Core → MailNews Core
Updated•15 years ago
|
Severity: normal → minor
Updated•3 years ago
|
Severity: minor → S4
Comment 6•1 years ago
|
||
ldap has been reimplemented
Status: NEW → RESOLVED
Closed: 1 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•