Closed
Bug 3507
Opened 26 years ago
Closed 26 years ago
Crash on error handling condition in nsAppRunner.cpp
Categories
(Core Graveyard :: Tracking, defect, P1)
Tracking
(Not tracked)
VERIFIED
FIXED
M3
People
(Reporter: sfraser_bugs, Assigned: rpotts)
Details
In main(), an error handling condition can lead to bad crashes, because use of
'goto' skips local initializers.
E.g. say the NS_NewURL() call fails, so we 'goto done'. This skips the
initializer for appCoresManager. But at done:, we try to shut down the
appCoresManager, which was never initialized. This causes a crash.
Assignee | ||
Updated•26 years ago
|
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 1•26 years ago
|
||
I checked in the fix..
It turns out that the variable in question was *never* initialized...
If the code had actually been:
nsIDOMAppCoresManager *appCoresManager = nsnull;
then the compiler would have flagged it as an error! So, I guess the
initialization was removed to avoid the error :-)
The code was *actually*:
nsIDOMAppCoresManager *appCoresManager;
Oh well... I also made the error checking consistantly use the macros
NS_SUCCEEDED(...) and NS_FAILED(...). These are actually *different* from
saying rv != NS_OK (which is *not correct*)
-- rick
sfraser, can you verify with Mar10 build and makr as so if all is well? Thanks!
Reporter | ||
Updated•26 years ago
|
Status: RESOLVED → VERIFIED
Reporter | ||
Comment 3•26 years ago
|
||
Looks good.
Moving all Apprunner bugs past and present to Other component temporarily whilst
don and I set correct component. Apprunner component will be deleted/retired
shortly.
Updated•8 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•