From d2ac43d99d97bd37001f107310e59c862579b6f1 Mon Sep 17 00:00:00 2001 From: Hamish Knight Date: Mon, 22 Sep 2025 10:16:51 +0100 Subject: [PATCH] [test] Add some more known crashers --- validation-test/IDE/crashers/77896730013ed459.swift | 6 ++++++ validation-test/IDE/crashers/825c80698a299f80.swift | 10 ++++++++++ validation-test/IDE/crashers/ead1bd1fccd220ab.swift | 4 ++++ .../compiler_crashers_2/511f277d722d94a4.swift | 5 +++++ .../compiler_crashers_2/88e136b5aa17e82f.swift | 5 +++++ .../compiler_crashers_2/da64654c0068fd69.swift | 6 ++++++ .../compiler_crashers_2/dda1d9031373fa50.swift | 3 +++ 7 files changed, 39 insertions(+) create mode 100644 validation-test/IDE/crashers/77896730013ed459.swift create mode 100644 validation-test/IDE/crashers/825c80698a299f80.swift create mode 100644 validation-test/IDE/crashers/ead1bd1fccd220ab.swift create mode 100644 validation-test/compiler_crashers_2/511f277d722d94a4.swift create mode 100644 validation-test/compiler_crashers_2/88e136b5aa17e82f.swift create mode 100644 validation-test/compiler_crashers_2/da64654c0068fd69.swift create mode 100644 validation-test/compiler_crashers_2/dda1d9031373fa50.swift diff --git a/validation-test/IDE/crashers/77896730013ed459.swift b/validation-test/IDE/crashers/77896730013ed459.swift new file mode 100644 index 0000000000000..e1ff5b77f630e --- /dev/null +++ b/validation-test/IDE/crashers/77896730013ed459.swift @@ -0,0 +1,6 @@ +// {"kind":"complete","original":"0b556db7","signature":"diagnoseMatch(swift::ModuleDecl*, swift::NormalProtocolConformance*, swift::ValueDecl*, swift::RequirementMatch const&)","signatureAssert":"Assertion failed: (isa(Requirement) && \"Unhandled requirement kind\"), function getProtocolRequirementKind"} +// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s +protocol a { + #^^# macro b + struct c: a { +b diff --git a/validation-test/IDE/crashers/825c80698a299f80.swift b/validation-test/IDE/crashers/825c80698a299f80.swift new file mode 100644 index 0000000000000..b137bcd0d303b --- /dev/null +++ b/validation-test/IDE/crashers/825c80698a299f80.swift @@ -0,0 +1,10 @@ +// {"kind":"complete","original":"081c2cc3","signature":"abortWithVerificationError"} +// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s +protocol a { + associatedtype b: SignedInteger + c, + : { + } +} +extension a { + d: SignedInteger, #^^# diff --git a/validation-test/IDE/crashers/ead1bd1fccd220ab.swift b/validation-test/IDE/crashers/ead1bd1fccd220ab.swift new file mode 100644 index 0000000000000..9aafcebdf891f --- /dev/null +++ b/validation-test/IDE/crashers/ead1bd1fccd220ab.swift @@ -0,0 +1,4 @@ +// {"kind":"complete","original":"57e49e10","signature":"finishStorageImplInfo(swift::AbstractStorageDecl*, swift::StorageImplInfo&)"} +// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s +class a { +lazy(b, c) { b#^^# diff --git a/validation-test/compiler_crashers_2/511f277d722d94a4.swift b/validation-test/compiler_crashers_2/511f277d722d94a4.swift new file mode 100644 index 0000000000000..5b2c0e253157d --- /dev/null +++ b/validation-test/compiler_crashers_2/511f277d722d94a4.swift @@ -0,0 +1,5 @@ +// {"kind":"typecheck","original":"098f0ede","signature":"swift::constraints::ConstraintSystem::getMemberReferenceTypeFromOpenedType(swift::Type, swift::Type, swift::ValueDecl*, swift::constraints::ConstraintLocator*, bool, bool)","signatureAssert":"Assertion failed: (isa(Val) && \"cast() argument of incompatible type!\"), function cast"} +// RUN: not --crash %target-swift-frontend -typecheck %s +enum a { + c = d macro d() +} diff --git a/validation-test/compiler_crashers_2/88e136b5aa17e82f.swift b/validation-test/compiler_crashers_2/88e136b5aa17e82f.swift new file mode 100644 index 0000000000000..88eb41a7dece8 --- /dev/null +++ b/validation-test/compiler_crashers_2/88e136b5aa17e82f.swift @@ -0,0 +1,5 @@ +// {"kind":"typecheck","original":"3a2652c9","signature":"(anonymous namespace)::OpaqueUnderlyingTypeChecker::check()","signatureAssert":"Assertion failed: (!UniqueUnderlyingType.has_value() && \"resetting underlying type?!\"), function setUniqueUnderlyingTypeSubstitutions"} +// RUN: not --crash %target-swift-frontend -typecheck %s +var a: some Any = 0.0 { + 0 +} diff --git a/validation-test/compiler_crashers_2/da64654c0068fd69.swift b/validation-test/compiler_crashers_2/da64654c0068fd69.swift new file mode 100644 index 0000000000000..77cffb7cf51bf --- /dev/null +++ b/validation-test/compiler_crashers_2/da64654c0068fd69.swift @@ -0,0 +1,6 @@ +// {"kind":"typecheck","original":"d896f132","signature":"swift::constraints::MissingConformanceFailure::MissingConformanceFailure(swift::constraints::Solution const&, swift::constraints::ConstraintLocator*, std::__1::pair)","signatureAssert":"Assertion failed: (getGenericContext() && \"Affected decl not within a generic context?\"), function RequirementFailure"} +// RUN: not --crash %target-swift-frontend -typecheck %s +let a = + { + 0 ? [a] : [1&&: <#expression#>] + }[<#expression#>] diff --git a/validation-test/compiler_crashers_2/dda1d9031373fa50.swift b/validation-test/compiler_crashers_2/dda1d9031373fa50.swift new file mode 100644 index 0000000000000..5f2ae9b44c7f1 --- /dev/null +++ b/validation-test/compiler_crashers_2/dda1d9031373fa50.swift @@ -0,0 +1,3 @@ +// {"kind":"typecheck","original":"0fdef466","signature":"(anonymous namespace)::ExprRewriter::finishApply(swift::ApplyExpr*, swift::Type, swift::constraints::ConstraintLocatorBuilder, swift::constraints::ConstraintLocatorBuilder)","signatureAssert":"Assertion failed: (isa(Val) && \"cast() argument of incompatible type!\"), function cast"} +// RUN: not --crash %target-swift-frontend -typecheck %s +protocol a func b(c : a) { _openExistential(c do: b