Closed swift-ci closed 4 years ago
With asserts, on master:
Assertion failed: (is<T>() && "Invalid accessor called"), function get, file /Volumes/Data/swift-public/llvm/include/llvm/ADT/PointerUnion.h, line 136.
Stack dump:
0. Program arguments: /Volumes/Data/swift-public/build/ninja/swift-macosx-x86_64/bin/swift -frontend -c -primary-file - -target x86_64-apple-darwin18.6.0 -enable-objc-interop -sdk /Volumes/Data/Applications/Xcode10.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -color-diagnostics -module-name main -o /var/folders/_d/dmrgv26d3bs6lkrks9z825_w0000gn/T/--cf11b8.o
1. Swift version 5.0-dev (LLVM f0b886e419, Swift e5a4b40381)
2. While generating protocol witness thunk SIL function "@$s4main15InMemoryManagerCyqd__GAA05ModelD0A2aEP9doRequest10completionyys5Error_pSgc_tFTW".
for 'doRequest(completion:)' (at <stdin>:12:2)
0 swift 0x00000001139dda35 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 37
1 swift 0x00000001139dccf5 llvm::sys::RunSignalHandlers() + 85
2 swift 0x00000001139de018 SignalHandler(int) + 264
3 libsystem_platform.dylib 0x00007fff6fd8db5d _sigtramp + 29
4 libsystem_platform.dylib 0x00007ffedfd33ee0 _sigtramp + 1878680480
5 libsystem_c.dylib 0x00007fff6fc476a6 abort + 127
6 libsystem_c.dylib 0x00007fff6fc1020d basename_r + 0
7 swift 0x00000001102b5833 swift::Lowering::SILGenModule::useConformance(swift::ProtocolConformanceRef) + 803
8 swift 0x00000001102b55bc swift::Lowering::SILGenModule::useConformance(swift::ProtocolConformanceRef) + 172
9 swift 0x00000001102b5e66 swift::SILInstructionVisitor<LazyConformanceEmitter, void>::visit(swift::SILInstruction*) + 1062
10 swift 0x00000001102b59e3 swift::Lowering::SILGenModule::emitLazyConformancesForFunction(swift::SILFunction*) + 99
11 swift 0x00000001103093eb swift::Lowering::SILGenModule::emitProtocolWitness(swift::ProtocolConformanceRef, swift::SILLinkage, swift::IsSerialized_t, swift::SILDeclRef, swift::SILDeclRef, swift::Lowering::IsFreeFunctionWitness_t, swift::Witness) + 1963
12 swift 0x000000011030b73b (anonymous namespace)::SILGenWitnessTable<(anonymous namespace)::SILGenConformance>::addMethodImplementation(swift::SILDeclRef, swift::SILDeclRef, swift::Witness) + 283
13 swift 0x000000011030b563 (anonymous namespace)::SILGenWitnessTable<(anonymous namespace)::SILGenConformance>::addMethod(swift::SILDeclRef) + 387
14 swift 0x000000011030b0e3 swift::SILWitnessVisitor<(anonymous namespace)::SILGenConformance>::visitProtocolDecl(swift::ProtocolDecl*) + 1507
15 swift 0x0000000110308766 swift::Lowering::SILGenModule::getWitnessTable(swift::NormalProtocolConformance*) + 310
16 swift 0x000000011030a7cf (anonymous namespace)::SILGenType::emitType() + 1983
17 swift 0x000000011030a009 swift::Lowering::SILGenModule::visitNominalTypeDecl(swift::NominalTypeDecl*) + 25
18 swift 0x0000000110228312 swift::Lowering::SILGenModule::emitSourceFile(swift::SourceFile*) + 818
19 swift 0x0000000110229305 swift::SILModule::constructSIL(swift::ModuleDecl*, swift::SILOptions&, swift::FileUnit*) + 293
20 swift 0x0000000110229879 swift::performSILGeneration(swift::FileUnit&, swift::SILOptions&) + 41
21 swift 0x000000010ff260dd performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 8365
22 swift 0x000000010ff22fd2 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2978
23 swift 0x000000010fec9d39 main + 729
24 libdyld.dylib 0x00007fff6fba23d5 start + 1
25 libdyld.dylib 0x000000000000000f start + 2420497467
@slavapestov, @rjmccall, did we have one of these already?
Wait, the 5.0 crash is SR-8814. However the master crash is a new regression! Let's use this JIRA to track the latter.
Thanks ryanmaxwell (JIRA User) and @belkadan!
Attachment: Download
Environment
compile working: Apple Swift version 4.2.1 (swiftlang-1000.11.42 clang-1000.11.45.1) Target: x86_64-apple-darwin18.6.0 compile failing: Apple Swift version 5.0.1 (swiftlang-1001.0.82.4 clang-1001.0.46.5) Target: x86_64-apple-darwin18.6.0Additional Detail from JIRA
| | | |------------------|-----------------| |Votes | 0 | |Component/s | Compiler | |Labels | Bug, 5.0Regression, CompilerCrash | |Assignee | None | |Priority | Medium | md5: 928d2027e39050ee0304bb6b545fec7bduplicates:
Issue Description:
The following code compiles with swift 4.2 compiler, but crashes swift 5.0.1.
Output: