Closed
Bug 11666
Opened 26 years ago
Closed 26 years ago
Eliminate plvector (was: [infinite loop] bugs - plvector.c)
Categories
(Core :: XPCOM, defect, P3)
Tracking
()
VERIFIED
FIXED
M13
People
(Reporter: jay, Assigned: scc-obsolete)
References
Details
Analysis of the code has determined possible infinite loop
or problem in the code below. See bug
http://bugzilla.mozilla.org/show_bug.cgi?id=11588
for more information
plvector.c:289: warning: unsigned value >= 0 is always 1
plvector.c:311: warning: unsigned value >= 0 is always 1
plvector.c:312: warning: unsigned value >= 0 is always 1
Updated•26 years ago
|
Assignee: wtc → warren
Comment 1•26 years ago
|
||
Reassigned bug to warren@netscape.com,
the author of plvector.c. The NSPR
group does not own this file.
Updated•26 years ago
|
Status: NEW → ASSIGNED
Target Milestone: M10
Comment 2•26 years ago
|
||
This bug should become: Eliminate plvector in favor of nsVector.
Cc'ing Brendan, and Norris (because I think this stuff was used by caps, but
maybe that's been fixed).
Comment 3•26 years ago
|
||
Sorry, I said nsVector, but I meant nsVoidArray.
Updated•26 years ago
|
Summary: [infinite loop] bugs - plvector.c → Eliminate plvector (was: [infinite loop] bugs - plvector.c)
Comment 4•26 years ago
|
||
Here's the list of nsVector (and indirectly plvector) users that should be
cleaned up:
nsVector
/editor/base/nsEditor.cpp, line 19 -- #include "nsVector.h"
/caps/include/nsCertificatePrincipal.h, line 21 -- #include "nsVector.h"
/caps/include/nsCertificatePrincipal.h, line 68 -- nsVector *
itsCertificateArray;
/caps/include/nsPrincipalArray.h, line 24 -- #include "nsVector.h"
/caps/include/nsPrincipalArray.h, line 63 -- nsVector * itsArray;
/caps/include/nsTarget.h, line 23 -- #include "nsVector.h"
/caps/include/nsPrivilegeManager.h, line 27 -- #include "nsVector.h"
/caps/src/nsPrincipalArray.cpp, line 39 -- this->itsArray = new nsVector();
/caps/src/nsPrincipalArray.cpp, line 75 -- if(!this->itsArray) this->itsArray =
new nsVector();
/caps/src/nsPrincipalArray.cpp, line 133 -- nsVector * in = new nsVector();
/caps/idl/nsITarget.idl, line 23 -- #include "nsVector.h"
/caps/idl/nsITarget.idl, line 24 -- typedef nsVector nsTargetArray;
/modules/oji/src/ProxyJNI.cpp, line 27 -- #include "nsVector.h"
/modules/oji/src/ProxyJNI.cpp, line 66 -- nsVector vec(0, 10);
/modules/oji/src/jvmmgr.cpp, line 414 --
JVM_GetJavaPrincipalsFromStackAsNSVector(JSStackFrame *pCurrentFrame)
/modules/oji/src/jvmmgr.cpp, line 467 -- ** nsVector. Use this vector to pass
into Tom's code to get to the JSPrinciapals
/modules/oji/src/jvmmgr.h, line 115 --
JVM_GetJavaPrincipalsFromStackAsNSVector(JSStackFrame *pCurrentFrame);
/modules/oji/src/lcglue.cpp, line 262 -- // TODO: Need raman's help. This needs
to convert between C++ [] array data type to a nsVector object.
/modules/oji/src/nsJNI.cpp, line 26 -- #include "nsVector.h"
/modules/oji/src/nsJNI.cpp, line 63 -- nsVector vec(10);
/modules/oji/src/nsJVMManager.cpp, line 274 -- fClassPathAdditions(new
nsVector()), fClassPathAdditionsString(NULL)
/modules/oji/src/nsJVMManager.h, line 34 -- #include "nsVector.h"
/modules/oji/src/nsJVMManager.h, line 225 -- nsVector* fClassPathAdditions;
/xpcom/components/nsServiceManager.cpp, line 20 -- #include "nsVector.h"
/xpcom/components/nsServiceManager.cpp, line 39 -- nsVector* mListeners; //
nsVector<nsIShutdownListener>
/xpcom/components/nsServiceManager.cpp, line 70 -- mListeners = new nsVector();
/xpcom/doc/TODO.html, line 150 -- <td>Replace use of nsVector (PL_Vector) with
nsISupportsArray</td>
/xpcom/ds/MANIFEST, line 27 -- nsVector.h
/xpcom/ds/Makefile.in, line 102 -- nsVector.h \
/xpcom/ds/makefile.win, line 53 -- nsVector.h \
/xpcom/ds/nsVector.h, line 19 -- #ifndef nsVector_h__
/xpcom/ds/nsVector.h, line 20 -- #define nsVector_h__
/xpcom/ds/nsVector.h, line 25 -- class nsVector : public PLVector {
/xpcom/ds/nsVector.h, line 28 -- nsVector(PRUint32 initialSize = 0, PRInt32
initialGrowBy = 0) {
/xpcom/ds/nsVector.h, line 31 -- ~nsVector(void) { PL_VectorFinalize(this); }
/xpcom/ds/nsVector.h, line 45 -- void Copy(nsVector* src, PRUint32 len,
PRUint32 dstPos = 0, PRUint32 srcPos = 0) {
/xpinstall/src/nsInstall.cpp, line 35 -- #include "nsVector.h"
/xpinstall/src/nsInstall.cpp, line 292 -- nsVector *paths = new nsVector();
/xpinstall/src/nsInstall.cpp, line 1213 -- mInstalledFiles = new nsVector();
/xpinstall/src/nsInstall.cpp, line 2087 -- nsInstall::ExtractDirEntries(const
nsString& directory, nsVector *paths)
/xpinstall/src/nsInstall.cpp, line 2142 -- nsInstall::DeleteVector(nsVector*
vector)
/xpinstall/src/nsInstall.h, line 39 -- #include "nsVector.h"
/xpinstall/src/nsInstall.h, line 263 -- nsVector* mInstalledFiles;
/xpinstall/src/nsInstall.h, line 287 -- PRInt32 ExtractDirEntries(const
nsString& directory, nsVector *paths);
/xpinstall/src/nsInstall.h, line 291 -- static void DeleteVector(nsVector*
vector);
/xpinstall/src/nsInstallTrigger.h, line 12 -- #include "nsVector.h"
/xpinstall/src/nsJSInstallTriggerGlobal.cpp, line 29 -- #include "nsVector.h"
/xpinstall/src/nsSoftwareUpdate.cpp, line 30 -- #include "nsVector.h"
/xpinstall/src/nsSoftwareUpdate.cpp, line 116 -- mJarInstallQueue = new
nsVector();
/xpinstall/src/nsSoftwareUpdate.h, line 12 -- #include "nsVector.h"
/xpinstall/src/nsSoftwareUpdate.h, line 75 -- nsVector* mJarInstallQueue;
/xpinstall/src/nsTopProgressNotifier.cpp, line 32 -- mNotifiers = new
nsVector();
/xpinstall/src/nsTopProgressNotifier.h, line 30 -- #include "nsVector.h"
/xpinstall/src/nsTopProgressNotifier.h, line 57 -- nsVector *mNotifiers;
/xpinstall/src/nsWinReg.h, line 34 -- #include "nsVector.h"
/xpinstall/src/nsXPITriggerInfo.h, line 29 -- #include "nsVector.h"
/xpinstall/src/nsXPITriggerInfo.h, line 96 -- nsVector mItems;
/xpinstall/src/nsXPInstallManager.cpp, line 27 -- #include "nsVector.h"
/dom/src/base/nsJSSecurityManager.cpp, line 554 -- void *javaPrincipals =
JVM_GetJavaPrincipalsFromStackAsNSVector(pFrameToStartLooking);
/webshell/embed/ActiveX/MozillaControl.dsp, line 4257 --
SOURCE=..\..\..\dist\include\nsVector.h
Cc'ing Kin for editor, Dan for xpinstall and Vidur for DOM.
Updated•26 years ago
|
Assignee: warren → dveditz
Status: ASSIGNED → NEW
Comment 6•26 years ago
|
||
Dan, can you fix up xpinstall next? Thanks.
Updated•26 years ago
|
Assignee: dveditz → warren
Comment 7•26 years ago
|
||
The three listed plvector lines are all asserts -- no danger of loops. I
converted xpinstall from nsVector to nsVoidArray anyway. Would have been nice
if all the equivalent methods weren't all given different names. Back to
warren to pick the next victim.
Updated•26 years ago
|
Assignee: warren → norris
Comment 8•26 years ago
|
||
Dan, do you have a list of how the method names differ between
PLVector/nsVector and nsVoidArray? That would help Norris... the next victim.
Updated•26 years ago
|
Status: NEW → ASSIGNED
Updated•26 years ago
|
Assignee: norris → drapeau
Status: ASSIGNED → NEW
Component: Browser-General → OJI
Comment 9•26 years ago
|
||
Fixed caps usage.
Forwarding to next component -- OJI.
Updated•26 years ago
|
Target Milestone: M10 → M12
Comment 10•26 years ago
|
||
m12
Comment 11•26 years ago
|
||
I'm currently trying to fix it for the OJI module. Stay tuned.
Comment 12•26 years ago
|
||
Resetting QA contact from leger.
Comment 13•26 years ago
|
||
O.K., I made the change for the OJI module. George, can you pass it on to the
next person?
Thanks.
Comment 14•26 years ago
|
||
OJI fixed; forwarding to next component (XPCOM).
Updated•26 years ago
|
Status: NEW → ASSIGNED
Target Milestone: M12 → M13
Comment 15•26 years ago
|
||
we should eliminate use of nsVector right !
Updated•26 years ago
|
Assignee: dp → scc
Status: ASSIGNED → NEW
Comment 16•26 years ago
|
||
I dont know exactly what to do about this bug. Could you figure out, do the
right thing, and pass it on to the next person in the list, I guess.
Some of these could be so so stale.
Assignee | ||
Updated•26 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 17•26 years ago
|
||
All right. I'm on it for XPCOM.
Assignee | ||
Comment 18•26 years ago
|
||
changes are ready to go... just waiting on code reviews from dp (for
"nsServiceManager.cpp"), and brendan (for "nsAutoLock.cpp").
Assignee | ||
Updated•26 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 19•26 years ago
|
||
Fixes checked in. I think PLVector and nsVector are no longer used anywhere in
the app and can now be removed from the build.
Comment hidden (collapsed) |
You need to log in
before you can comment on or make changes to this bug.
Description
•