pointfreeco / swift-concurrency-extras

Useful, testable Swift concurrency.
MIT License
343 stars 23 forks source link

Potential crash #10

Closed mansatgigset closed 1 year ago

mansatgigset commented 1 year ago

Description

We have identified a potential crash in iterator?.next() that might be related to this library, with a suggested improvement, see https://github.com/apple/swift/issues/69367.

Checklist

Expected behavior

No crash

Actual behavior

Crash

Steps to reproduce

See https://github.com/apple/swift/issues/69367

swift-concurrency-extras version information

1.0.0

Destination operating system

Multiple os

Xcode version information

Version 15.0 (15A240d)

Swift Compiler version information

swift-driver version: 1.87.1 Apple Swift version 5.9 (swiftlang-5.9.0.128.108 clang-1500.0.40.1)
Target: arm64-apple-macosx14.0
stephencelis commented 1 year ago

@mansatgigset Thanks for letting us know! Any interest in PRing the fix suggested in that thread? If not we can take care of it, no worries.

mansatgigset commented 1 year ago

@stephencelis As this fix should be compatible further back than what I believe OSAllocatedUnfairLock is supported, it feels better that you come up with a solution you feel confident with.

stephencelis commented 1 year ago

@mansatgigset I think we can use a simple NSLock instead :smile: Can you take it for a spin?