Closed Bug 1667120 Opened 4 years ago Closed 4 years ago

Crash in [@ nsImapProtocol::CreateNewLineFromSocket]

Categories

(MailNews Core :: Networking: IMAP, defect, P1)

Thunderbird 82
Unspecified
All

Tracking

(thunderbird_esr78+ verified, thunderbird82 verified)

RESOLVED FIXED
83 Branch
Tracking Status
thunderbird_esr78 + verified
thunderbird82 --- verified

People

(Reporter: wsmwk, Assigned: KaiE)

References

(Regression)

Details

(Keywords: crash, regression, topcrash-thunderbird)

Crash Data

Attachments

(1 file)

Priority issue.

For some odd reason, there are not beta crash reports - it jumped from alpha to release.
The earliest crash stack I find below is buildid 20200921105223 82.0a1

I personally crashed, thunderbird was unattended, a few hours after update bp-edc7031d-ae24-4879-a007-4cc910200924

82.0a1 Crash report: https://crash-stats.mozilla.org/report/index/a0e08f1c-a58b-48d0-996a-f42f80200921

Top 10 frames of crashing thread:

0 xul.dll nsImapProtocol::CreateNewLineFromSocket comm/mailnews/imap/src/nsImapProtocol.cpp:4820
1 xul.dll nsImapServerResponseParser::GetNextLineForParser comm/mailnews/imap/src/nsImapServerResponseParser.cpp:83
2 xul.dll nsIMAPGenericParser::AdvanceToNextToken comm/mailnews/imap/src/nsIMAPGenericParser.cpp:95
3 xul.dll nsImapServerResponseParser::ParseIMAPServerResponse comm/mailnews/imap/src/nsImapServerResponseParser.cpp:184
4 xul.dll nsImapProtocol::HandleIdleResponses comm/mailnews/imap/src/nsImapProtocol.cpp:1476
5 xul.dll nsImapProtocol::ImapThreadMainLoop comm/mailnews/imap/src/nsImapProtocol.cpp:1453
6 xul.dll nsImapProtocol::Run comm/mailnews/imap/src/nsImapProtocol.cpp:1116
7 xul.dll nsThread::ProcessNextEvent xpcom/threads/nsThread.cpp:1234
8 xul.dll NS_ProcessNextEvent xpcom/threads/nsThreadUtils.cpp:513
9 xul.dll mozilla::ipc::MessagePumpForNonMainThreads::Run ipc/glue/MessagePump.cpp:332
Flags: needinfo?(mkmelin+mozilla)

Please first assess quickly our best action to take in the next hours - do we backout, do we more forward with another (well proved) fix, etc ?

I am still assessing severity from the user side.

Flags: needinfo?(khushil324)
Regressed by: 1590473

This crashes when trying to dereference a pointer.

There's earlier code in the same function, which checks the function for non-null, prior to accessing it. So apparently that's a valid scenario, and we'd then crash.

It might be as simple as adding another null check? I'll suggest a patch.

Attachment #9177673 - Flags: review?(mkmelin+mozilla)

Comment on attachment 9177673 [details] [diff] [review]
1667120-null.patch

Asking Ben as alterantive reviewer, just in case he's around more quickly than Magnus.

Attachment #9177673 - Flags: review?(benc)
Comment on attachment 9177673 [details] [diff] [review]
1667120-null.patch

Review of attachment 9177673 [details] [diff] [review]:
-----------------------------------------------------------------

Yeah, mailNewsUrl null is he problem so this should fix it. Thanks Kai! r=mkmelin
Attachment #9177673 - Flags: review?(mkmelin+mozilla)
Attachment #9177673 - Flags: review?(benc)
Attachment #9177673 - Flags: review+
Assignee: nobody → kaie
Status: NEW → ASSIGNED
Flags: needinfo?(mkmelin+mozilla)
Flags: needinfo?(khushil324)
Target Milestone: --- → 83 Branch

Pushed by kaie@kuix.de:
https://hg.mozilla.org/comm-central/rev/dce522123b64
Prevent null pointer crash in nsImapProtocol::CreateNewLineFromSocket. r=mkmelin DONTBUILD

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED

Comment on attachment 9177673 [details] [diff] [review]
1667120-null.patch

[Approval Request Comment]
Regression caused by (bug #): 1590473
User impact if declined: crashing
Testing completed (on c-c, etc.): not yet
Risk to taking this patch (and alternatives if risky): no risk

Attachment #9177673 - Flags: approval-comm-esr78?
Attachment #9177673 - Flags: approval-comm-beta?

Comment on attachment 9177673 [details] [diff] [review]
1667120-null.patch

[Triage Comment]
Approved by wsmwk via Matrix for 82.0b1

Attachment #9177673 - Flags: approval-comm-beta? → approval-comm-beta+

Comment on attachment 9177673 [details] [diff] [review]
1667120-null.patch

[Triage Comment]
For 78.3.0 top crash.

Attachment #9177673 - Flags: approval-comm-esr78? → approval-comm-esr78+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: