Closed
Bug 70286
Opened 24 years ago
Closed 22 years ago
crash in [@ PluginArrayImpl::GetLength]
Categories
(Core Graveyard :: Plug-ins, defect)
Tracking
(Not tracked)
VERIFIED
WORKSFORME
Future
People
(Reporter: shrir, Assigned: serhunt)
Details
(Keywords: crash)
Crash Data
Filing this bug from the top stack trace from 6.01 No exact steps to reproduce this bug are mentioned in the user comments :( Stack Trace: PluginArrayImpl::GetLength [d:\builds\6.01\mozilla\dom\src\base\nsPluginArray.cpp line 110] MimeTypeArrayImpl::GetMimeTypes [d:\builds\6.01\mozilla\dom\src\base\nsMimeTypeArray.cpp line 165] MimeTypeArrayImpl::NamedItem [d:\builds\6.01\mozilla\dom\src\base\nsMimeTypeArray.cpp line 131] GetMimeTypeArrayProperty [d:\builds\6.01\mozilla\dom\src\base\nsJSMimeTypeArray.cpp line 117] js_GetProperty [d:\builds\6.01\mozilla\js\src\jsobj.c line 2048] js_Interpret [d:\builds\6.01\mozilla\js\src\jsinterp.c line 2471] js_Execute [d:\builds\6.01\mozilla\js\src\jsinterp.c line 994] JS_EvaluateUCScriptForPrincipals [d:\builds\6.01\mozilla\js\src\jsapi.c line 3148] nsJSContext::EvaluateString [d:\builds\6.01\mozilla\dom\src\base\nsJSEnvironment.cpp line 592] HTMLContentSink::EvaluateScript [d:\builds\6.01\mozilla\layout\html\document\src\nsHTMLContentSink.cpp line 4590] HTMLContentSink::ProcessSCRIPTTag [d:\builds\6.01\mozilla\layout\html\document\src\nsHTMLContentSink.cpp line 4939] HTMLContentSink::AddLeaf [d:\builds\6.01\mozilla\layout\html\document\src\nsHTMLContentSink.cpp line 3157] CNavDTD::AddLeaf [d:\builds\6.01\mozilla\htmlparser\src\CNavDTD.cpp line 3711] CNavDTD::HandleScriptToken [d:\builds\6.01\mozilla\htmlparser\src\CNavDTD.cpp line 2152] CNavDTD::OpenContainer [d:\builds\6.01\mozilla\htmlparser\src\CNavDTD.cpp line 3379] 0x0a280070
Futuring this till we have reproduceable steps and/or a testcase.
Summary: crash in PluginArrayImpl::GetLength → crash in PluginArrayImpl::GetLength
Target Milestone: --- → Future
Comment 2•23 years ago
|
||
Shrir, Is this a talkback reports? We could probably take a stab at fixing it.
Reporter | ||
Comment 3•23 years ago
|
||
yeah, it;s from he 6.01 talkback list that the guys forwarded.. no steps for reproducing this crash were given :(
Comment 4•23 years ago
|
||
I don't see any possible way this can fail: 117 NS_IMETHODIMP 118 PluginArrayImpl::GetLength(PRUint32* aLength) 119 { 120 if (mPluginHost && NS_SUCCEEDED(mPluginHost->GetPluginCount(aLength))) 121 return NS_OK; 122 return NS_ERROR_FAILURE; 123 } Looks bullet proof already. I nominate WFM?
It will crash in nsPluginHostImpl::GetPluginCount if aLength is zero. But it is not shown in the call stack. I cannot see any other reasons. We should probably do the following: NS_IMETHODIMP PluginArrayImpl::GetLength(PRUint32* aLength) { + NS_ENSURE_ARG_POINTER(aLength); if (mPluginHost && NS_SUCCEEDED(mPluginHost->GetPluginCount(aLength))) return NS_OK; return NS_ERROR_FAILURE; }
Comment 6•23 years ago
|
||
But aLength is a return value. It can be null or even garbage or am I missing something?
This is a pointer to a place for the return value. In nsPluginHostImpl::GetPluginCount it will do something like *aLength = somevalue; which to me looks like a crasher.
But aLength is not being deref'd here, just being passed on down. Perhaps mPluginHost is non-NULL but invalid?
It is being passed down to nsPluginHostImpl::GetPluginCount where it gets dereferenced.
Comment 10•23 years ago
|
||
Looks good time r=peterl Check-in to avoid crash.
Assignee | ||
Comment 11•23 years ago
|
||
Moving to 0.9 as it seems an easy one.
Status: NEW → ASSIGNED
Whiteboard: Fix in hand
Target Milestone: Future → mozilla0.9
Comment 12•23 years ago
|
||
sr=waterson
Comment 13•23 years ago
|
||
MimeTypeArrayImpl::GetMimeTypes() never calls GetLength() with a null pointer, adding the null check does not fix the real problem here.
Assignee | ||
Comment 14•23 years ago
|
||
We can check it anyway, will not hurt. So the problem is definitely mPluginHost being invalid although non-zero. Get/Release every time it is needed?
Assignee | ||
Comment 15•23 years ago
|
||
Johnny, can you reproduce this?
Comment 16•23 years ago
|
||
I haven't even tried reproducing this problem.
Assignee | ||
Comment 17•23 years ago
|
||
Futuring till we are able to reproduce it.
Keywords: nsenterprise
Comment 19•23 years ago
|
||
This bug has no testcase and yet it has the testcase keyword.
Comment 21•22 years ago
|
||
I coudn't find any more crashes in talkback with this stack so I'm marking WFM. Feel free to reopen but we could really use a testcase.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → WORKSFORME
Summary: crash in PluginArrayImpl::GetLength → crash in [@ PluginArrayImpl::GetLength]
Updated•13 years ago
|
Crash Signature: [@ PluginArrayImpl::GetLength]
Updated•2 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•