Modify

Ticket #5516 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

missing lock for readblocksize member variable

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

Description

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

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

Change History

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

wraps readblocksize with a lock

comment:1 Changed 4 years ago by danielk

  • Status changed from new to closed
  • Resolution set to fixed

(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.

View

Add a comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.