Note: There are a few cases of duplicates in user autocompletion which are being worked on.

js crash when receiving a message (JSCompartment, js::gc::ScanShape)

VERIFIED FIXED in Thunderbird 17.0


MailNews Core
6 years ago
3 years ago


(Reporter: verymuch.happyman, Assigned: hiro)


({crash, testcase, topcrash})

Thunderbird 17.0
crash, testcase, topcrash
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)


(crash signature)


(4 attachments)



6 years ago
Created attachment 578504 [details]

User Agent: Mozilla/5.0 (Windows NT 5.1; rv:8.0) Gecko/20100101 Firefox/8.0
Build ID: 20111104165243

Steps to reproduce:

do nothing

Actual results:

Crash Thunderbird application when receiving a specific message to which the filter is configured. Message, filter and crash info included to file.


6 years ago
Severity: normal → critical
Keywords: crash

Comment 1

6 years ago
Without message filter all right.


6 years ago
Attachment #578504 - Attachment mime type: text/plain → application/octet-stream

Comment 2

6 years ago
Please post also your crash ID.
Instructions for Thunderbird at

Comment 3

6 years ago
Ah, sorry, is db29fda7-22c6-41e4-bf02-6b624c0086be the crash ID? Could you click on it to submit it?

Comment 4

6 years ago
Does it crash everytime you run the filter on that message, even with manual run?

Comment 5

6 years ago
I had to change the filter name as it came up empty when loaded in TB. Also I do not have imap, so I set the action to Move to some POP3 folder. Also I tested it on TB11, Win XP. It didn't crash on manual run for me.
Component: General → Filters
Keywords: stackwanted
Product: Thunderbird → MailNews Core
QA Contact: general → filters

Comment 6

6 years ago
Created attachment 578971 [details]
Test message

Comment 7

6 years ago
Test message (attached) from folder Inbox/Notify mark unread, drug and drop it to INBOX, click to folder Inbox/Notify and exception:
Manual run filter not working.

While receiving these messages, also such exceptions arose:
(In reply to verymuch.happyman from comment #6)
> Test message

Last part of message header([CRLF]=0x0D0A)
> To: LyukshinRA@krw.rzd,[CRLF]
>     biakus@krw.rzd,[CRLF]
>     [CRLF]
> [CRLF]
Malformed To: header. (1) Ends with ",    ", (2) Incorrect space only line in message header.
Other characteristics. (3) The incorrect space only line is folded line of a message header and is last folded line of the header, (4) The space-only/last-folded line is placed at end of message headers(just before separator of headers and mail payload).

(2)/(3)/(4) is very similar to mail which produces bug 701194.
> Subject: =?iso-8859-1?B?UmVjaG51bmcgQW535Gx0aW4=?=[CRLF]
> [CRLF]
([CRLF]=0x0D0A, [HTAB]=0x09)
According to bug 706813 comment #4, it's not a buffer write overflow, but most likely simply reading uninitialized memory. So phenomenon depends on uninitialized memory and crash may happen.

Setting dependency to bug 701194 for ease of tracking.
Depends on: 701194


6 years ago
Crash Signature: [@ js::gc::ScanShape ]
gc::ScanShape is #40 crash for version 10

assuming these from comment 7 are related:
[@ JSCompartment::sweep(JSContext*, unsigned int)]
[@ JSCompartment::purge(JSContext*)]

but less sure about 
Crash Signature: [@ js::gc::ScanShape ] → [@ js::gc::ScanShape ] [@ JSCompartment::sweep(JSContext*, unsigned int)] [@ JSCompartment::purge(JSContext*)]
Ever confirmed: true
Keywords: stackwanted → topcrash
Summary: Crash when receiving a message → js crash when receiving a message (JSCompartment, js::gc::ScanShape)

Comment 10

5 years ago
Created attachment 644066 [details] [diff] [review]

The buffer of nsByteArray is not initialized with 0, so null checking it not useful there.
Attachment #644066 - Flags: review?(mbanner)

Comment 11

5 years ago
Created attachment 644202 [details] [diff] [review]

This test includes the message in comment 6 and bug 701194 comment 0.
Assignee: nobody → hiikezoe
Attachment #644202 - Flags: review?(mconley)


5 years ago
OS: Windows XP → All
Hardware: x86 → All
Attachment #644066 - Flags: review?(mbanner) → review+
Comment on attachment 644202 [details] [diff] [review]

Review of attachment 644202 [details] [diff] [review]:

By inspection, this looks good to me. Thanks!
Attachment #644202 - Flags: review?(mconley) → review+


5 years ago
Keywords: checkin-needed
Last Resolved: 5 years ago
Flags: in-testsuite+
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 17.0


5 years ago
Duplicate of this bug: 701194
I am trying to determine what issues still exist associated with this signature and whether the original testcase is solved in the field - because there are still many crashes in version 17 [1].  I suspect most or all are caused by other factors not related to this bug  Is there a relevant part of the stack for this bug that we can put in a bug comment to use for comparison to crashes in version 17?

verymuch, is your problem solved in version 17?

Keywords: testcase
verymuch indicates no longer crashing.
And nothing on crash-stats for current versions
You need to log in before you can comment on or make changes to this bug.