Fix potential crash in nsThread::PutEvent

RESOLVED FIXED in mozilla35

Status

()

Core
XPCOM
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: Ben Turner (not reading bugmail, use the needinfo flag!), Assigned: Ben Turner (not reading bugmail, use the needinfo flag!))

Tracking

Trunk
mozilla35
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Created attachment 8489132 [details] [diff] [review]
Patch, v1

I recorded this crash the other day. Basically we grab and drop the nsThread mutex twice in nsThread::PutEvent, first to add the event to the queue, and second to get any thread observer. If the event that we place in the queue triggers thread destruction then we could crash if the calling thread gets scheduled after the nsThread is deleted.
Attachment #8489132 - Flags: review?(nfroyd)
Attachment #8489132 - Flags: review?(nfroyd) → review+
Looks like this landed in (bug 994190):
http://hg.mozilla.org/mozilla-central/diff/8892214038df/xpcom/threads/nsThread.cpp
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
You need to log in before you can comment on or make changes to this bug.