Summary
iOS Release/Profile builds crash with SIGABRT (_swift_task_dealloc_specific / freed pointer was not the last allocation) on cooperative queue threads whenever code calls FirebaseFunctions.httpsCallable.call() or FirebaseStorage.ref.putData(). Debug builds are unaffected.
Root Cause
Swift 6.1 compiler bug — the optimizer generates incorrect LIFO teardown ordering for async let task allocations.
Exposed by flutterfire#18054 (feat(ios): migrate iOS to UIScene lifecycle), which shipped new Swift async code in:
cloud_functions 6.0.7 → 6.1.0
firebase_storage 13.1.0 → 13.2.0
Upstream Tracking
Current Workaround
Podfile post_install disables Swift optimization for the affected pods only:
if ['FirebaseFunctions', 'FirebaseStorage'].include?(target.name)
target.build_configurations.each do |config|
if config.name != 'Debug'
config.build_settings['SWIFT_OPTIMIZATION_LEVEL'] = '-Onone'
end
end
end
Resolution Criteria
Remove the Podfile workaround once any of:
- Swift compiler fix (swiftlang/swift#87571) ships in an Xcode update
- FlutterFire releases patched
cloud_functions / firebase_storage versions
- Firebase iOS SDK adds its own workaround
Affected Versions
- Build 139 (1.24.0+139)
- Xcode 26.4, Swift 6.1, iOS 26.4
- Physical devices only (simulator uses macOS Swift runtime)
Summary
iOS Release/Profile builds crash with SIGABRT (
_swift_task_dealloc_specific/freed pointer was not the last allocation) on cooperative queue threads whenever code callsFirebaseFunctions.httpsCallable.call()orFirebaseStorage.ref.putData(). Debug builds are unaffected.Root Cause
Swift 6.1 compiler bug — the optimizer generates incorrect LIFO teardown ordering for
async lettask allocations.Exposed by flutterfire#18054 (
feat(ios): migrate iOS to UIScene lifecycle), which shipped new Swift async code in:cloud_functions6.0.7 → 6.1.0firebase_storage13.1.0 → 13.2.0Upstream Tracking
Current Workaround
Podfile
post_installdisables Swift optimization for the affected pods only:Resolution Criteria
Remove the Podfile workaround once any of:
cloud_functions/firebase_storageversionsAffected Versions