Skip to content

Compiler crashers: Sync with https://github.com/practicalswift/swift-compiler-crashes #294

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

Closed
wants to merge 1 commit into from
Closed
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
2,606 changes: 2,606 additions & 0 deletions validation-test/compiler_crashers/24797-no-stacktrace.swift

Large diffs are not rendered by default.

1,307 changes: 1,307 additions & 0 deletions validation-test/compiler_crashers/24798-no-stacktrace.swift

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions validation-test/compiler_crashers/24879-getmemberforbasetype.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// RUN: not --crash %target-swift-frontend %s -parse

// Distributed under the terms of the MIT license
// Test case submitted to project by https://github.com/zneak (zneak)

protocol A { typealias B }
class C : A { typealias B = Int }

func crash<D: C>() -> Bool {
let a: D.B? = nil
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// RUN: not --crash %target-swift-frontend %s -parse

// rdar://22007370

class Foo {
subscript(key: String) -> String {
get { a }
set { b }
}

subscript(key: String) -> String {
get { a }
set { b }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// RUN: not --crash %target-swift-frontend %s -parse

// Distributed under the terms of the MIT license
// Test case submitted to project by https://github.com/austinzheng (Austin Zheng)

import Foundation

enum A<T> {
case Just(T)
case Error
}

func foo() -> A<(String, String?)> {
return A.Just("abc", "def")
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// RUN: not --crash %target-swift-frontend %s -parse

// Distributed under the terms of the MIT license
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
// Test case found by fuzzing

class A var b{struct Q<T where B:b{enum S<a{class c:T,A
18 changes: 18 additions & 0 deletions validation-test/compiler_crashers/27886-void.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// RUN: not --crash %target-swift-frontend %s -parse

// Distributed under the terms of the MIT license
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
// Test case found by fuzzing

var:B<
{
enum a{
let {
}
protocol a{
let t=f{
[
{ {{
}
{
}}}} }}}class S<T{func a<h{func b<T where h.g=a
18 changes: 18 additions & 0 deletions validation-test/compiler_crashers/27914-llvm-operator.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// RUN: not --crash %target-swift-frontend %s -parse

// Distributed under the terms of the MIT license
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
// Test case found by fuzzing

b : {a { d
ab}aa}{{}a d{} {}
func a{class a
type{class a{class a{
{}struct d: a< :{func a{ { {struct
{}: {
struct d<f : {struct S<f:f.
a{
} } }
,{{{
func a{
: {
165 changes: 165 additions & 0 deletions validation-test/compiler_crashers/28049-vtable.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
// RUN: not --crash %target-swift-frontend %s -parse

// Distributed under the terms of the MIT license
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
// Test case found by fuzzing

if true {
func b:a= 0
}
func c
func g: T.c
class A
class B{
struct S<T where S<f where B<T.h
func c{ enum b = e
class A {
func b:a{
func f<T where T:a
func g:A
}
for c {(
class B<T where Hh == e
class A
if true {
class A {
class A {enum B
class B<T where S<I:a("))
class B
class A
func f<h where T.e}
}
func g:T.E
class B:a
func c
struct c =p{
class A.c {
class A {}
protocol B:T{enum b:a
func c{ enum B
class A
class A {
import r
let a
class B<T where T.g = .{enum B<T{
func c
struct B<T where g struct c{ enum b = c
class A...g struct S<T? = 0
import r
func f<I:s
func g: BooleanType
class B<e: T where T.C{
for c == .E
protocol B:("))
class B{
class A {
class B<T where g:a{
func f<T:T.c {struct S.{
func c<f where T{}
d{
func a{
if true {
import F>() {
struct B<T.B : T.c{ enum b = e
struct B<T where g: T? = f<T where g = 0
func c{}
func f.c{ enum b:T.E
class A {
class A
class A {struct c
func f
func b:a
if true {
}struct d{
class A {
func f<T{
import r
if true {
func g:(
class A {
class A {
class a= t A
func c{
class B{
1
func f<T where g: T.c{ enum B<f where T:A
import F
class A {
let a= e== F>(_ = e: BooleanType
class B
func g<T where T.{
func g:a{
struct c {enum b = c
class A {
struct S.E
}
class a}
class a{
1
class A {
}
func c{ enum b {
import r
class B<I:(_ = F>("))
class A {
class A {
struct c{
class a(
class A {
class B)
let a<I:a{(_ = 0
if true {
class B
class A
struct c
class A {
import F
import r
class A {
class A {(_ = 0
struct c{ enum b:T.C) {
func g<T where g = e
func f
class A {
struct c
class A {
func c(")
func f<T where T? = .c == e:a{}
}
let a
class A {nil.h
struct B<T where T.g = c{ enum b {class A
func g:A.C{
struct B:a}
enum b = f<T where g struct c{ enum b {
import r
func f
class A {
class B
}struct c == e}
class B : T{
if true {
{
struct d
class A {enum b:a= c{
class B : T.{
class a= F
class B:A
}
class B<d<T where Hh == 0
for c {(")
func f<T where g:a() {
d{
class B<T where g:a{
struct S.{}struct B
func c{ enum b {
func f
struct d<d>(")
struct S<T.c {("))class A {
func g:s
struct B:a
import F>(
func g: T where T.e}
func c{ enum b = t A
struct d<f where T.c(")class B:T:C{
struct B<T where g
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// RUN: not --crash %target-swift-frontend %s -parse

// Distributed under the terms of the MIT license
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
// Test case found by fuzzing

func a{
enum B:A{
enum S<T where a:T{struct d{class A
class B{class k:A