Closed
Bug 289689
Opened 20 years ago
Closed 19 years ago
Memory leak: nsDebugImpl::Assertion, Create Process
Categories
(Core :: XPCOM, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: itay.perl, Assigned: bent.mozilla)
Details
(Keywords: fixed1.8.1, memory-leak)
Attachments
(1 file)
1.49 KB,
patch
|
dougt
:
review+
darin.moz
:
superreview+
darin.moz
:
approval-branch-1.8.1+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b2) Gecko/20050409 Firefox/1.0+
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b2) Gecko/20050409 Firefox/1.0+
A memory leak occurs on nsDebugImpl.cpp: nsDebugImpl::Assertion:
CreateProcess seems to not be freed. have a look at the if:
if(GetModuleFileName(GetModuleHandle("xpcom.dll"), executable, MAX_PATH) &&
NULL != (pName = strrchr(executable, '\\')) &&
NULL != strcpy(pName+1, "windbgdlg.exe") &&
#ifdef DEBUG_jband
(printf("Launching %s\n", executable), PR_TRUE) &&
#endif
CreateProcess(executable, buf, NULL, NULL, PR_FALSE,
DETACHED_PROCESS | NORMAL_PRIORITY_CLASS,
NULL, NULL, &si, &pi) &&
WAIT_OBJECT_0 == WaitForSingleObject(pi.hProcess, INFINITE) &&
GetExitCodeProcess(pi.hProcess, &code))
{
//closing handle only of all these passed fine
CloseHandle(pi.hProcess)
}
AFAIU, If one of the conditions is going wrong, the others will be also checked,
and the functions will be called, meaning CreateProcess will be called, but
never freed by CloseHandle. Please check this.
Reproducible: Always
Steps to Reproduce:
1.Just wait for an assertion...Nothing to reproduce here
2.
3.
Actual Results:
Memory Leak
Expected Results:
Not leak
Memory leak was detected using BoundsChecker
Updated•20 years ago
|
Assignee: firefox → dougt
Component: General → XPCOM
Product: Firefox → Core
QA Contact: general
Version: unspecified → Trunk
Comment 1•19 years ago
|
||
This is an automated message, with ID "auto-resolve01".
This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.
While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.
If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.
The latest beta releases can be obtained from:
Firefox: http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey: http://www.mozilla.org/projects/seamonkey/
Comment 2•19 years ago
|
||
This bug has been automatically resolved after a period of inactivity (see above
comment). If anyone thinks this is incorrect, they should feel free to reopen it.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → EXPIRED
Comment 3•19 years ago
|
||
Reopening so this can get a yay/nay from someone who knows about such leaks.
Status: RESOLVED → UNCONFIRMED
Resolution: EXPIRED → ---
Assignee | ||
Comment 4•19 years ago
|
||
Yeah, this is an issue if WaitForSingleObject or GetExitCodeProcess somehow fail.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 2000 → Windows XP
Assignee | ||
Comment 5•19 years ago
|
||
MSDN says that once CreateProcess completes we must use CloseHandle on the process. It's unlikely that the old code would fail, but this bulletproofs it.
Updated•19 years ago
|
Attachment #224253 -
Flags: review?(dougt) → review+
Assignee | ||
Comment 6•19 years ago
|
||
Does this need sr?
Comment 7•19 years ago
|
||
Comment on attachment 224253 [details] [diff] [review]
Fix v1.0
never hurts, but isn't required. ask darin.
Attachment #224253 -
Flags: superreview?(darin)
Updated•19 years ago
|
Attachment #224253 -
Flags: superreview?(darin) → superreview+
Assignee | ||
Comment 8•19 years ago
|
||
Comment on attachment 224253 [details] [diff] [review]
Fix v1.0
branch too?
Attachment #224253 -
Flags: approval-branch-1.8.1?(darin)
Updated•19 years ago
|
Attachment #224253 -
Flags: approval-branch-1.8.1?(darin) → approval-branch-1.8.1+
Assignee | ||
Comment 9•19 years ago
|
||
Checked in on trunk and branch.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago → 19 years ago
Keywords: fixed1.8.1
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•