Skip to content

[test] Add some more known crashers #83368

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

Merged
merged 3 commits into from
Jul 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions validation-test/IDE/crashers/38a36bbefc496da.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// {"kind":"complete","original":"61e9155a","signature":"swift::ide::ContextFreeCodeCompletionResult::getCodeCompletionDeclKind(swift::Decl const*)"}
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
extension ()
where
#^^# == <#type#>
{
}
5 changes: 5 additions & 0 deletions validation-test/IDE/crashers/928f167118f85cf.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// {"kind":"complete","original":"7bbb1dc5","signature":"swift::TypeRepr::print(swift::ASTPrinter&, swift::PrintOptions const&, swift::optionset::OptionSet<swift::NonRecursivePrintOption, unsigned int>) const"}
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
a ? {
init { b { extension
}#^^#
6 changes: 6 additions & 0 deletions validation-test/IDE/crashers/9f45d664f93ae6f7.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// {"kind":"complete","original":"588b7eea","signature":"swift::BoundGenericType::get(swift::NominalTypeDecl*, swift::Type, llvm::ArrayRef<swift::Type>)"}
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
// REQUIRES: OS=macosx
import Foundation
Foundation[
#^^#]
3 changes: 3 additions & 0 deletions validation-test/IDE/crashers/e8698acd627edfb.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// {"kind":"complete","original":"bae855bf","signature":"swift::InFlightDiagnostic swift::DiagnosticEngine::diagnose<swift::Identifier, swift::NominalTypeDecl const*>(swift::Decl const*, swift::Diag<swift::Identifier, swift::NominalTypeDecl const*>, swift::detail::PassArgument<swift::Identifier>::type, swift::detail::PassArgument<swift::NominalTypeDecl const*>::type)"}
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
class a<b: c, b extension a where b #^^#
8 changes: 8 additions & 0 deletions validation-test/IDE/crashers/fd52bd37cd5c96.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// {"kind":"complete","original":"ea806f48","signature":"swift::Type::transformRec(llvm::function_ref<std::__1::optional<swift::Type> (swift::TypeBase*)>) const"}
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
@dynamicMemberLookup
struct a<b{
c: () -> b^subscript<d>(dynamicMember e: WritableKeyPath<b, d>) a<d> }
let binding = a
{ buffer #^^#??
binding.0
4 changes: 4 additions & 0 deletions validation-test/IDE/crashers_fixed/32b0b9ccc582da78.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// {"kind":"complete","original":"f8c1c082","signature":"swift::ide::PostfixCompletionCallback::Result::tryMerge(swift::ide::PostfixCompletionCallback::Result const&, swift::DeclContext*)"}
// RUN: %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
typealias a = () arr = [a].append([
0])#^^#
3 changes: 3 additions & 0 deletions validation-test/IDE/crashers_fixed/617a2713e6cd3627.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// {"kind":"complete","original":"3de07705","signature":"swift::ide::PostfixCompletionCallback::Result::tryMerge(swift::ide::PostfixCompletionCallback::Result const&, swift::DeclContext*)"}
// RUN: %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
2 ?? .map {} #^^#?? a
4 changes: 0 additions & 4 deletions validation-test/compiler_crashers_2/12d47ccfc65a990.swift

This file was deleted.

15 changes: 15 additions & 0 deletions validation-test/compiler_crashers_2/2215911baba3c39.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// {"kind":"emit-silgen","original":"e8914023","signature":"swift::Lowering::AbstractionPattern::getNumFunctionParams() const"}
// RUN: not --crash %target-swift-frontend -emit-silgen %s
func a<b, each c>(
_: (repeat each c)!,
_: b
) {
}
struct d {
let e = ""
static func == (g: Self, f: Self) {
let h =
\.e as (Self) -> _
a(h, f)
}
}
2 changes: 1 addition & 1 deletion validation-test/compiler_crashers_2/361c5acf488944d1.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// {"signature":"swift::InFlightSubstitution::lookupConformance(swift::Type, swift::ProtocolDecl*, unsigned int)"}
// {"kind":"typecheck","signature":"swift::InFlightSubstitution::checkLimits(swift::Type)"}
// RUN: not --crash %target-swift-frontend -typecheck %s
typealias a<b, c, d> = () struct e < each b {
typealias f<each c, d> = (repeat a<each b, each c, d>)struct g < each c {
Expand Down
7 changes: 7 additions & 0 deletions validation-test/compiler_crashers_2/3ac172bc4a98f31.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// {"kind":"typecheck","original":"73696db0","signature":"swift::GenericSignatureImpl::isReducedType(swift::Type) const"}
// RUN: not --crash %target-swift-frontend -typecheck %s
a
struct b<c
extension b: BidirectionalCollection where c: a
protocol a: BidirectionalCollection where SubSequence == b<Self> {
d
4 changes: 4 additions & 0 deletions validation-test/compiler_crashers_2/6b4f7c705d8aa6ba.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// {"kind":"typecheck","original":"2e6c789c","signature":"swift::DeclAndTypePrinter::Implementation::visitVarDecl(swift::VarDecl*)"}
// RUN: not --crash %target-swift-frontend -typecheck %s
a
@TaskLocal init()
2 changes: 1 addition & 1 deletion validation-test/compiler_crashers_2/7569a0726f21e49f.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// {"kind":"emit-silgen","original":"f261a4a8","signature":"Assertion failed: (!outerOrigType.isTuple() || !SGF.silConv.useLoweredAddresses()), function planIntoDirect"}
// {"kind":"emit-silgen","original":"f261a4a8","signature":"(anonymous namespace)::ResultPlanner::planIntoDirect(swift::Lowering::AbstractionPattern, swift::CanType, swift::Lowering::AbstractionPattern, swift::CanType, swift::SILResultInfo)"}
// RUN: not --crash %target-swift-frontend -emit-silgen %s
infix operator <*> : AdditionPrecedence
func <*> <a, b>(c: ((a) -> b?)?, d: a) -> b? {
Expand Down
6 changes: 6 additions & 0 deletions validation-test/compiler_crashers_2/9fbd87f3ba61177c.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// {"kind":"typecheck","original":"45b18ebd","signature":"swift::rewriting::Symbol::Storage::Storage(swift::rewriting::Symbol::Kind, swift::CanType, llvm::ArrayRef<swift::rewriting::Term>)"}
// RUN: not --crash %target-swift-frontend -typecheck %s
struct a<b, c
enum d {
typealias e = a
extension a where b == d, c == b.e
11 changes: 11 additions & 0 deletions validation-test/compiler_crashers_2/b7fa36aa91745be0.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// {"kind":"emit-sil","original":"af5c6219","signature":"(anonymous namespace)::LifetimeChecker::doIt()"}
// RUN: not --crash %target-swift-frontend -emit-sil %s
struct a<b> {
let c: String
let d: b
}
extension a where b == Void {
init() {
d <= ()
}
}
2 changes: 1 addition & 1 deletion validation-test/compiler_crashers_2/ee271b56888b63fa.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// {"signature":"swift::InFlightSubstitution::substType(swift::SubstitutableType*, unsigned int)"}
// {"kind":"typecheck","signature":"swift::InFlightSubstitution::projectLaneFromPackType(swift::Type, unsigned int)"}
// RUN: not --crash %target-swift-frontend -typecheck %s
typealias a< each b > = ( < struct c< each d {
typealias e< each b > = (repeat a< each d, each b >
Expand Down