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-5014] Assertion failure: "failed to find PA's conformance to known protocol" #47591

Closed
aciidb0mb3r opened this issue May 25, 2017 · 4 comments
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler crash A crash that happens during compilation compiler The Swift compiler in itself crash Any kind of crash

Comments

@aciidb0mb3r
Copy link
Member

Previous ID SR-5014
Radar rdar://problem/32402482
Original Reporter @aciidb0mb3r
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, CompilerCrash
Assignee @slavapestov
Priority Medium

md5: 970a6ed1e0f5fd7275c6495b1c4fe1c3

Issue Description:

struct Version {
}

extension CountableRange where Bound == Version {
    func contains(_ element: Version) -> Bool {
        fatalError()
    }
}
$ swift main.swift

Assertion failed: (conformance && "failed to find PA's conformance to known protocol"), function operator(), file /Users/buildnode/jenkins/workspace/oss-swift-package-osx/swift/lib/AST/GenericSignatureBuilder.cpp, line 1955.
0  swift                    0x000000010c84fab8 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40
1  swift                    0x000000010c84ea86 llvm::sys::RunSignalHandlers() + 86
2  swift                    0x000000010c850079 SignalHandler(int) + 361
3  libsystem_platform.dylib 0x00007fff9d348b3a _sigtramp + 26
4  libsystem_platform.dylib 0x0000000000000010 _sigtramp + 1657500912
5  libsystem_c.dylib        0x00007fff9d1cd420 abort + 129
6  libsystem_c.dylib        0x00007fff9d194893 basename_r + 0
7  swift                    0x000000010a649ba6 swift::ProtocolConformanceRef llvm::function_ref<swift::ProtocolConformanceRef (swift::ProtocolDecl*)>::callback_fn<swift::GenericSignatureBuilder::PotentialArchetype::updateNestedTypeForConformance(llvm::PointerUnion<swift::AssociatedTypeDecl*, swift::TypeAliasDecl*>, swift::GenericSignatureBuilder::PotentialArchetype::NestedTypeUpdate)::$_12>(long, swift::ProtocolDecl*) + 470
8  swift                    0x000000010a6358b1 concretizeNestedTypeFromConcreteParent(swift::GenericSignatureBuilder::PotentialArchetype*, swift::GenericSignatureBuilder::RequirementSource const*, swift::GenericSignatureBuilder::PotentialArchetype*, swift::GenericSignatureBuilder&, llvm::function_ref<swift::ProtocolConformanceRef (swift::ProtocolDecl*)>) + 289
9  swift                    0x000000010a634d84 swift::GenericSignatureBuilder::PotentialArchetype::updateNestedTypeForConformance(llvm::PointerUnion<swift::AssociatedTypeDecl*, swift::TypeAliasDecl*>, swift::GenericSignatureBuilder::PotentialArchetype::NestedTypeUpdate) + 2452
10 swift                    0x000000010a63805d swift::GenericSignatureBuilder::resolve(llvm::PointerUnion<swift::GenericSignatureBuilder::PotentialArchetype*, swift::Type>, swift::GenericSignatureBuilder::FloatingRequirementSource) + 173
11 swift                    0x000000010a63c372 swift::GenericSignatureBuilder::addTypeRequirement(llvm::PointerUnion<swift::GenericSignatureBuilder::PotentialArchetype*, swift::Type>, llvm::PointerUnion<swift::GenericSignatureBuilder::PotentialArchetype*, swift::Type>, swift::GenericSignatureBuilder::FloatingRequirementSource, swift::GenericSignatureBuilder::UnresolvedHandlingKind) + 738
12 swift                    0x000000010a63a0b5 swift::GenericSignatureBuilder::addRequirement(swift::Requirement const&, swift::GenericSignatureBuilder::FloatingRequirementSource, swift::ModuleDecl*, swift::SubstitutionMap const*) + 869
13 swift                    0x000000010a638a23 swift::GenericSignatureBuilder::addConformanceRequirement(swift::GenericSignatureBuilder::PotentialArchetype*, swift::ProtocolDecl*, swift::GenericSignatureBuilder::RequirementSource const*) + 387
14 swift                    0x000000010a63c466 swift::GenericSignatureBuilder::addTypeRequirement(llvm::PointerUnion<swift::GenericSignatureBuilder::PotentialArchetype*, swift::Type>, llvm::PointerUnion<swift::GenericSignatureBuilder::PotentialArchetype*, swift::Type>, swift::GenericSignatureBuilder::FloatingRequirementSource, swift::GenericSignatureBuilder::UnresolvedHandlingKind) + 982
15 swift                    0x000000010a63a0b5 swift::GenericSignatureBuilder::addRequirement(swift::Requirement const&, swift::GenericSignatureBuilder::FloatingRequirementSource, swift::ModuleDecl*, swift::SubstitutionMap const*) + 869
16 swift                    0x000000010a647051 swift::GenericSignatureBuilder::InferRequirementsWalker::walkToTypePost(swift::Type) + 241
17 swift                    0x000000010a6a074c swift::Type::walk(swift::TypeWalker&) const + 76
18 swift                    0x000000010a63ebc1 swift::GenericSignatureBuilder::inferRequirements(swift::ModuleDecl&, swift::TypeLoc, swift::GenericSignatureBuilder::FloatingRequirementSource) + 97
19 swift                    0x000000010a4e4c2c void llvm::function_ref<void (swift::GenericSignatureBuilder&)>::callback_fn<checkExtensionGenericParams(swift::TypeChecker&, swift::ExtensionDecl*, swift::Type, swift::GenericParamList*)::$_38>(long, swift::GenericSignatureBuilder&) + 140
20 swift                    0x000000010a4f22f6 swift::TypeChecker::checkGenericEnvironment(swift::GenericParamList*, swift::DeclContext*, swift::GenericSignature*, bool, llvm::function_ref<void (swift::GenericSignatureBuilder&)>) + 630
21 swift                    0x000000010a4cafea checkExtensionGenericParams(swift::TypeChecker&, swift::ExtensionDecl*, swift::Type, swift::GenericParamList*) + 170
22 swift                    0x000000010a4bf520 swift::TypeChecker::validateExtension(swift::ExtensionDecl*) + 320
23 swift                    0x000000010a4d399e (anonymous namespace)::DeclChecker::visitExtensionDecl(swift::ExtensionDecl*) + 30
24 swift                    0x000000010a4c4b64 (anonymous namespace)::DeclChecker::visit(swift::Decl*) + 260
25 swift                    0x000000010a4c4a54 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 100
26 swift                    0x000000010a5498f4 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1556
27 swift                    0x000000010a09cc50 swift::CompilerInstance::performSema() + 3616
28 swift                    0x0000000109635e9b performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 2427
29 swift                    0x000000010963444a swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2650
30 swift                    0x00000001095f0f40 main + 3312
31 libdyld.dylib            0x00007fff9d139235 start + 1
Stack dump:
@belkadan
Copy link
Contributor

@swift-ci create

@belkadan
Copy link
Contributor

@huonw, @slavapestov, any ideas?

@slavapestov
Copy link
Member

Might be related to https://bugs.swift.org/browse/SR-4295.

@DougGregor
Copy link
Member

3615c69

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added the crash Any kind of crash label Dec 12, 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. compiler crash A crash that happens during compilation compiler The Swift compiler in itself crash Any kind of crash
Projects
None yet
Development

No branches or pull requests

5 participants