Skip to content

Assertion `iter != ExistentialConformances.end() && "missing conformance"' failed #92422

Description

@YuanchengJiang

The following code:

actor CustomActor {
}
func f() {
}
class CustomIsolated {
}
protocol Boopable: ~Copyable {
  func boop()
}
struct S: ~Copyable, Boopable {
  func boop() { print("boop") }
}
func borrow(_ b: borrowing any Boopable & ~Copyable) {
  b.boop()
}
borrow(S())

Resulted in this output:

Assertion `iter != ExistentialConformances.end() && "missing conformance"' failed. (exit -6)
Stack dump:
#10 swift::InFlightSubstitution::lookupConformance(swift::Type, swift::ProtocolDecl*, unsigned int)
#11 swift::SubstitutionMap::get(swift::GenericSignature, llvm::ArrayRef<swift::Type>, swift::InFlightSubstitution&)
#12 swift::SubstitutionMap::get(swift::GenericSignature, swift::InFlightSubstitution&)
#13 swift::SubstitutionMap::get(swift::GenericSignature, llvm::function_ref<swift::Type (swift::SubstitutableType*)>, llvm::function_ref<swift::Protoc
#14 swift::ConcreteExistentialInfo::initializeSubstitutionMap(llvm::ArrayRef<swift::ProtocolConformanceRef>, swift::SILModule*)
#15 swift::ConcreteExistentialInfo::ConcreteExistentialInfo(swift::SILValue, swift::SILInstruction*, swift::CanType, swift::ProtocolDecl*)

To reproduce:

swift -frontend -c -Osize ./min.swift

Compiler version:

Swift version 6.5-dev (LLVM 47afa53ea425e20, Swift 871a239941f3613)
Target: x86_64-unknown-linux-gnu
Build config: +assertions

Operating System:

Ubuntu 22.04 host, Docker image fusion-fuzz-swift:latest

This bug was found by fusion-fuzz

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    crashBug: A crash, i.e., an abnormal termination of softwaretriage neededThis issue needs more specific labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions