Closed
Bug 367817
Opened 18 years ago
Closed 18 years ago
nsJAR::GetInputStreamWithSpec closes same fd twice in failure case
Categories
(Core :: Networking: JAR, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: dbaron, Assigned: dbaron)
References
Details
(Whiteboard: [patch])
Attachments
(1 file)
2.51 KB,
patch
|
darin.moz
:
review+
darin.moz
:
superreview+
|
Details | Diff | Splinter Review |
I've (as of very recently) been seeing crashes when I rebuild JAR files underneath a running Mozilla. (In the past, I sometimes saw runtime problems, but not crashes.)
From the stack of the crash, I suspect the problem *may* be the following bug (although I'm not convinced). When nsJAR::GetInputStreamWithSpec's call to jis->InitFile fails, in some of the failure cases, jis owns the file descriptor (which it closes when it is released). This means we'll call PR_Close on the same file descriptor twice.
I'll attach a patch that fixes this bug (I'm not yet sure if it fixes the crashes I've been seeing, though).
Assignee | ||
Comment 1•18 years ago
|
||
Attachment #252410 -
Flags: superreview?
Attachment #252410 -
Flags: review?
Assignee | ||
Updated•18 years ago
|
Whiteboard: [patch]
Assignee | ||
Updated•18 years ago
|
Attachment #252410 -
Flags: superreview?(darin.moz)
Attachment #252410 -
Flags: superreview?
Attachment #252410 -
Flags: review?(darin.moz)
Attachment #252410 -
Flags: review?
Assignee | ||
Comment 2•18 years ago
|
||
From a quick skim, looks like a regression from bug 337561, which added this PR_Close(fd).
Blocks: 337561
Assignee | ||
Comment 3•18 years ago
|
||
I haven't seen the crash since I wrote this patch, so I think it does fix the crash.
Updated•18 years ago
|
Attachment #252410 -
Flags: superreview?(darin.moz)
Attachment #252410 -
Flags: superreview+
Attachment #252410 -
Flags: review?(darin.moz)
Attachment #252410 -
Flags: review+
Assignee | ||
Comment 4•18 years ago
|
||
Checked in to trunk.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•