Opened 13 years ago

Closed 13 years ago

#5516 closed defect (fixed)

missing lock for readblocksize member variable

Reported by: Erik Hovland <erik@…> Owned by: Isaac Richards
Priority: trivial Milestone: unknown
Component: mythtv Version: head
Severity: low Keywords:
Cc: Ticket locked: no


Turns out the readblocksize member variable in RingBuffer? requires locking.

I have heard before that g++ is atomic about single variable assignments. But I don't know if that applies in this case.

Attachments (1)

libs_libmythtv-missing-lock.patch (761 bytes) - added by Erik Hovland <erik@…> 13 years ago.
wraps readblocksize with a lock

Download all attachments as: .zip

Change History (2)

Changed 13 years ago by Erik Hovland <erik@…>

wraps readblocksize with a lock

comment:1 Changed 13 years ago by danielk

Resolution: fixed
Status: newclosed

(In [17937]) Fixes #5516. Improper locking in RingBuffer? class.

I didn't use Erik's patch because it didn't really address the problem, two different locks were being used to independently to protect the same 'readblocksize' variable. But the report pointed me in the right direction.

Note: See TracTickets for help on using tickets.