Closed
Bug 3731
Opened 26 years ago
Closed 26 years ago
MLK: Leaking HTTP URLs.
Categories
(Core :: Networking, defect, P3)
Core
Networking
Tracking
()
VERIFIED
FIXED
People
(Reporter: bruce, Assigned: gagan)
Details
(Whiteboard: waiting for reporter's OK)
Build/pull from March 14, 1999.
MLK: 240 bytes leaked in 3 blocks
* This memory was allocated from:
malloc [rtlib.o]
__bUiLtIn_nEw [libgcc.a]
__builtin_new [rtlib.o]
nsHttpURLFactory::CreateURL(nsIURL**,const nsString&,const
nsIURL*,nsISupports*,nsIURLGroup*) [nsHttpURLFactory.cpp:70]
nsNetlibService::CreateURL(nsIURL**,const nsString&,const
nsIURL*,nsISupports*,nsIURLGroup*) [nsNetService.cpp:1040]
NS_NewURL(nsIURL**,const nsString&,const
nsIURL*,nsISupports*,nsIURLGroup*) [nsNetService.cpp:1107]
NS_MakeAbsoluteURL(nsIURL*,const nsString&,const nsString&,nsString&)
[nsNetService.cpp:1130]
SelectorMatches(nsIPresContext*,nsCSSSelector*,nsIContent*)
[nsCSSStyleSheet.cpp:1135]
ContentEnumFunc(nsICSSStyleRule*,void*) [nsCSSStyleSheet.cpp:1249]
RuleHash::EnumerateAllRules(nsIAtom*,nsIAtom*,const
nsVoidArray&,void(*)(nsICSSStyleRule*,void*),void*) [nsCSSStyleSheet.cpp:307]
CSSStyleSheetImpl::RulesMatching(nsIPresContext*,nsIContent*,nsIStyleContext*,ns
ISupportsArray*) [nsCSSStyleSheet.cpp:1331]
StyleSetImpl::RulesMatching(nsISupportsArray*,nsIPresContext*,nsIAtom*,nsIConten
t*,nsIStyleContext*,nsISupportsArray*) [nsStyleSet.cpp:419]
StyleSetImpl::ResolveStyleFor(nsIPresContext*,nsIContent*,nsIStyleContext*,int)
[nsStyleSet.cpp:536]
nsPresContext::ResolveStyleContextFor(nsIContent*,nsIStyleContext*,int,nsIStyleC
ontext**) [nsPresContext.cpp:384]
nsCSSFrameConstructor::ResolveStyleContext(nsIPresContext*,nsIFrame*,nsIContent*
,nsIAtom*,nsIStyleContext**) [nsCSSFrameConstructor.cpp:2829]
nsCSSFrameConstructor::ConstructFrame(nsIPresContext*,nsIContent*,nsIFrame*,nsAb
soluteItems&,nsFrameItems&,nsAbsoluteItems&,nsAbsoluteItems&)
[nsCSSFrameConstructor.cpp:2852]
nsCSSFrameConstructor::ContentAppended(nsIPresContext*,nsIContent*,int)
[nsCSSFrameConstructor.cpp:3133]
StyleSetImpl::ContentAppended(nsIPresContext*,nsIContent*,int)
[nsStyleSet.cpp:738]
PresShell::ContentAppended(nsIDocument*,nsIContent*,int)
[nsPresShell.cpp:1592]
nsDocument::ContentAppended(nsIContent*,int) [nsDocument.cpp:1233]
nsHTMLDocument::ContentAppended(nsIContent*,int)
[nsHTMLDocument.cpp:683]
HTMLContentSink::WillInterrupt() [nsHTMLContentSink.cpp:1500]
CNavDTD::WillInterruptParse() [CNavDTD.cpp:2721]
nsParser::ResumeParse(nsIDTD*) [nsParser.cpp:757]
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_MemCacheWrite [mkmemcac.c:664]
net_pull_http_data [mkhttp.c:3097]
net_ProcessHTTP [mkhttp.c:3489]
* Block of 80 bytes (3 times); last block at 0xc143b8
Reporter | ||
Comment 1•26 years ago
|
||
SelectorMatches() in nsCSSStyleSheet.cpp looks like it should be releasing it
(but isn't?).
Updated•26 years ago
|
Assignee: peterl → gagan
Component: Style System → Networking Library
Comment 2•26 years ago
|
||
I believe the actual leak is in nsHttpURLFactory.cpp:
NS_IMETHODIMP
nsHttpURLFactory::CreateURL(nsIURL* *aResult,
const nsString& aSpec,
const nsIURL* aContextURL,
nsISupports* aContainer,
nsIURLGroup* aGroup)
{
nsHttpUrlImpl* url = new nsHttpUrlImpl(aContainer, aGroup);
if (url == NULL)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(url);
nsresult err = url->ParseURL(aSpec, aContextURL);
if (err != NS_OK)
return err;
If the ParseURL call returns an error then the newly created URL will leak.
Reporter | ||
Comment 3•26 years ago
|
||
I will patch this and see if that fixes the problem and report back to save
Gagan the time. Gagan: I'll have an answer for you by tomorrow morning PST
hopefully.
Updated•26 years ago
|
QA Contact: 4110 → 3819
Reporter | ||
Comment 4•26 years ago
|
||
That seemed to do it for me in a cursory look.
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Updated•26 years ago
|
Whiteboard: waiting for reporter's OK
Comment 7•26 years ago
|
||
bruce, can you verify that the leak is gone? Thanks.
This just landed now. Sorry I forgot to mention that I fixed it on the branch
N2. But checkout the latest and try.
Reporter | ||
Comment 9•26 years ago
|
||
I'll do this either late tonight or early in the morning tomorrow. (along with
other N2 stuff!)
Reporter | ||
Updated•26 years ago
|
Status: RESOLVED → VERIFIED
Reporter | ||
Comment 10•26 years ago
|
||
Looks good.
Comment 11•25 years ago
|
||
Changing all Networking Library/Browser bugs to Networking-Core component for
Browser.
Occasionally, Bugzilla will burp and cause Verified bugs to reopen when I do
this in a bulk change. If this happens, I will fix. ;-)
Comment 12•25 years ago
|
||
Bulk move of all Networking-Core (to be deleted component) bugs to new
Networking component.
You need to log in
before you can comment on or make changes to this bug.
Description
•