firebase-ios-sdk icon indicating copy to clipboard operation
firebase-ios-sdk copied to clipboard

[Crashlytics] Sync signal/exception handler installation

Open paulb777 opened this issue 1 week ago • 2 comments

Fix #15383

Here's a Gemini driven PR that still needs end-to-end testing and review. Gemini comments below:

Summary: This PR modifies FIRCLSContextInitialize to install signal and mach exception handlers synchronously. Previously, these handlers were installed asynchronously on a background queue, which created a race condition for other runtime environments (like Mono, Xamarin, Unity) that need to chain signal handlers. By ensuring synchronous installation, these environments can reliably install their handlers after Crashlytics initialization and maintain a proper signal chain.

Changes:

  • Modified Crashlytics/Crashlytics/Components/FIRCLSContext.m to move FIRCLSSignalInitialize and FIRCLSMachExceptionInit out of dispatch_group_async block, ensuring they run synchronously on the calling thread (typically main thread during FIRApp.configure()).

paulb777 avatar Dec 05 '25 01:12 paulb777