Swift: reproducible compiler segfault
Originator: | garth | ||
Number: | rdar://19642034 | Date Originated: | 28-Jan-2015 06:09 PM |
Status: | Open | Resolved: | |
Product: | Developer Tools | Product Version: | Xcode 6.2 beta 6C107a |
Classification: | Serious Bug | Reproducible: | Always |
The following code reproducibly produces a segmentation fault on compilation: class Foo {} func sum<T: Foo, S: SequenceType where T == S.Generator.Element>(sequence: S) -> Foo { return Foo() } var theSum = sum([Foo(), Foo()]) The backtrace is: 0 swift 0x00000001030b8968 llvm::sys::PrintStackTrace(__sFILE*) + 40 1 swift 0x00000001030b8e54 SignalHandler(int) + 452 2 libsystem_platform.dylib 0x00007fff89d1df1a _sigtramp + 26 3 libsystem_platform.dylib 0x00007ff4d217bc50 _sigtramp + 1212538192 4 swift 0x000000010244f258 swift::irgen::IRGenFunction::emitTypeMetadataRef(swift::CanType) + 280 5 swift 0x00000001024831f3 swift::irgen::emitPolymorphicArguments(swift::irgen::IRGenFunction&, swift::CanTypeWrapper<swift::SILFunctionType>, swift::CanTypeWrapper<swift::SILFunctionType>, llvm::ArrayRef<swift::Substitution>, swift::irgen::Explosion&) + 451 6 swift 0x00000001024c5f31 swift::SILVisitor<(anonymous namespace)::IRGenSILFunction, void>::visit(swift::ValueBase*) + 34721 7 swift 0x00000001024bcb4b swift::irgen::IRGenModule::emitSILFunction(swift::SILFunction*) + 9195 8 swift 0x0000000102436010 swift::irgen::IRGenModule::emitGlobalTopLevel() + 208 9 swift 0x00000001024a986c performIRGeneration(swift::IRGenOptions&, swift::Module*, swift::SILModule*, llvm::StringRef, llvm::LLVMContext&, swift::SourceFile*, unsigned int) + 1900 10 swift 0x00000001024aa273 swift::performIRGeneration(swift::IRGenOptions&, swift::SourceFile&, swift::SILModule*, llvm::StringRef, llvm::LLVMContext&, unsigned int) + 51 11 swift 0x00000001023ff4f4 frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 5444 12 swift 0x00000001023fc86d main + 1677 13 libdyld.dylib 0x00007fff8df1c5c9 start + 1
Comments
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!