Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-12607] 5.2 Crasher #55051

Closed
dduan opened this issue Apr 16, 2020 · 0 comments
Closed

[SR-12607] 5.2 Crasher #55051

dduan opened this issue Apr 16, 2020 · 0 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.

Comments

@dduan
Copy link
Collaborator

dduan commented Apr 16, 2020

Previous ID SR-12607
Radar None
Original Reporter @dduan
Type Bug
Status Resolved
Resolution Duplicate
Environment

Version 11.3.1 (11C505)

Additional Detail from JIRA
Votes 0
Component/s
Labels Bug
Assignee None
Priority Medium

md5: 0255a283fd5bd5170bf9318bd7492636

duplicates:

  • SR-8814 GenericSignatureBuilder should re-introduce conformance requirements when adding a superclass requirement

Issue Description:

Compiling the following code leads to compiler crash:

protocol P {
    associatedtype B: Equatable
    func f()
}
extension P {
    func f() {}
}
class C<B>: P where B: Equatable {}

The backtrace from Swift 5.2

Stack dump:
0.  Program arguments: /Applications/Xcode_11.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -interpret /tmp/test.swift -enable-objc-interop -stack-check -sdk /Applications/Xcode_11.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -module-name test -- -o /tmp/a 
1.  Apple Swift version 5.2 (swiftlang-1103.0.32.1 clang-1103.0.32.29)
2.  While generating SIL witness table protocol conformance to 'P' (at /tmp/test.swift:1:1) for type 'C<B>' (declared at [/tmp/test.swift:8:1 - line:8:35] RangeText="class C<B>: P where B: Equatable {")
3.  While generating protocol witness thunk SIL function "@$s4test1CCyqd__GAA1PA2aEP1fyyFTW".
 for 'f()' (at /tmp/test.swift:6:5)
0  swift                    0x0000000104c014ea PrintStackTraceSignalHandler(void*) + 42
1  swift                    0x0000000104c00cc0 SignalHandler(int) + 352
2  libsystem_platform.dylib 0x00007fff711585fd _sigtramp + 29
3  libsystem_platform.dylib 0x00007ffeef34fc20 _sigtramp + 2115991104
4  swift                    0x0000000100e078ad swift::Lowering::SILGenModule::useConformance(swift::ProtocolConformanceRef) + 173
5  swift                    0x0000000100e0958d swift::Lowering::SILGenModule::emitLazyConformancesForFunction(swift::SILFunction*) + 1277
6  swift                    0x0000000100e5df2e swift::Lowering::SILGenModule::emitProtocolWitness(swift::ProtocolConformanceRef, swift::SILLinkage, swift::IsSerialized_t, swift::SILDeclRef, swift::SILDeclRef, swift::Lowering::IsFreeFunctionWitness_t, swift::Witness) + 2702
7  swift                    0x0000000100e5d426 (anonymous namespace)::SILGenWitnessTable<(anonymous namespace)::SILGenConformance>::addMethod(swift::SILDeclRef) + 902
8  swift                    0x0000000100e5c9dd swift::SILWitnessVisitor<(anonymous namespace)::SILGenConformance>::visitProtocolDecl(swift::ProtocolDecl*) + 1805
9  swift                    0x0000000100e5bf86 swift::Lowering::SILGenModule::getWitnessTable(swift::NormalProtocolConformance*) + 550
10 swift                    0x0000000100e61b68 (anonymous namespace)::SILGenType::emitType() + 6840
11 swift                    0x0000000100d725e2 swift::ASTVisitor<swift::Lowering::SILGenModule, void, void, void, void, void, void>::visit(swift::Decl*) + 82
12 swift                    0x0000000100d717ac swift::Lowering::SILGenModule::emitSourceFile(swift::SourceFile*) + 1356
13 swift                    0x0000000100d7388a swift::SILModule::constructSIL(swift::ModuleDecl*, swift::Lowering::TypeConverter&, swift::SILOptions&, swift::FileUnit*) + 1530
14 swift                    0x00000001009553cb swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 55595
15 swift                    0x00000001008cb4d3 main + 1283
16 libdyld.dylib            0x00007fff70f5fcc9 start + 1
@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.
Projects
None yet
Development

No branches or pull requests

1 participant