-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Open
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 softwarelibrary evolutionFeature: library evolution (umbrella feature for features that facilitate resilient libraries)Feature: library evolution (umbrella feature for features that facilitate resilient libraries)
Description
Previous ID | SR-11483 |
Radar | rdar://problem/55442325 |
Original Reporter | @keith |
Type | Bug |
Environment
Xcode 11.0 (11A420a)
Additional Detail from JIRA
Votes | 0 |
Component/s | Compiler |
Labels | Bug, CompilerCrash, LibraryEvolution |
Assignee | None |
Priority | Medium |
md5: 3630241aff317b63db0456e6e77ede35
Issue Description:
With this code:
import UIKit
public protocol Foo: UITableViewHeaderFooterView {
init()
}
If you compile it with:
xcrun -sdk iphonesimulator swiftc -target x86_64-apple-ios11.0-simulator -parse-as-library -enable-library-evolution -emit-module-interface-path foo.swiftinterface -module-name foo -emit-object "foo.swift"
You get this crash:
loading unsized types is not allowed
load void, void* %19, align 8
Function return type does not match operand type of return inst!
ret void <badref>
%TSo023UITableViewHeaderFooterB0C*in function $s3foo3FooPxycfC
<unknown>:0: error: fatal error encountered during compilation; please file a bug report with your project and the crash log
<unknown>:0: note: Broken function found, compilation aborted!
Stack dump:
0. Program arguments: /Applications/Xcode-11.0.0-GM2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c -primary-file foo.swift -emit-module-path /var/folders/q5/7_wh20z93c74nj3tllwjl5nr0000gn/T/foo-5b9f4b.swiftmodule -emit-module-doc-path /var/folders/q5/7_wh20z93c74nj3tllwjl5nr0000gn/T/foo-5b9f4b.swiftdoc -target x86_64-apple-ios11.0-simulator -enable-objc-interop -sdk /Applications/Xcode-11.0.0-GM2.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.0.sdk -enable-library-evolution -color-diagnostics -parse-as-library -module-name foo -o /var/folders/q5/7_wh20z93c74nj3tllwjl5nr0000gn/T/foo-5b9f4b.o
1. Running pass 'Module Verifier' on function '@"$s3foo3FooPxycfC"'
0 swift 0x000000010d3fdeb3 PrintStackTraceSignalHandler(void*) + 51
1 swift 0x000000010d3fd686 SignalHandler(int) + 358
2 libsystem_platform.dylib 0x00007fff7cc51b5d _sigtramp + 29
3 libsystem_platform.dylib 0x00007ffee6c46280 _sigtramp + 1778337600
4 libsystem_c.dylib 0x00007fff7cb0b6a6 abort + 127
5 swift 0x000000010904c330 std::__1::unique_ptr<swift::DiagnosticConsumer, std::__1::default_delete<swift::DiagnosticConsumer> > llvm::function_ref<std::__1::unique_ptr<swift::DiagnosticConsumer, std::__1::default_delete<swift::DiagnosticConsumer> > (swift::InputFile const&)>::callback_fn<createSerializedDiagnosticConsumerIfNeeded(swift::FrontendInputsAndOutputs const&)::$_15>(long, swift::InputFile const&) + 0
6 swift 0x000000010d376cd6 llvm::report_fatal_error(llvm::Twine const&, bool) + 278
7 swift 0x000000010d376bbb llvm::report_fatal_error(char const*, bool) + 43
8 swift 0x000000010d336f23 (anonymous namespace)::VerifierLegacyPass::runOnFunction(llvm::Function&) + 115
9 swift 0x000000010d2d9196 llvm::FPPassManager::runOnFunction(llvm::Function&) + 1590
10 swift 0x000000010d2e410e llvm::legacy::FunctionPassManager::run(llvm::Function&) + 446
11 swift 0x00000001092640d8 swift::performLLVM(swift::IRGenOptions&, swift::DiagnosticEngine*, llvm::sys::SmartMutex<false>*, llvm::GlobalVariable*, llvm::Module*, llvm::TargetMachine*, swift::version::Version const&, llvm::StringRef, swift::UnifiedStatsReporter*) + 4648
12 swift 0x0000000109055de3 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 38307
13 swift 0x0000000109049034 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 6820
14 swift 0x0000000108fd65a3 main + 1219
15 libdyld.dylib 0x00007fff7ca663d5 start + 1
<unknown>:0: error: unable to execute command: Abort trap: 6
<unknown>:0: error: compile command failed due to signal 6 (use -v to see invocation)
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 softwarelibrary evolutionFeature: library evolution (umbrella feature for features that facilitate resilient libraries)Feature: library evolution (umbrella feature for features that facilitate resilient libraries)