Closed
Bug 413599
Opened 17 years ago
Closed 17 years ago
debug build crashes on exit with memory corruption
Categories
(Toolkit :: Startup and Profile System, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.9beta4
People
(Reporter: a, Assigned: a)
Details
(Keywords: crash)
Attachments
(2 files)
908 bytes,
patch
|
timeless
:
review-
|
Details | Diff | Splinter Review |
992 bytes,
patch
|
benjamin
:
review+
mtschrep
:
approval1.9+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11
Build Identifier: 1/22/2008 trunk
Upon exiting any xulrunner app, windows xulrunner crashes with corrupt heap.
The problem is in nsWindowsWMain.cpp. We clone argv, pass argvClone to main(), then delete argvClone. This crashes, because main() rearranges argv behind our back. I'll attach a sample patch.
Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Assignee | ||
Comment 1•17 years ago
|
||
Attachment #298666 -
Flags: review?
Updated•17 years ago
|
Assignee: nobody → a
Status: UNCONFIRMED → NEW
Component: XULRunner → XRE Startup
Ever confirmed: true
QA Contact: xulrunner → xre.startup
Version: unspecified → Trunk
Updated•17 years ago
|
Attachment #298666 -
Flags: review? → review?(benjamin)
Updated•17 years ago
|
Comment on attachment 298666 [details] [diff] [review]
Sample patch for the nsWindowsWMain.cpp
check deleteUs for OOM |if (!deleteUs) {
FreeAllocStrings(argc, argvConverted);
return 127;
}|
or something...
Attachment #298666 -
Flags: review?(benjamin) → review-
Assignee | ||
Comment 3•17 years ago
|
||
Added OOM check per instructions.
Is checking for OOM on all allocations the offical FF policy? I can't imagine how we would get OOM on startup, but I can understand being extra careful for security reasons.
Attachment #298783 -
Flags: review?
Updated•17 years ago
|
Attachment #298783 -
Flags: review? → review?(benjamin)
Comment 4•17 years ago
|
||
Comment on attachment 298783 [details] [diff] [review]
Revised patch, added OOM check.
You don't ever delete[] deleteUs... was that intentional?
Attachment #298783 -
Flags: review?(benjamin) → review-
Assignee | ||
Comment 5•17 years ago
|
||
deleteUs gets deleted inside FreeAllocString. That's the way old code worked.
Assignee | ||
Updated•17 years ago
|
Attachment #298783 -
Attachment description: Revised patch, added OOM check → Revised patch, added OOM check.
Attachment #298783 -
Flags: review- → review?
Updated•17 years ago
|
Attachment #298783 -
Flags: review? → review?(benjamin)
Comment 6•17 years ago
|
||
This patch also fixes the shutdown crash that occurs when running XUL apps with Firefox using the "-app" flag
Updated•17 years ago
|
Attachment #298783 -
Flags: review?(benjamin) → review+
Assignee | ||
Updated•17 years ago
|
Flags: blocking1.9?
Updated•17 years ago
|
Attachment #298783 -
Flags: approval1.9?
Assignee | ||
Updated•17 years ago
|
Assignee: a → dougt
Status: ASSIGNED → NEW
Comment 7•17 years ago
|
||
Aleks, why did you reassign this bug to Doug?
Assignee | ||
Comment 8•17 years ago
|
||
So he can check it in for me. I do not have write privileges (I think). And doug is sitting right next to me.
Assignee | ||
Comment 9•17 years ago
|
||
Or do you want to check it in? (reed)
Comment 10•17 years ago
|
||
The assignee is always the person who wrote the patch. This can't be checked-in right now because it does not have approval. Is this needed for beta 3, or can it wait until after the beta 3 freeze is over?
Assignee: dougt → a
Comment 11•17 years ago
|
||
reed, when/if this is approved, please check in.
Comment 12•17 years ago
|
||
(In reply to comment #11)
> reed, when/if this is approved, please check in.
Will do.
Status: NEW → ASSIGNED
Updated•17 years ago
|
Attachment #298783 -
Flags: approval1.9? → approval1.9+
Updated•17 years ago
|
Keywords: checkin-needed
Comment 13•17 years ago
|
||
Checking in toolkit/xre/nsWindowsWMain.cpp;
/cvsroot/mozilla/toolkit/xre/nsWindowsWMain.cpp,v <-- nsWindowsWMain.cpp
new revision: 1.4; previous revision: 1.3
done
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9beta4
Component: XRE Startup → Startup and Profile System
QA Contact: xre.startup → startup
You need to log in
before you can comment on or make changes to this bug.
Description
•