Open Bug 2003885 Opened 16 hours ago Updated 2 hours ago

Diagnose craches at CacheFileChunkBuffer

Categories

(Core :: Networking: Cache, task, P2)

task

Tracking

()

ASSIGNED

People

(Reporter: sinker, Assigned: sinker)

References

(Blocks 1 open bug)

Details

(Whiteboard: [necko-triaged])

Attachments

(1 file)

CacheFileChunkBuffer::DataSize() crashes for a reason unknown yet. CacheFileIOManager has been checked many times, but nothing found.
I wonder CacheFileChunk::OnDataRead() have been called twice, or mReadingStateBuf was not set properly. It is very difficult to reproduce. I am going to use MOZ_DIAGNOSTIC_ASSERT() to check if mReadingStateBuf and other fields set properly, and clean mCallback of ReadEvent to catch when calling OnDataRead() twice.

For both cases, they are going to crash definitely. So the changes here will not cause more damages.

CacheFileChunkBuffer::DataSize() crashes for a reason unknown
yet. This patch uses MOZ_DIAGNOSTIC_ASSERT() to check if
mReadingStateBuf and other fields set properly, and clear mCallback of
ReadEvent to catch when calling OnDataRead() twice.

For both cases, they are going to crash definitely. So the changes
here will not cause more damages.

Assignee: nobody → thinker.li
Status: NEW → ASSIGNED
Severity: -- → N/A
Type: defect → task
Priority: -- → P2
Whiteboard: [necko-triaged]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: