Drop all use of OSSpinLock #1060

Merged
merged 1 commit into from Dec 17, 2015

Conversation

Projects
None yet
2 participants
@thomasvl
Member

thomasvl commented Dec 17, 2015

Apple engineers have pointed out that OSSpinLocks are vulnerable to live locking
on iOS in cases of priority inversion:
. http://mjtsai.com/blog/2015/12/16/osspinlock-is-unsafe/
. https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20151214/000372.html

  • Use a dispatch_semaphore_t within the extension registry.
  • Use a dispatch_semaphore_t for protecting autocreation within messages.
  • Drop the custom/internal GPBString class since we don't have really good
    numbers to judge the locking replacements and it isn't required. We can
    always bring it back with real data in the future.
Drop all use of OSSpinLock
Apple engineers have pointed out that OSSpinLocks are vulnerable to live locking
on iOS in cases of priority inversion:
. http://mjtsai.com/blog/2015/12/16/osspinlock-is-unsafe/
. https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20151214/000372.html

- Use a dispatch_semaphore_t within the extension registry.
- Use a dispatch_semaphore_t for protecting autocreation within messages.
- Drop the custom/internal GPBString class since we don't have really good
  numbers to judge the locking replacements and it isn't required. We can
  always bring it back with real data in the future.

@googlebot googlebot added the cla: yes label Dec 17, 2015

thomasvl added a commit that referenced this pull request Dec 17, 2015

Merge pull request #1060 from thomasvl/drop_spinlocks
Drop all use of OSSpinLock

@thomasvl thomasvl merged commit 6b228f3 into google:master Dec 17, 2015

1 of 3 checks passed

continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
cla/google All necessary CLAs are signed

@thomasvl thomasvl deleted the thomasvl:drop_spinlocks branch Dec 17, 2015

@ibireme ibireme referenced this pull request in ReactiveCocoa/ReactiveCocoa Jan 19, 2016

Closed

Atomic: SPINLOCK is not safe in iOS #2619

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment