macOS 10.12.5
Xcode 8.3.2
Apple Swift version 4.0-dev (LLVM 99f1de85be, Clang 81c3e9a66e, Swift 4ebd716)
Additional Detail from JIRA
Votes
0
Component/s
Compiler
Labels
Bug, 4.0Regression, CompilerCrash, Serialization
Assignee
None
Priority
Medium
md5: c2f13aae5e9a0de26f9b4211b40e36d7
Issue Description:
I encountered this crash with the swift-DEVELOPMENT-SNAPSHOT-2017-05-19-a toolchain downloaded from swift.org. The issue was/is not present with the swift-DEVELOPMENT-SNAPSHOT-2017-05-10-a toolchain.
swiftc crashes in computeNominalType for the following reduced example:
Compile command that leads to crash: swiftc Sequence.swift main.swift
Changing almost anything else will make the crash disappear (including removing main.swift). Potentially helpful: Renaming Iterator (to for example _Iterator) will stop the crasher.
Full stacktrace:
0 swift 0x000000010c7f2b88 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40
1 swift 0x000000010c7f1b56 llvm::sys::RunSignalHandlers() + 86
2 swift 0x000000010c7f3149 SignalHandler(int) + 361
3 libsystem_platform.dylib 0x00007fffd32a1b3a _sigtramp + 26
4 libsystem_platform.dylib 0x00007fff5665ccd0 _sigtramp + 2201727408
5 swift 0x000000010a5a69ce computeNominalType(swift::NominalTypeDecl*, DeclTypeKind) + 238
6 swift 0x000000010a5a68cf swift::NominalTypeDecl::getDeclaredType() const + 31
7 swift 0x000000010a53f3a4 swift::Mangle::ASTMangler::appendAnyGenericType(swift::GenericTypeDecl const*) + 84
8 swift 0x000000010a53f336 swift::Mangle::ASTMangler::mangleNominalType(swift::NominalTypeDecl const*) + 38
9 swift 0x000000010a1e884c swift::ModuleFile::loadExtensions(swift::NominalTypeDecl*) + 1036
10 swift 0x000000010a23ebf1 swift::SerializedModuleLoader::loadExtensions(swift::NominalTypeDecl*, unsigned int) + 49
11 swift 0x000000010a4ff86f swift::ASTContext::loadExtensions(swift::NominalTypeDecl*, unsigned int) + 63
12 swift 0x000000010a5961bc swift::ConformanceLookupTable::updateLookupTable(swift::NominalTypeDecl*, swift::ConformanceLookupTable::ConformanceStage, swift::LazyResolver*) + 2012
13 swift 0x000000010a595b07 swift::ConformanceLookupTable::updateLookupTable(swift::NominalTypeDecl*, swift::ConformanceLookupTable::ConformanceStage, swift::LazyResolver*) + 295
14 swift 0x000000010a595f4b swift::ConformanceLookupTable::updateLookupTable(swift::NominalTypeDecl*, swift::ConformanceLookupTable::ConformanceStage, swift::LazyResolver*) + 1387
15 swift 0x000000010a599611 swift::ConformanceLookupTable::getAllProtocols(swift::NominalTypeDecl*, swift::LazyResolver*, llvm::SmallVectorImpl<swift::ProtocolDecl*>&) + 33
16 swift 0x000000010a62139b swift::NominalTypeDecl::getAllProtocols() const + 107
17 swift 0x0000000109d76d71 (anonymous namespace)::NominalTypeWalker::walkToDeclPre(swift::Decl*) + 65
18 swift 0x000000010a57af6c (anonymous namespace)::Traversal::doIt(swift::Decl*) + 204
19 swift 0x000000010a57b17a (anonymous namespace)::Traversal::doIt(swift::Decl*) + 730
20 swift 0x000000010a57ae8b swift::Decl::walk(swift::ASTWalker&) + 27
21 swift 0x0000000109d766bb swift::ClassHierarchyAnalysis::init() + 139
22 swift 0x0000000109d69bb9 swift::createClassHierarchyAnalysis(swift::SILModule*) + 153
23 swift 0x0000000109e35e0c swift::SILPassManager::SILPassManager(swift::SILModule*, llvm::StringRef) + 460
24 swift 0x0000000109e41897 swift::runSILDiagnosticPasses(swift::SILModule&) + 135
25 swift 0x00000001095e9f3b performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 8283
26 swift 0x00000001095e6e0a swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2650
27 swift 0x00000001095a3420 main + 3312
28 libdyld.dylib 0x00007fffd3092235 start + 1
29 libdyld.dylib 0x000000000000003b start + 754376199
The text was updated successfully, but these errors were encountered:
Attachment: Download
Environment
macOS 10.12.5
Xcode 8.3.2
Apple Swift version 4.0-dev (LLVM 99f1de85be, Clang 81c3e9a66e, Swift 4ebd716)
Additional Detail from JIRA
md5: c2f13aae5e9a0de26f9b4211b40e36d7
Issue Description:
I encountered this crash with the
swift-DEVELOPMENT-SNAPSHOT-2017-05-19-a
toolchain downloaded from swift.org. The issue was/is not present with theswift-DEVELOPMENT-SNAPSHOT-2017-05-10-a
toolchain.swiftc crashes in
computeNominalType
for the following reduced example:Generic.swift:
main.swift:
Compile command that leads to crash:
swiftc Sequence.swift main.swift
Changing almost anything else will make the crash disappear (including removing main.swift).
Potentially helpful: Renaming
Iterator
(to for example_Iterator
) will stop the crasher.Full stacktrace:
The text was updated successfully, but these errors were encountered: