Array of [SecCertificate] crashing Swift 2.0 compiler in optimized builds

Originator:christian.noon
Number:rdar://22024442 Date Originated:2015-07-27
Status:Closed Resolved:2015-12-15
Product:Developer Tools Product Version:Xcode 7 beta 4
Classification:Serious Bug Reproducible:Always
 
Summary:
The attached code sample reproduces a crash we are seeing in the Alamofire project in the optimized Swift 2.0 build. We are not seeing this issue in the same logic when built against Swift 1.2. The provided code sample compiles fine in Debug, but crashes the compiler in Release. There is also a provided workaround that we have found to temporarily get around the issue. 

Any help you could provide to fix the issue would be greatly appreciated.

Steps to Reproduce:
Attempt to compile the app in Release...it will crash the compiler.
Comment out the offending line and uncomment our temporary workaround...code will compile in release.

Expected Results:


Actual Results:


Version:
Xcode 7 beta 4

Notes:


Configuration:


Attachments:
'SecuritySwiftCrash.zip' was successfully uploaded.

* https://github.com/cnoon/Radar-Swift-2.0-Security-Framework

Comments

Issue has been resolved in Xcode 7.2 (7C68).

By christian.noon at Dec. 16, 2015, 4:47 a.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!