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
Jun 6, 2020
· 1 comment
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
Also tested with master toolchain from May 26, same crash.
Additional Detail from JIRA
Votes
0
Component/s
Compiler
Labels
Bug, CompilerCrash
Assignee
None
Priority
Medium
md5: 43a1b65c9bb71139cf13e56a3c12128e
Issue Description:
I've created a dummy KVO on "description". This is a trick to make KVO subclass but never actually emit anything; this however crashes the Swift compiler. I expect that this is either compiled or errors. (I fully realize this is a weird example, but it's fairly small - I tried to reproduce it into an even smaller example and failed, still wanted to report)
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
Xcode Version 11.5 (11E608c)
Also tested with master toolchain from May 26, same crash.
Additional Detail from JIRA
md5: 43a1b65c9bb71139cf13e56a3c12128e
Issue Description:
I've created a dummy KVO on "description". This is a trick to make KVO subclass but never actually emit anything; this however crashes the Swift compiler. I expect that this is either compiled or errors. (I fully realize this is a weird example, but it's fairly small - I tried to reproduce it into an even smaller example and failed, still wanted to report)
Code is open source: https://github.com/steipete/InterposeKit/tree/peter/segfault-11-swift-5-2-4
Stack dump:
0. Program arguments: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/steipete/Projects/InterposeKit/Sources/InterposeKit/ClassTask.swift /Users/steipete/Projects/InterposeKit/Sources/InterposeKit/InterposeKit.swift -primary-file /Users/steipete/Projects/InterposeKit/Sources/InterposeKit/ObjectTask.swift -emit-module-path /Users/steipete/Builds/InterposeKit-diayhexpyguubtenduutqzfjxvbu/Build/Intermediates.noindex/InterposeKit.build/Debug-iphonesimulator/InterposeKit.build/Objects-normal/x86_64/ObjectTask~partial.swiftmodule -emit-module-doc-path /Users/steipete/Builds/InterposeKit-diayhexpyguubtenduutqzfjxvbu/Build/Intermediates.noindex/InterposeKit.build/Debug-iphonesimulator/InterposeKit.build/Objects-normal/x86_64/ObjectTask~partial.swiftdoc -emit-module-source-info-path /Users/steipete/Builds/InterposeKit-diayhexpyguubtenduutqzfjxvbu/Build/Intermediates.noindex/InterposeKit.build/Debug-iphonesimulator/InterposeKit.build/Objects-normal/x86_64/ObjectTask~partial.swiftsourceinfo -serialize-diagnostics-path /Users/steipete/Builds/InterposeKit-diayhexpyguubtenduutqzfjxvbu/Build/Intermediates.noindex/InterposeKit.build/Debug-iphonesimulator/InterposeKit.build/Objects-normal/x86_64/ObjectTask.dia -emit-dependencies-path /Users/steipete/Builds/InterposeKit-diayhexpyguubtenduutqzfjxvbu/Build/Intermediates.noindex/InterposeKit.build/Debug-iphonesimulator/InterposeKit.build/Objects-normal/x86_64/ObjectTask.d -emit-reference-dependencies-path /Users/steipete/Builds/InterposeKit-diayhexpyguubtenduutqzfjxvbu/Build/Intermediates.noindex/InterposeKit.build/Debug-iphonesimulator/InterposeKit.build/Objects-normal/x86_64/ObjectTask.swiftdeps -target x86_64-apple-ios11.0-simulator -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk -I /Users/steipete/Builds/InterposeKit-diayhexpyguubtenduutqzfjxvbu/Build/Products/Debug-iphonesimulator -I /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/lib -F /Users/steipete/Builds/InterposeKit-diayhexpyguubtenduutqzfjxvbu/Build/Products/Debug-iphonesimulator -F /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks -enable-testing -g -module-cache-path /Users/steipete/Builds/ModuleCache.noindex -profile-generate -profile-coverage-mapping -swift-version 5 -enforce-exclusivity=checked -Onone -D SWIFT_PACKAGE -D DEBUG -D Xcode -serialize-debugging-options -Xcc -working-directory -Xcc /Users/steipete/Projects/InterposeKit -enable-anonymous-context-mangled-names -Xcc -I/Users/steipete/Builds/InterposeKit-diayhexpyguubtenduutqzfjxvbu/Build/Intermediates.noindex/InterposeKit.build/Debug-iphonesimulator/InterposeKit.build/swift-overrides.hmap -Xcc -I/Users/steipete/Builds/InterposeKit-diayhexpyguubtenduutqzfjxvbu/Build/Products/Debug-iphonesimulator/include -Xcc -I/Users/steipete/Builds/InterposeKit-diayhexpyguubtenduutqzfjxvbu/Build/Intermediates.noindex/InterposeKit.build/Debug-iphonesimulator/InterposeKit.build/DerivedSources-normal/x86_64 -Xcc -I/Users/steipete/Builds/InterposeKit-diayhexpyguubtenduutqzfjxvbu/Build/Intermediates.noindex/InterposeKit.build/Debug-iphonesimulator/InterposeKit.build/DerivedSources/x86_64 -Xcc -I/Users/steipete/Builds/InterposeKit-diayhexpyguubtenduutqzfjxvbu/Build/Intermediates.noindex/InterposeKit.build/Debug-iphonesimulator/InterposeKit.build/DerivedSources -Xcc -DSWIFT_PACKAGE -Xcc -DDEBUG=1 -module-name InterposeKit -o /Users/steipete/Builds/InterposeKit-diayhexpyguubtenduutqzfjxvbu/Build/Intermediates.noindex/InterposeKit.build/Debug-iphonesimulator/InterposeKit.build/Objects-normal/x86_64/ObjectTask.o -index-store-path /Users/steipete/Builds/InterposeKit-diayhexpyguubtenduutqzfjxvbu/Index/DataStore -index-system-modules
1. Apple Swift version 5.2.4 (swiftlang-1103.0.32.9 clang-1103.0.32.53)
2. While emitting IR SIL function "@$sSo7NSProxyC11descriptionSSvpyXlTK".
for expression at [/Users/steipete/Projects/InterposeKit/Sources/InterposeKit/ObjectTask.swift:52:17 - line:52:35] RangeText="\.objectToObserve."
0 swift 0x00000001089274ea PrintStackTraceSignalHandler(void*) + 42
1 swift 0x0000000108926cc0 SignalHandler(int) + 352
2 libsystem_platform.dylib 0x00007fff708ff5fd _sigtramp + 29
3 libsystem_platform.dylib 0x00007fdbfc033200 _sigtramp + 2339585056
4 swift 0x00000001087accd9 llvm::CastInst::Create(llvm::Instruction::CastOps, llvm::Value*, llvm::Type*, llvm::Twine const&, llvm::Instruction*) + 873
5 swift 0x00000001048b974b swift::SILInstructionVisitor<(anonymous namespace)::IRGenSILFunction, void>::visit(swift::SILInstruction*) + 33211
6 swift 0x00000001048ae053 swift::irgen::IRGenModule::emitSILFunction(swift::SILFunction*) + 8835
7 swift 0x0000000104764336 swift::irgen::IRGenerator::emitLazyDefinitions() + 8790
8 swift 0x000000010488c704 performIRGeneration(swift::IRGenOptions&, swift::ModuleDecl*, std::__1::unique_ptr<swift::SILModule, std::__1::default_delete<swift::SILModule> >, llvm::StringRef, swift::PrimarySpecificPaths const&, llvm::LLVMContext&, swift::SourceFile*, llvm::GlobalVariable**) + 1284
9 swift 0x0000000104683a5f performCompileStepsPostSILGen(swift::CompilerInstance&, swift::CompilerInvocation&, std::__1::unique_ptr<swift::SILModule, std::__1::default_delete<swift::SILModule> >, bool, llvm::PointerUnion<swift::ModuleDecl*, swift::SourceFile*>, swift::PrimarySpecificPaths const&, bool, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 4255
10 swift 0x0000000104678eba swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 48426
11 swift 0x00000001045f0b73 main + 1283
12 libdyld.dylib 0x00007fff70706cc9 start + 1
error: Segmentation fault: 11 (in target 'InterposeKit' from project 'InterposeKit')
The text was updated successfully, but these errors were encountered: