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
Change History
Changed 4 years ago by Erik Hovland <erik@…>
- Attachment libs_libmythtv-missing-lock.patch added
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.
Note: See
TracTickets for help on using
tickets.

wraps readblocksize with a lock