Closed Bug 460058 Opened 16 years ago Closed 16 years ago

SEGV when trying to view plain text emails (with missing content type) crash [@ nsDependentCString::nsDependentCString]

Categories

(MailNews Core :: Backend, defect)

defect
Not set
critical

Tracking

(Not tracked)

VERIFIED FIXED
mozilla1.9.1b2

People

(Reporter: mkmelin, Assigned: mkmelin)

References

Details

(Keywords: crash, regression)

Crash Data

Attachments

(1 file)

Attached patch proposed fixSplinter Review
From bug 420830 comment 8.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f31b2b5e780 (LWP 25946)]
0x00007f31a5571798 in nsDependentCString::nsDependentCString ()
   from /home/software/mozobc/mozilla/dist/bin/components/libmail.so
Current language:  auto; currently asm
(gdb) bt
#0  0x00007f31a5571798 in nsDependentCString::nsDependentCString ()
   from /home/software/mozobc/mozilla/dist/bin/components/libmail.so
#1  0x00007f31a570db75 in mime_locate_external_content_handler (
    content_type=0x0, ctHandlerInfo=0x7fffbab8e8d0)
    at /home/software/mozcom/mailnews/mime/src/mimei.cpp:232
#2  0x00007f31a570dfdd in mime_find_class (content_type=0x0, 
    hdrs=0x7f31995fc8c0, opts=0x7f3196f84b80, exact_match_p=0)
    at /home/software/mozcom/mailnews/mime/src/mimei.cpp:515
#3  0x00007f31a570efbb in mime_create (content_type=0x0, hdrs=0x7f31995fc8c0, 
    opts=0x7f3196f84b80)
    at /home/software/mozcom/mailnews/mime/src/mimei.cpp:884
#4  0x00007f31a5714e59 in MimeMessage_close_headers (obj=0x7f319c13f5e0)
    at /home/software/mozcom/mailnews/mime/src/mimemsg.cpp:473
#5  0x00007f31a57155c7 in MimeMessage_parse_line (aLine=0x7f3197de8400 "\n", 
    aLength=1, obj=0x7f319c13f5e0)
    at /home/software/mozcom/mailnews/mime/src/mimemsg.cpp:285
#6  0x00007f31a5722322 in convert_and_send_buffer (buf=0x7f3197de8400 "\n", 
    length=1, convert_newlines_p=1, 
    per_line_fn=0x7f31a571511a <MimeMessage_parse_line>, 
    closure=0x7f319c13f5e0)
    at /home/software/mozcom/mailnews/mime/src/mimebuf.cpp:184

I bet this is fallout from bug 381659.

Howard, can you try this patch? I don't crash myself, with or without the patch...
Ok, i started crashing now - e.g. bp-b6ec551c-9adf-11dd-880b-001a4bd43ed6
OS: Linux → All
Hardware: PC → All
Comment on attachment 343248 [details] [diff] [review]
proposed fix

Fix the crash.
Attachment #343248 - Flags: superreview?(bienvenu)
Attachment #343248 - Flags: review?(bienvenu)
Keywords: crash
Attachment #343248 - Flags: superreview?(bienvenu)
Attachment #343248 - Flags: superreview+
Attachment #343248 - Flags: review?(bienvenu)
Attachment #343248 - Flags: review+
Comment on attachment 343248 [details] [diff] [review]
proposed fix

oops, sorry I missed that...
changeset:   619:60900dd0303b
http://hg.mozilla.org/comm-central/rev/60900dd0303b

->FIXED
Target Milestone: --- → mozilla1.9.1b2
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Thanks, the fix works for me as well, and sorry about the previous confusion.
magnus: please try spelling empty correctly...
Today's nightly, which includes the fix, no longer crashes for me. -> verified
Status: RESOLVED → VERIFIED
Ditto - also verified, no longer crashing.
Summary: SEGV when trying to view plain text emails (with missing content type) → SEGV when trying to view plain text emails (with missing content type) crash [@ nsDependentCString::nsDependentCString]
(In reply to comment #8)
> magnus: please try spelling empty correctly...

Fixed the spelling
changeset:   630:6b0bbba2af78
http://hg.mozilla.org/comm-central/rev/6b0bbba2af78
Bug 460484 has a test case for this, we should try and set something up in unit tests. I had a look but I couldn't see an easy way of getting into that part of mime.

Maybe David has some ideas for how to get into the mime interfaces.
Flags: in-testsuite?
This FIXED bug is flagged with in‑testsuite?   It would be great if assignee or someone else can clear the flag if a test is not appropriate.  And if appropriate, create a test and plus the flag to finish off the bug.
testcase still needed (In reply to comment #14)
> Bug 460484 has a test case for this, we should try and set something up in unit
> tests. I had a look but I couldn't see an easy way of getting into that part of
> mime.
> 
> Maybe David/bienvenu has some ideas for how to get into the mime interfaces.
Severity: normal → critical
Crash Signature: [@ nsDependentCString::nsDependentCString]
Flags: in-testsuite?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: