Closed
Bug 252345
Opened 20 years ago
Closed 20 years ago
Memory leak in nsXMLHttpRequest.cpp (seen when using GMail)
Categories
(Core Graveyard :: Web Services, defect)
Core Graveyard
Web Services
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: pkwarren, Assigned: pkwarren)
References
Details
(Keywords: fixed-aviary1.0, fixed1.7.5, memory-leak)
Attachments
(1 file)
605 bytes,
patch
|
peterv
:
review+
darin.moz
:
superreview+
asa
:
approval-aviary+
asa
:
approval1.7.5+
|
Details | Diff | Splinter Review |
In nsXMLHttpRequest::ConvertBodyToText, a PRUnichar string is allocated with
nsMemory::Alloc, assigned into a returned buffer, but never freed.
Here is the trace from valgrind:
4244 bytes in 1 blocks are definitely lost in loss record 463 of 528
at 0x1B9046D0: malloc (vg_replace_malloc.c:109)
by 0x1B9E28AF: PR_Malloc (prmem.c:436)
by 0x1BE7860B: nsMemoryImpl::Alloc(unsigned) (nsMemoryImpl.cpp:325)
by 0x8080EE6: nsMemory::Alloc(unsigned) (nsMemory.cpp:87)
by 0x1C50632A: nsXMLHttpRequest::ConvertBodyToText(nsAString&)
(nsXMLHttpRequest.cpp:553)
by 0x1C506597: nsXMLHttpRequest::GetResponseText(nsAString&)
(nsXMLHttpRequest.cpp:605)
by 0x1BE8F600: XPTC_InvokeByIndex (xptcinvoke_gcc_x86_unix.cpp:69)
by 0x1C915CB6: XPCWrappedNative::CallMethod(XPCCallContext&,
XPCWrappedNative::CallMode) (xpcwrappednative.cpp:2027)
by 0x1C92116F: XPCWrappedNative::GetAttribute(XPCCallContext&)
(xpcprivate.h:1887)
by 0x1C920044: XPC_WN_GetterSetter(JSContext*, JSObject*, unsigned, long*,
long*) (xpcwrappednativejsops.cpp:1319)
Assignee | ||
Comment 1•20 years ago
|
||
Assignee: web-services → pkwarren
Status: NEW → ASSIGNED
Assignee | ||
Updated•20 years ago
|
Attachment #153835 -
Flags: review?(peterv)
Updated•20 years ago
|
Attachment #153835 -
Flags: review?(peterv) → review+
Assignee | ||
Updated•20 years ago
|
Attachment #153835 -
Flags: superreview?(darin)
Updated•20 years ago
|
Attachment #153835 -
Flags: superreview?(darin) → superreview+
Assignee | ||
Comment 3•20 years ago
|
||
Fixed.
Checking in nsXMLHttpRequest.cpp;
/cvsroot/mozilla/extensions/xmlextras/base/src/nsXMLHttpRequest.cpp,v <--
nsXMLHttpRequest.cpp
new revision: 1.115; previous revision: 1.114
done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Comment 4•20 years ago
|
||
It is a fixed memory leak bug, could it be considered for 1.7.2 ?
Flags: blocking1.7.2?
Comment 5•20 years ago
|
||
(In reply to comment #2)
> in the old days one might have used adopt if the allocator fit...
Adopt is not a method on nsAString unfortunately :-(
Comment 6•20 years ago
|
||
1.7.3 is done, I'd like this small memory leak to be fixed for Firefox 1.0
Flags: blocking1.7.x? → blocking-aviary1.0?
Attachment #153835 -
Flags: approval1.7.x?
Comment 7•20 years ago
|
||
*** Bug 264901 has been marked as a duplicate of this bug. ***
Comment 8•20 years ago
|
||
Comment on attachment 153835 [details] [diff] [review]
Patch v1
Whoa. Given gmail, I think we should get this on the branches. Are there any
known regressions?
Attachment #153835 -
Flags: approval-aviary?
Comment 9•20 years ago
|
||
Comment on attachment 153835 [details] [diff] [review]
Patch v1
a=asa for branches checkins.
Attachment #153835 -
Flags: approval1.7.x?
Attachment #153835 -
Flags: approval1.7.x+
Attachment #153835 -
Flags: approval-aviary?
Attachment #153835 -
Flags: approval-aviary+
Comment 10•20 years ago
|
||
Checked in on 1.7/aviary branches.
Flags: blocking-aviary1.0?
Keywords: fixed-aviary1.0,
fixed1.7.x
Updated•7 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•