You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import XCTest
import OpenCombine
private class Item {}
final class OpenCombineTests: XCTestCase {
func testBadAccessSimplified() async {
let item = await Future<Item, Never> { promise in
DispatchQueue.global().async {
promise(.success(Item()))
}
}
.value
}
}
If I run this test case repeatedly until failure with enough iterations (10000+), an EXC_BAD_ACCESS will (most likely) occur. See screenshot:
For context, this behavior also occurs when running with Apple's Combine. I haven't had much luck finding anyone who can help me understand what's going on here, so I am creating an issue here as I figure you folks might be able to help. 🙏
Notes:
I have also been able to reproduce this issue a normal application lifecycle context
As far as I can tell, the issue seems limited to Combine or OpenCombine usage. I have not been able to reproduce similar behavior with any other async library/solution.
I think the issue might be caused by accessing the Future's result from the Conduit from outside of the Future's lockhere. Strangely neither the Address nor Thread sanitizers are able to catch this.
I think the issue might be caused by accessing the Future's result from the Conduit from outside of the Future's lockhere. Strangely neither the Address nor Thread sanitizers are able to catch this.
Hi @tarbaiev-smg. To clarify, are you thinking this issue is a bug with OpenCombine, or with my usage of Future? If it's the latter, can you please help me understand exactly what I'm doing wrong? Thank you!
Hello folks. I am investigating an issue where I can trigger iOS to crash with an EXC_BAD_ACCESS when repeatedly using
Future
s.From OpenCombineTests.swift in my sample project repo:
If I run this test case repeatedly until failure with enough iterations (10000+), an EXC_BAD_ACCESS will (most likely) occur. See screenshot:
For context, this behavior also occurs when running with Apple's Combine. I haven't had much luck finding anyone who can help me understand what's going on here, so I am creating an issue here as I figure you folks might be able to help. 🙏
Notes:
Related links:
The text was updated successfully, but these errors were encountered: