Closed
Bug 41996
Opened 25 years ago
Closed 25 years ago
nsCmdLineService::GetCmdLineValue needs to clone aResult
Categories
(Core Graveyard :: Cmd-line Features, defect, P3)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: sfraser_bugs, Assigned: alecf)
Details
(Keywords: crash, Whiteboard: [nsbeta-]fix in hand)
Attachments
(1 file)
(deleted),
patch
|
Details | Diff | Splinter Review |
nsCmdLineService::GetCmdLineValue returns a char*, but, since its an XPCOM
interface, it should clone the result.
Currently, the call to this function in LaunchApplicationWithArgs():
nsXPIDLCString cmdResult;
rv = cmdLineArgs->GetCmdLineValue(commandLineArg, getter_Copies(cmdResult));
is causing a double deletion.
However, there are a bunch of places that call GetCmdLineValue() without deleting
the result. These need to be fixed.
Reporter | ||
Comment 1•25 years ago
|
||
cc bruce
Reporter | ||
Comment 2•25 years ago
|
||
BTW, this double deletion is causing various crashes on quit for me.
Assignee | ||
Comment 3•25 years ago
|
||
ohh!! I've been trying to figure this out all evening. Thanks for tracking this
down simon.. I'm getting lots of assertions/crashes as well.
Nominate for beta2 - this makes the app crash on exit
Keywords: nsbeta2
Reporter | ||
Comment 4•25 years ago
|
||
alecf: can I give this to you? You should fix callers of GetCmdLineValue who
don't delete the string to do so, after fixing the bug itself.
Assignee: sfraser → alecf
Assignee | ||
Comment 6•25 years ago
|
||
Attaching the patch.
Adding crash keyword because I'm realizing this can cause random crashes
throughout the app as well.
Adding the dogfood keyword because this has been preventing me from running
purify on mail. (because purify will not report results if the app crashes)
Assignee | ||
Comment 7•25 years ago
|
||
Reporter | ||
Comment 8•25 years ago
|
||
this may be causing bug 41339 too. alecf, can you check into M16 too?
Putting on [dogfood+][nsbeta2-] radar.
Whiteboard: fix in hand → [dogfood+][nsbeta-]fix in hand
Assignee | ||
Comment 10•25 years ago
|
||
fix is in.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 11•25 years ago
|
||
fix checked into the branch as well.
Comment 12•25 years ago
|
||
i hereby apply rubberstamp verification. :-) spoke w/simon --this is a codelevel
fix that's tricky to verify for an enduser (dunno why this was labelled dogfood,
so removing that kw).
Status: RESOLVED → VERIFIED
Keywords: dogfood
Whiteboard: [dogfood+][nsbeta-]fix in hand → [nsbeta-]fix in hand
You need to log in
before you can comment on or make changes to this bug.
Description
•