Closed
Bug 43347
Opened 25 years ago
Closed 25 years ago
nsComponentManager doesn't check retval of PlatformInit(), can lead to crashes
Categories
(Core :: XPCOM, defect, P3)
Tracking
()
RESOLVED
FIXED
M18
People
(Reporter: madams, Assigned: rayw)
References
Details
(Keywords: crash, Whiteboard: [nsbeta3+])
xpcom/components/nsComponentManager doesn't check the return value of the
PlatformInit() call. That method must complete successfully for the native
component loader to be initialized, which otherwise leads to a crash.
Patch:
------------------------------------------------------
Index: nsComponentManager.cpp
===================================================================
RCS file: /cvsroot/mozilla/xpcom/components/nsComponentManager.cpp,v
retrieving revision 1.128
diff -u -r1.128 nsComponentManager.cpp
--- nsComponentManager.cpp 2000/06/15 02:20:29 1.128
+++ nsComponentManager.cpp 2000/06/21 20:19:08
@@ -318,7 +318,13 @@
#ifdef USE_REGISTRY
NR_StartupRegistry();
- PlatformInit();
+ {
+ nsresult ret;
+ ret = PlatformInit();
+ if( NS_FAILED( ret ) ) {
+ return ret;
+ }
+ }
#endif
PR_LOG(nsComponentManagerLog, PR_LOG_ALWAYS,
Updated•25 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
| Assignee | ||
Comment 2•25 years ago
|
||
This fix should be applied fairly soon. While it does not stop mozilla from
initializing correctly, it produces a messy crash instead of a nicer exit if
something is wrong so that it cannot execute correctly.
Status: NEW → ASSIGNED
Target Milestone: --- → M18
| Assignee | ||
Comment 3•25 years ago
|
||
Adding nsbeta3 and patch keywords.
| Assignee | ||
Updated•25 years ago
|
Whiteboard: [nsbeta3+]
| Assignee | ||
Comment 4•25 years ago
|
||
Applied the patch, exactly as given.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Comment 5•25 years ago
|
||
please verify
You need to log in
before you can comment on or make changes to this bug.
Description
•