Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#5319 closed Bug (fixed)

potential race condition when counting torrents — at Version 2

Reported by: livings124 Owned by: livings124
Priority: Lowest Milestone: 2.80
Component: Mac Client Version: 2.77
Severity: Trivial Keywords:
Cc:

Description (last modified by livings124)

Enumerating the torrents to filter and count the amount of downloading, seeding, paused, and active has a theoretical race condition when incrementing the counters. We should use OSAtomicAdd32() (or similar) when incrementing.

Change History (2)

comment:1 Changed 9 years ago by livings124

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

comment:2 Changed 9 years ago by livings124

  • Description modified (diff)

r14044 Use OSAtomicIncrement32(&value) instead of OSAtomicAdd32(1, &value)

Note: See TracTickets for help on using tickets.