You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
swift-ci opened this issue
Nov 15, 2017
· 2 comments
Assignees
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler in itselfcrashBug: A crash, i.e., an abnormal termination of software
Generic version of the enum used to report SR-6381 causes a compiler crash, as follows:
gmilos:/tmp/repro/sr/crash$
swift build
Compile Swift Module 'ContextMemoryLeakRepro' (1 sources)
Assertion failed: ((options.contains(SubstFlags::AllowLoweredTypes) || !isa(type)) && "should not be doing AST type-substitution on a lowered SIL type;" "use SILType::subst"), function operator(), file /Users/buildnode/jenkins/workspace/oss-swift-package-osx/swift/lib/AST/Type.cpp, line 3209.
0 swift 0x000000011123fdb8 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40
1 swift 0x000000011123ed06 llvm::sys::RunSignalHandlers() + 86
2 swift 0x000000011124037e SignalHandler(int) + 366
3 libsystem_platform.dylib 0x00007fff62206f5a _sigtramp + 26
4 libsystem_platform.dylib 0x00007ffee1e41297 _sigtramp + 2143527767
5 libsystem_c.dylib 0x00007fff62031312 abort + 127
6 libsystem_c.dylib 0x00007fff61ff9368 basename_r + 0
7 swift 0x000000010ef16c2c llvm::Optionalswift::Type llvm::function_ref<llvm::Optionalswift::Type (swift::TypeBase*)>::callback_fn<substType(swift::Type, llvm::function_ref<swift::Type (swift::SubstitutableType*)>, llvm::function_ref<llvm::Optionalswift::ProtocolConformanceRef (swift::CanType, swift::Type, swift::ProtocolType*)>, swift::SubstOptions)::$_18>(long, swift::TypeBase*) + 2124
8 swift 0x000000010ef1318a swift::Type::transformRec(llvm::function_ref<llvm::Optionalswift::Type (swift::TypeBase*)>) const + 154
9 swift 0x000000010ef1351b swift::Type::transformRec(llvm::function_ref<llvm::Optionalswift::Type (swift::TypeBase*)>) const + 1067
10 swift 0x000000010ef13a3d swift::Type::transformRec(llvm::function_ref<llvm::Optionalswift::Type (swift::TypeBase*)>) const + 2381
11 swift 0x000000010ef13a3d swift::Type::transformRec(llvm::function_ref<llvm::Optionalswift::Type (swift::TypeBase*)>) const + 2381
12 swift 0x000000010ef11aa3 substType(swift::Type, llvm::function_ref<swift::Type (swift::SubstitutableType*)>, llvm::function_ref<llvm::Optionalswift::ProtocolConformanceRef (swift::CanType, swift::Type, swift::ProtocolType*)>, swift::SubstOptions) + 211
13 swift 0x000000010ef11082 swift::Type::subst(llvm::function_ref<swift::Type (swift::SubstitutableType*)>, llvm::function_ref<llvm::Optionalswift::ProtocolConformanceRef (swift::CanType, swift::Type, swift::ProtocolType*)>, swift::SubstOptions) const + 130
14 swift 0x000000010ef04e93 swift::SubstitutionMap::subst(llvm::function_ref<swift::Type (swift::SubstitutableType*)>, llvm::function_ref<llvm::Optionalswift::ProtocolConformanceRef (swift::CanType, swift::Type, swift::ProtocolType*)>) const + 323
15 swift 0x000000010ef164ba llvm::Optionalswift::Type llvm::function_ref<llvm::Optionalswift::Type (swift::TypeBase*)>::callback_fn<substType(swift::Type, llvm::function_ref<swift::Type (swift::SubstitutableType*)>, llvm::function_ref<llvm::Optionalswift::ProtocolConformanceRef (swift::CanType, swift::Type, swift::ProtocolType*)>, swift::SubstOptions)::$_18>(long, swift::TypeBase*) + 218
16 swift 0x000000010ef1318a swift::Type::transformRec(llvm::function_ref<llvm::Optionalswift::Type (swift::TypeBase*)>) const + 154
17 swift 0x000000010ef11aa3 substType(swift::Type, llvm::function_ref<swift::Type (swift::SubstitutableType*)>, llvm::function_ref<llvm::Optionalswift::ProtocolConformanceRef (swift::CanType, swift::Type, swift::ProtocolType*)>, swift::SubstOptions) + 211
18 swift 0x000000010ef11082 swift::Type::subst(llvm::function_ref<swift::Type (swift::SubstitutableType*)>, llvm::function_ref<llvm::Optionalswift::ProtocolConformanceRef (swift::CanType, swift::Type, swift::ProtocolType*)>, swift::SubstOptions) const + 130
19 swift 0x000000010df32ea5 swift::irgen::TypeConverter::getExemplarType(swift::CanType) + 133
20 swift 0x000000010df32a2b swift::irgen::TypeConverter::getTypeEntry(swift::CanType) + 395
21 swift 0x000000010df324ce swift::irgen::IRGenModule::getTypeInfo(swift::SILType) + 46
22 swift 0x000000010df3249c swift::irgen::IRGenFunction::getTypeInfo(swift::SILType) + 12
23 swift 0x000000010df6955e (anonymous namespace)::IRGenSILFunction::emitSILFunction() + 1102
24 swift 0x000000010df68c06 swift::irgen::IRGenModule::emitSILFunction(swift::SILFunction*) + 1382
25 swift 0x000000010de84972 swift::irgen::IRGenerator::emitGlobalTopLevel() + 450
26 swift 0x000000010df45127 performIRGeneration(swift::IRGenOptions&, swift::ModuleDecl*, std::__1::unique_ptr<swift::SILModule, std::__1::default_deleteswift::SILModule >, llvm::StringRef, llvm::LLVMContext&, swift::SourceFile*, llvm::GlobalVariable**, unsigned int) + 1159
27 swift 0x000000010df457b6 swift::performIRGeneration(swift::IRGenOptions&, swift::SourceFile&, std::__1::unique_ptr<swift::SILModule, std::__1::default_deleteswift::SILModule >, llvm::StringRef, llvm::LLVMContext&, unsigned int, llvm::GlobalVariable**) + 86
28 swift 0x000000010ddffb27 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 13511
29 swift 0x000000010ddfb723 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 3315
30 swift 0x000000010ddbbf60 main + 3360
31 libdyld.dylib 0x00007fff61f85115 start + 1
Stack dump:
0. Program arguments: /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2017-11-14-a.xctoolchain/usr/bin/swift -frontend -c -primary-file /private/tmp/repro/sr/crash/Sources/ContextMemoryLeakRepro/main.swift -target x86_64-apple-macosx10.10 -enable-objc-interop -sdk /Applications/Xcode.real.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -I /private/tmp/repro/sr/crash/.build/x86_64-apple-macosx10.10/debug -F /Applications/Xcode.real.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -enable-testing -g -module-cache-path /private/tmp/repro/sr/crash/.build/x86_64-apple-macosx10.10/debug/ModuleCache -swift-version 4 -Onone -D SWIFT_PACKAGE -emit-module-doc-path /private/tmp/repro/sr/crash/.build/x86_64-apple-macosx10.10/debug/ContextMemoryLeakRepro.build/mainpartial.swiftdoc -module-name ContextMemoryLeakRepro -emit-module-path /private/tmp/repro/sr/crash/.build/x86_64-apple-macosx10.10/debug/ContextMemoryLeakRepro.build/mainpartial.swiftmodule -emit-dependencies-path /private/tmp/repro/sr/crash/.build/x86_64-apple-macosx10.10/debug/ContextMemoryLeakRepro.build/main.d -emit-reference-dependencies-path /private/tmp/repro/sr/crash/.build/x86_64-apple-macosx10.10/debug/ContextMemoryLeakRepro.build/main.swiftdeps -num-threads 8 -o /private/tmp/repro/sr/crash/.build/x86_64-apple-macosx10.10/debug/ContextMemoryLeakRepro.build/main.swift.o
While emitting IR SIL function "@_T022ContextMemoryLeakRepro4ListO4findxycSgSi3key_tF".
for 'find(key:)' at /private/tmp/repro/sr/crash/Sources/ContextMemoryLeakRepro/main.swift:7:5
:0: error: unable to execute command: Abort trap: 6
:0: error: compile command failed due to signal 6 (use -v to see invocation)
error: terminated(1): /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2017-11-14-a.xctoolchain/usr/bin/swift-build-tool -f /private/tmp/repro/sr/crash/.build/debug.yaml main
Attaching the sources in the tarball (again, same as SR-6381).
The text was updated successfully, but these errors were encountered:
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler in itselfcrashBug: A crash, i.e., an abnormal termination of software
Attachment: Download
Environment
(i.e. swift-DEVELOPMENT-SNAPSHOT-2017-11-14-a)
Also reproduced with 4.0-RELEASE and 4.0.2-RELEASE
Additional Detail from JIRA
md5: 7e69bab553b138adf18aed2433dccfa4
Issue Description:
Generic version of the enum used to report SR-6381 causes a compiler crash, as follows:
Attaching the sources in the tarball (again, same as SR-6381).
The text was updated successfully, but these errors were encountered: