Swift compiler segmentation fault when archiving code containing Set<enum_type>

Originator:dave11186
Number:rdar://20689312 Date Originated:4/24/2015
Status:Open Resolved:
Product:Xcode Product Version:6.3.1
Classification:Crash/Hang/Data Loss Reproducible:Sometimes
 
The Swift compiler will sometimes exit with a segmentation fault when archiving code containing Set<enum_type> in with a "Release" build configuration. It appears to have something to do with Swift Sets containing an enum type. The workaround in my current project is to use Swift Arrays which contain an enum type instead.

The build log is attached as "log.txt"

A segmentation fault from Swift compiler: "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift" will occur with the following stack trace:

0  swift                    0x000000010f6dba18 llvm::sys::PrintStackTrace(__sFILE*) + 40
1  swift                    0x000000010f6dbef4 SignalHandler(int) + 452
2  libsystem_platform.dylib 0x00007fff8357cf1a _sigtramp + 26
3  libsystem_platform.dylib 0x00007fa158f7b0b0 _sigtramp + 3584025008
4  swift                    0x000000010f28ca05 swift::serialization::Serializer::writeAllDeclsAndTypes() + 2181
5  swift                    0x000000010f28da88 swift::serialization::Serializer::writeAST(llvm::PointerUnion<swift::Module*, swift::SourceFile*>) + 2600
6  swift                    0x000000010f2900f0 swift::serialization::Serializer::writeToStream(llvm::raw_ostream&, llvm::PointerUnion<swift::Module*, swift::SourceFile*>, swift::SILModule const*, swift::SerializationOptions const&) + 144
7  swift                    0x000000010f290cb1 swift::serialize(llvm::PointerUnion<swift::Module*, swift::SourceFile*>, swift::SerializationOptions const&, swift::SILModule const*) + 321
8  swift                    0x000000010efc521a frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 5514
9  swift                    0x000000010efc3ae6 main + 1814
10 libdyld.dylib            0x00007fff8ceec5c9 start + 1
11 libdyld.dylib            0x000000000000003d start + 1930508917

Comments

Resolved

We believe this issue has been addressed in the latest Xcode 7 beta. This release includes the Xcode IDE, Swift 2 compiler, Instruments, Simulator, and latest SDKs for OS X, iOS, and watchOS.

Please test with this release. If you still have issues, please provide any relevant logs or information that could help us investigate.

Xcode 7 beta https://developer.apple.com/xcode/downloads/


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!