Closed
Bug 158334
Opened 22 years ago
Closed 22 years ago
Random crash after doing a forward inline
Categories
(MailNews Core :: MIME, defect, P1)
MailNews Core
MIME
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla1.1beta
People
(Reporter: bugzilla, Assigned: bugzilla)
References
Details
(Keywords: crash, Whiteboard: [adt2 RTM] [ETA 07/23])
Attachments
(1 file)
(deleted),
patch
|
vparthas
:
review+
Bienvenu
:
superreview+
scc
:
approval+
|
Details | Diff | Splinter Review |
When doing forward inline of a message with another message attached in it, the
memory get corrupted which lead to random crash. This problem is very easy to
reproduce under MacOS X after you have applied the patch for bug 156958.
Step to reproduce the problem:
1) Send a message to yourself (I personnaly encrypt & sign it but I don't know
if it's matter)
2) Get the message and forward it as attachment
3 [details] [diff] [review]) Get the forwarded message and forward it inline
==> You might crash at any time now, if not, repeat step 3 couple times...
Assignee | ||
Comment 1•22 years ago
|
||
The crash occurs in the MacMemory Allocator code while freeing memory, but the
stack trace is not always the same. This is cause by a memory corruption which
destroy the information (especially the size) of a block which is just in front
of the memory block itself. Either the Mac Memory Allocator code crash right
away when the corrupted block is freed (in Block_Link) or the Mac Memory
Allocator will owerwrite another section of the memory which could cause
catastrophic result.
So far I have seen the crash only on Mac but the initial memory corruption exist
on all platform. Here is the offending code that cause the initial memory
corruption:
mimedrft.cpp, line 1836
PL_strcat(newAttachment->real_name, ".eml");
The problem is that newAttachment->real_name pointer is the size of the string
it hold. Therefore when PL_strcat appends ".eml" to it, the next block in memory
get overwritten.
This potential crash exist since June 15, 2001 (this is caused by fix for bug 75449)
Assignee | ||
Comment 2•22 years ago
|
||
PR_smprintf will take care or allocating the needed memory
Comment on attachment 91965 [details] [diff] [review]
Proposed fix, v1
r=varada
Attachment #91965 -
Flags: review+
Comment 4•22 years ago
|
||
Comment on attachment 91965 [details] [diff] [review]
Proposed fix, v1
sr=bienvenu
Attachment #91965 -
Flags: superreview+
Comment 5•22 years ago
|
||
Nice catch. Just goes to show that strcat and friends are evil.
Comment 6•22 years ago
|
||
Comment on attachment 91965 [details] [diff] [review]
Proposed fix, v1
a=scc for checkin to the mozilla trunk
Attachment #91965 -
Flags: approval+
Updated•22 years ago
|
Comment 7•22 years ago
|
||
adt1.0.1 (on ADT's behalf) approval for checkin to the 1.0 branch, pending
drivers' approval. pls check this in asap, then replace "mozilla1.0.1+" with
"fixed1.0.1". thanks!
Assignee | ||
Comment 8•22 years ago
|
||
Fix checked in the trunk.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Comment 9•22 years ago
|
||
a=chofmann for the branch
Comment 10•22 years ago
|
||
marking as "mozilla1.0.1+" per Comment #9 From chris hofmann.
Keywords: mozilla1.0.1 → mozilla1.0.1+
Assignee | ||
Comment 11•22 years ago
|
||
Fix checked in the branch
Comment 12•22 years ago
|
||
marking as fixed1.0.1 per Comment #11 From Jean-Francois Ducarroz.
Keywords: mozilla1.0.1+ → fixed1.0.1
Whiteboard: [adt2 RTM] [ETA 07/20] → [adt2 RTM] [ETA 07/23]
Comment 13•22 years ago
|
||
Verified this bug using 20020723 branch build on MacOSX (platform reported on)
as well as Mac9.1 and Win2K. To verify this test, I repeated reporter's step 3
ten times, and no crash. Performed as expected.
Keywords: fixed1.0.1 → verified1.0.1
Updated•20 years ago
|
Product: MailNews → Core
Updated•16 years ago
|
Product: Core → MailNews Core
You need to log in
before you can comment on or make changes to this bug.
Description
•