nsUnknownDecoder::OnDataAvailable inconsistent use of mNextListener

RESOLVED INVALID

Status

()

Core
Networking: HTTP
RESOLVED INVALID
8 months ago
8 months ago

People

(Reporter: tnikkel, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

8 months ago
mNextListener is protected by a mutex, suggesting it can be changed on multiple threads. nsUnknownDecoder::OnDataAvailable null checks mNextListener, releases the mutex, then acquires the mutex and then uses mNextListener again. mNextListener could have been set to null after it was null checked.
(Reporter)

Updated

8 months ago
Flags: needinfo?(dd.mozilla)
mNextListener is used by main thread(in onStartRequest ang OnStopRequest) and off main thread (onDataAvailable), but we guarantee that this functions are called in sequence. Therefore mutex is only that tsan do not complain. The situation from th description cannot happen.
Flags: needinfo?(dd.mozilla)
(Reporter)

Updated

8 months ago
Status: NEW → RESOLVED
Last Resolved: 8 months ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.