-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Closed
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itselfcrashBug: A crash, i.e., an abnormal termination of softwareBug: A crash, i.e., an abnormal termination of software
Description
Previous ID | SR-5825 |
Radar | rdar://problem/34259885 |
Original Reporter | @hartbit |
Type | Bug |
Status | Resolved |
Resolution | Done |
Environment
Xcode 9.0 beta 6 (9M214v)
Additional Detail from JIRA
Votes | 0 |
Component/s | Compiler |
Labels | Bug, CompilerCrash |
Assignee | None |
Priority | Medium |
md5: 5575df59a1e4bd399a6d13105c90ba54
Issue Description:
The following piece of code crashes the compiler in Xcode 9 beta 6:
struct DefaultAssociatedType {
}
protocol Protocol {
associatedtype AssociatedType = DefaultAssociatedType
init(object: AssociatedType)
}
final class Conformance: Protocol {
private let object: AssociatedType
init(object: AssociatedType) {
self.object = object
}
}
Here's the stack trace:
0 swift 0x000000010d9ae42a PrintStackTraceSignalHandler(void*) + 42
1 swift 0x000000010d9ad866 SignalHandler(int) + 662
2 libsystem_platform.dylib 0x00007fffceaa9b3a _sigtramp + 26
3 swift 0x000000010df4075f (anonymous namespace)::OldDemangler::demangleIdentifier(llvm::Optional<swift::Demangle::Node::Kind>)::op_char_table + 1055
4 swift 0x000000010b0a71b6 swift::Lowering::TypeConverter::getFunctionInterfaceTypeWithCaptures(swift::CanTypeWrapper<swift::AnyFunctionType>, swift::AnyFunctionRef) + 406
5 swift 0x000000010b029e9c swift::Lowering::TypeConverter::getConstantInfo(swift::SILDeclRef) + 492
6 swift 0x000000010b04a36f swift::SILModule::getOrCreateFunction(swift::SILLocation, swift::SILDeclRef, swift::ForDefinition_t) + 95
7 swift 0x000000010ab8099d swift::Lowering::SILGenModule::getFunction(swift::SILDeclRef, swift::ForDefinition_t) + 333
8 swift 0x000000010ab83a15 swift::Lowering::SILGenModule::emitConstructor(swift::ConstructorDecl*) + 1765
9 swift 0x000000010ac63980 (anonymous namespace)::SILGenType::emitType() + 896
10 swift 0x000000010ab892ba swift::ASTVisitor<swift::Lowering::SILGenModule, void, void, void, void, void, void>::visit(swift::Decl*) + 74
11 swift 0x000000010ab8857b swift::Lowering::SILGenModule::emitSourceFile(swift::SourceFile*, unsigned int) + 1115
12 swift 0x000000010ab89f09 swift::SILModule::constructSIL(swift::ModuleDecl*, swift::SILOptions&, swift::FileUnit*, llvm::Optional<unsigned int>, bool) + 841
13 swift 0x000000010a3227d6 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 13014
14 swift 0x000000010a31dc94 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 7716
15 swift 0x000000010a2d2bb8 main + 12248
16 libdyld.dylib 0x00007fffce89a235 start + 1
17 libdyld.dylib 0x0000000000000044 start + 829840912
Stack dump:
0. Program arguments: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/david/Desktop/CompilerCrash/CompilerCrash/ViewController.swift -primary-file /Users/david/Desktop/CompilerCrash/CompilerCrash/Protocol.swift /Users/david/Desktop/CompilerCrash/CompilerCrash/AppDelegate.swift -target x86_64-apple-ios11.0 -enable-objc-interop -sdk /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk -I /Users/david/Library/Developer/Xcode/DerivedData/CompilerCrash-gipsoiznlwkwdkahfsjuhyrdddib/Build/Products/Debug-iphonesimulator -F /Users/david/Library/Developer/Xcode/DerivedData/CompilerCrash-gipsoiznlwkwdkahfsjuhyrdddib/Build/Products/Debug-iphonesimulator -enable-testing -g -module-cache-path /Users/david/Library/Developer/Xcode/DerivedData/ModuleCache -swift-version 4 -enforce-exclusivity=checked -D DEBUG -serialize-debugging-options -Xcc -I/Users/david/Library/Developer/Xcode/DerivedData/CompilerCrash-gipsoiznlwkwdkahfsjuhyrdddib/Build/Intermediates.noindex/CompilerCrash.build/Debug-iphonesimulator/CompilerCrash.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/david/Library/Developer/Xcode/DerivedData/CompilerCrash-gipsoiznlwkwdkahfsjuhyrdddib/Build/Intermediates.noindex/CompilerCrash.build/Debug-iphonesimulator/CompilerCrash.build/CompilerCrash-generated-files.hmap -Xcc -I/Users/david/Library/Developer/Xcode/DerivedData/CompilerCrash-gipsoiznlwkwdkahfsjuhyrdddib/Build/Intermediates.noindex/CompilerCrash.build/Debug-iphonesimulator/CompilerCrash.build/CompilerCrash-own-target-headers.hmap -Xcc -I/Users/david/Library/Developer/Xcode/DerivedData/CompilerCrash-gipsoiznlwkwdkahfsjuhyrdddib/Build/Intermediates.noindex/CompilerCrash.build/Debug-iphonesimulator/CompilerCrash.build/CompilerCrash-all-target-headers.hmap -Xcc -iquote -Xcc /Users/david/Library/Developer/Xcode/DerivedData/CompilerCrash-gipsoiznlwkwdkahfsjuhyrdddib/Build/Intermediates.noindex/CompilerCrash.build/Debug-iphonesimulator/CompilerCrash.build/CompilerCrash-project-headers.hmap -Xcc -I/Users/david/Library/Developer/Xcode/DerivedData/CompilerCrash-gipsoiznlwkwdkahfsjuhyrdddib/Build/Products/Debug-iphonesimulator/include -Xcc -I/Users/david/Library/Developer/Xcode/DerivedData/CompilerCrash-gipsoiznlwkwdkahfsjuhyrdddib/Build/Intermediates.noindex/CompilerCrash.build/Debug-iphonesimulator/CompilerCrash.build/DerivedSources/x86_64 -Xcc -I/Users/david/Library/Developer/Xcode/DerivedData/CompilerCrash-gipsoiznlwkwdkahfsjuhyrdddib/Build/Intermediates.noindex/CompilerCrash.build/Debug-iphonesimulator/CompilerCrash.build/DerivedSources -Xcc -DDEBUG=1 -Xcc -working-directory/Users/david/Desktop/CompilerCrash -emit-module-doc-path /Users/david/Library/Developer/Xcode/DerivedData/CompilerCrash-gipsoiznlwkwdkahfsjuhyrdddib/Build/Intermediates.noindex/CompilerCrash.build/Debug-iphonesimulator/CompilerCrash.build/Objects-normal/x86_64/Protocol~partial.swiftdoc -serialize-diagnostics-path /Users/david/Library/Developer/Xcode/DerivedData/CompilerCrash-gipsoiznlwkwdkahfsjuhyrdddib/Build/Intermediates.noindex/CompilerCrash.build/Debug-iphonesimulator/CompilerCrash.build/Objects-normal/x86_64/Protocol.dia -Onone -module-name CompilerCrash -emit-module-path /Users/david/Library/Developer/Xcode/DerivedData/CompilerCrash-gipsoiznlwkwdkahfsjuhyrdddib/Build/Intermediates.noindex/CompilerCrash.build/Debug-iphonesimulator/CompilerCrash.build/Objects-normal/x86_64/Protocol~partial.swiftmodule -emit-dependencies-path /Users/david/Library/Developer/Xcode/DerivedData/CompilerCrash-gipsoiznlwkwdkahfsjuhyrdddib/Build/Intermediates.noindex/CompilerCrash.build/Debug-iphonesimulator/CompilerCrash.build/Objects-normal/x86_64/Protocol.d -emit-reference-dependencies-path /Users/david/Library/Developer/Xcode/DerivedData/CompilerCrash-gipsoiznlwkwdkahfsjuhyrdddib/Build/Intermediates.noindex/CompilerCrash.build/Debug-iphonesimulator/CompilerCrash.build/Objects-normal/x86_64/Protocol.swiftdeps -o /Users/david/Library/Developer/Xcode/DerivedData/CompilerCrash-gipsoiznlwkwdkahfsjuhyrdddib/Build/Intermediates.noindex/CompilerCrash.build/Debug-iphonesimulator/CompilerCrash.build/Objects-normal/x86_64/Protocol.o -index-store-path /Users/david/Library/Developer/Xcode/DerivedData/CompilerCrash-gipsoiznlwkwdkahfsjuhyrdddib/Index/DataStore -index-system-modules
Metadata
Metadata
Assignees
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itselfcrashBug: A crash, i.e., an abnormal termination of softwareBug: A crash, i.e., an abnormal termination of software