belozierov / SwiftCoroutine

Swift coroutines for iOS, macOS and Linux.
https://belozierov.github.io/SwiftCoroutine
MIT License
836 stars 51 forks source link

Crashes with EXC_BAD_ACCESS in iOS 17.2, built with Xcode 15.1, 15.2. #43

Open rebbdif opened 8 months ago

rebbdif commented 8 months ago

Sometimes it works fine. Sometimes app starts crushing at _setjmp(env) with EXC_BAD_ACCESS in the following code:

void __suspend(void* env, void** sp, void* ret, int retVal) {
    if (_setjmp(env)) return;
    char x; *sp = (void*)&x;
    _longjmp(ret, retVal);
}

Caused by await.

funct7 commented 8 months ago

Are you running it on Apple Silicon? Because that' s when I started getting the same exception. If so, it's probably not an issue with the iOS SDK.

rebbdif commented 8 months ago

Yes, I have M3 Pro chip