Skip to content
Snippets Groups Projects

GeoModelKernel: Fix race in RCBase::unref().

Merged Scott Snyder requested to merge ssnyder/GeoModel:race.GeoModelKernel-20211013 into master

The decrement and test must be done atomically; otherwise we could have a race. E.g., suppose a RCBase object has a refcount of 2, and two threads call unref simultaneously. The two decrements could both happen before either of the comparisons, resulting in a double-delete.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading