practicalswift
976fc052f8
[SIL] Add test case for crash triggered in swift::TypeChecker::resolveType(swift::TypeRepr*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*)
...
Stack trace:
```
<stdin>:3:18: error: expected '(' in argument list of function declaration
protocol l{func t-> <T>()->(
^
<stdin>:3:29: error: expected type
protocol l{func t-> <T>()->(
^
<stdin>:3:29: error: expected ',' separator
protocol l{func t-> <T>()->(
^
,
<stdin>:3:29: error: consecutive declarations on a line must be separated by ';'
protocol l{func t-> <T>()->(
^
;
<stdin>:3:29: error: expected declaration
protocol l{func t-> <T>()->(
^
<stdin>:3:10: note: in declaration of 'l'
protocol l{func t-> <T>()->(
^
sil-opt: /path/to/swift/lib/Sema/TypeCheckType.cpp:1964: swift::Type (anonymous namespace)::TypeResolver::resolveASTFunctionType(swift::FunctionTypeRepr *, TypeResolutionOptions, FunctionType::ExtInfo): Assertion `genericSig != nullptr && "Did not call handleSILGenericParams()?"' failed.
9 sil-opt 0x0000000000b5a904 swift::TypeChecker::resolveType(swift::TypeRepr*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 164
10 sil-opt 0x0000000000b598a0 swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 192
12 sil-opt 0x0000000000b2398e swift::TypeChecker::validateGenericFuncSignature(swift::AbstractFunctionDecl*) + 94
17 sil-opt 0x0000000000aea496 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150
18 sil-opt 0x0000000000b0d762 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1026
19 sil-opt 0x0000000000772259 swift::CompilerInstance::performSema() + 3289
20 sil-opt 0x000000000075b72d main + 1805
Stack dump:
0. Program arguments: sil-opt -enable-sil-verify-all
1. While type-checking 'l' at <stdin>:3:1
2. While resolving type () -> () at [<stdin>:3:24 - line:3:28] RangeText="()->("
```
2016-07-16 21:09:42 +02:00
Doug Gregor
823c24b355
[SE-0112] Rename ErrorProtocol to Error.
...
This is bullet (5) of the proposed solution in SE-0112, and the last
major piece to be implemented.
2016-07-12 10:53:52 -07:00
Slava Pestov
69d8867ec5
A SIL parser crasher got fixed along the way
2016-06-18 17:15:25 -07:00
Manav Gabhawala
7928140f79
[SE-0046] Implements consistent function parameter labels by discarding extraneous parameter names and adding _ where necessary
2016-04-06 20:21:58 -04:00
John McCall
38498bd7fd
This test is no longer crashing.
2016-02-18 01:45:50 -08:00
Chris Lattner
1e380ac991
my fix fixed this testcase too.
2016-02-01 22:31:21 -08:00
Chris Lattner
58e33ee374
My previous patch fixed this too accidentally, update the test.
2016-01-29 14:57:57 -08:00
Doug Gregor
38c1de69e4
Reinstate "[SR-511][Parse] Add 'associatedtype' keyword and fixit"
...
This reverts commit ce7b2bcf09 , tweaking
a few validation tests appropriately (1 crasher fixed, two -verify
tests that needed updating).
2016-01-14 00:21:48 -08:00
Chris Lattner
f796899123
subsume the "startsWithGreater" logic into skipUntilGreaterInTypeList, and
...
make sure skipUntilGreaterInTypeList return a valid location even in the case
of parse errors. This ensures that we form a valid source range. Also,
improve parseExprIdentifier() to handle the case when skipUntilGreaterInTypeList
returns an empty archetype argument list. This fixes a couple of compiler
crashers.
2016-01-09 20:36:05 -08:00
practicalswift
c7187cb901
[SIL] Add test case for crash triggered in llvm::llvm_unreachable_internal(char const*, char const*, unsigned int)
...
Stack trace:
```
<stdin>:3:1: error: statement cannot begin with a closure expression
{(x:(x:(
^
<stdin>:3:1: note: explicitly discard the result of the closure by assigning to '_'
{(x:(x:(
^
_ =
<stdin>:3:9: error: expected expression in list of expressions
{(x:(x:(
^
<stdin>:3:9: error: expected ',' separator
{(x:(x:(
^
,
<stdin>:3:9: error: expected ',' separator
{(x:(x:(
^
,
<stdin>:3:9: error: expected expression in list of expressions
{(x:(x:(
^
<stdin>:3:9: error: expected ',' separator
{(x:(x:(
^
,
<stdin>:3:9: error: expected ',' separator
{(x:(x:(
^
,
<stdin>:3:9: error: expected expression in list of expressions
{(x:(x:(
^
<stdin>:3:9: error: expected ',' separator
{(x:(x:(
^
,
<stdin>:3:9: error: expected '}' at end of closure
{(x:(x:(
^
<stdin>:3:1: note: to match this opening '{'
{(x:(x:(
^
<stdin>:3:1: error: expressions are not allowed at the top level
{(x:(x:(
^
<stdin>:3:1: error: braced block of statements is an unused closure
{(x:(x:(
^
Unhandled coercion
UNREACHABLE executed at /path/to/swift/lib/Sema/CSApply.cpp:4913!
6 sil-opt 0x0000000002c115cd llvm::llvm_unreachable_internal(char const*, char const*, unsigned int) + 461
11 sil-opt 0x0000000000ccfdd3 swift::Expr::walk(swift::ASTWalker&) + 19
12 sil-opt 0x0000000000b15286 swift::constraints::ConstraintSystem::applySolution(swift::constraints::Solution&, swift::Expr*, swift::Type, bool, bool, bool) + 502
13 sil-opt 0x0000000000a8730b swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 683
15 sil-opt 0x0000000000ae8f46 swift::TypeChecker::typeCheckTopLevelCodeDecl(swift::TopLevelCodeDecl*) + 134
16 sil-opt 0x0000000000a6de0d swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1581
17 sil-opt 0x0000000000739912 swift::CompilerInstance::performSema() + 2946
18 sil-opt 0x00000000007241dc main + 1916
Stack dump:
0. Program arguments: sil-opt -enable-sil-verify-all
1. While type-checking expression at [<stdin>:3:1 - line:3:8] RangeText="{(x:(x:("
```
2016-01-06 21:42:08 +01:00
practicalswift
25ca69f82a
[SIL] Add test case for crash triggered in swift::Parser::parseExprIdentifier()
...
Stack trace:
```
<stdin>:3:16: error: expected '>' to complete generic parameter list
enum n{func p<p{p<@convention()>
^
<stdin>:3:14: note: to match this opening '<'
enum n{func p<p{p<@convention()>
^
<stdin>:3:16: error: expected '(' in argument list of function declaration
enum n{func p<p{p<@convention()>
^
<stdin>:3:31: error: expected convention name identifier in 'convention' attribute
enum n{func p<p{p<@convention()>
^
<stdin>:3:32: error: expected type
enum n{func p<p{p<@convention()>
^
<stdin>:3:18: note: while parsing this '<' as a type parameter bracket
enum n{func p<p{p<@convention()>
^
sil-opt: /path/to/swift/include/swift/Basic/SourceLoc.h:93: swift::SourceRange::SourceRange(swift::SourceLoc, swift::SourceLoc): Assertion `Start.isValid() == End.isValid() && "Start and end should either both be valid or both be invalid!"' failed.
8 sil-opt 0x0000000000a2049a swift::Parser::parseExprIdentifier() + 1722
9 sil-opt 0x0000000000a1c363 swift::Parser::parseExprPostfix(swift::Diag<>, bool) + 515
10 sil-opt 0x0000000000a1afaa swift::Parser::parseExprSequence(swift::Diag<>, bool, bool) + 170
11 sil-opt 0x0000000000a1ae9f swift::Parser::parseExprImpl(swift::Diag<>, bool) + 191
12 sil-opt 0x0000000000a51054 swift::Parser::parseExprOrStmt(swift::ASTNode&) + 420
13 sil-opt 0x0000000000a52c56 swift::Parser::parseBraceItems(llvm::SmallVectorImpl<swift::ASTNode>&, swift::BraceItemListKind, swift::BraceItemListKind) + 1974
14 sil-opt 0x0000000000a573e0 swift::Parser::parseBraceItemList(swift::Diag<>) + 96
15 sil-opt 0x0000000000a11d61 swift::Parser::parseDeclFunc(swift::SourceLoc, swift::StaticSpellingKind, swift::OptionSet<swift::Parser::ParseDeclFlags, unsigned int>, swift::DeclAttributes&) + 3041
16 sil-opt 0x0000000000a093ba swift::Parser::parseDecl(llvm::SmallVectorImpl<swift::Decl*>&, swift::OptionSet<swift::Parser::ParseDeclFlags, unsigned int>) + 3306
18 sil-opt 0x00000000009fc0a3 swift::Parser::parseList(swift::tok, swift::SourceLoc, swift::SourceLoc&, swift::tok, bool, bool, swift::Diag<>, std::function<swift::ParserStatus ()>) + 723
19 sil-opt 0x0000000000a0d28e swift::Parser::parseDeclEnum(swift::OptionSet<swift::Parser::ParseDeclFlags, unsigned int>, swift::DeclAttributes&) + 1678
20 sil-opt 0x0000000000a0936b swift::Parser::parseDecl(llvm::SmallVectorImpl<swift::Decl*>&, swift::OptionSet<swift::Parser::ParseDeclFlags, unsigned int>) + 3227
21 sil-opt 0x0000000000a52c0e swift::Parser::parseBraceItems(llvm::SmallVectorImpl<swift::ASTNode>&, swift::BraceItemListKind, swift::BraceItemListKind) + 1902
22 sil-opt 0x00000000009fde5c swift::Parser::parseTopLevel() + 156
23 sil-opt 0x00000000009f931f swift::parseIntoSourceFile(swift::SourceFile&, unsigned int, bool*, swift::SILParserState*, swift::PersistentParserState*, swift::DelayedParsingCallbacks*) + 207
24 sil-opt 0x00000000007398f6 swift::CompilerInstance::performSema() + 2918
25 sil-opt 0x00000000007241dc main + 1916
Stack dump:
0. Program arguments: sil-opt -enable-sil-verify-all
1. With parser at source location: <stdin>:3:33
```
2016-01-05 14:58:32 +01:00
practicalswift
bebccb4e5d
[SIL] Add test case for crash triggered in swift::TypeChecker::typeCheckDecl(swift::Decl*, bool)
...
Stack trace:
```
<stdin>:3:26: error: expected type
protocol P{var e:<T>()->(
^
<stdin>:3:26: error: expected ',' separator
protocol P{var e:<T>()->(
^
,
<stdin>:3:26: error: consecutive declarations on a line must be separated by ';'
protocol P{var e:<T>()->(
^
;
<stdin>:3:26: error: expected declaration
protocol P{var e:<T>()->(
^
sil-opt: /path/to/swift/lib/AST/Decl.cpp:1782: void swift::ValueDecl::setInterfaceType(swift::Type): Assertion `(type.isNull() || !type->is<PolymorphicFunctionType>()) && "setting polymorphic function type as interface type"' failed.
13 sil-opt 0x0000000000a9b8c7 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 151
14 sil-opt 0x0000000000a67012 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1474
15 sil-opt 0x0000000000738fc2 swift::CompilerInstance::performSema() + 2946
16 sil-opt 0x00000000007238ac main + 1916
Stack dump:
0. Program arguments: sil-opt -enable-sil-verify-all
1. While type-checking 'P' at <stdin>:3:1
```
2015-12-25 16:56:19 +01:00
practicalswift
c380936e4e
[SIL] Add test case for crash triggered in swift::ModuleDecl::lookupConformance(swift::Type, swift::ProtocolDecl*, swift::LazyResolver*)
...
Stack trace:
```
<stdin>:3:12: error: expected '{' in enum
enum l<V>:V
^
<stdin>:3:6: error: missing protocol 'RawRepresentable'
enum l<V>:V
^
<stdin>:3:6: error: missing protocol 'IntegerLiteralConvertible'
enum l<V>:V
^
4 sil-opt 0x0000000000d5139a swift::ModuleDecl::lookupConformance(swift::Type, swift::ProtocolDecl*, swift::LazyResolver*) + 106
5 sil-opt 0x0000000000ac5da0 swift::TypeChecker::conformsToProtocol(swift::Type, swift::ProtocolDecl*, swift::DeclContext*, swift::OptionSet<swift::ConformanceCheckFlags, unsigned int>, swift::ProtocolConformance**, swift::SourceLoc) + 96
9 sil-opt 0x0000000000a9c0d7 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 151
10 sil-opt 0x0000000000a678aa swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1610
11 sil-opt 0x0000000000738d52 swift::CompilerInstance::performSema() + 2946
12 sil-opt 0x000000000072398c main + 1916
Stack dump:
0. Program arguments: sil-opt -enable-sil-verify-all
1. While type-checking 'l' at <stdin>:3:1
```
2015-12-23 12:21:31 +01:00
Dmitri Gribenko
6f30f8b2f0
Annotate a crash test as crashing in the AST verifier
2015-12-21 10:18:01 -07:00
Dmitri Gribenko
c7afd89674
Merge pull request #707 from practicalswift/sil-019-swift-parser-parseexprpostfix
...
[SIL] Add test case for crash triggered in swift::Parser::parseExprPostfix(…)
2015-12-21 08:44:51 -08:00
Dmitri Gribenko
706e038f13
Merge pull request #705 from practicalswift/sil-018-swift-valuedecl-getinterfacetype
...
[SIL] Add test case for crash triggered in swift::ValueDecl::getInterfaceType()
2015-12-21 08:39:53 -08:00
practicalswift
ac9d405f06
[SIL] Add test case for crash triggered in swift::Parser::parseExprPostfix(swift::Diag<>, bool)
...
Stack trace:
```
<stdin>:2:15: error: expected convention name identifier in 'convention' attribute
C<@convention()>{
^
<stdin>:2:16: error: expected type
C<@convention()>{
^
<stdin>:2:2: note: while parsing this '<' as a type parameter bracket
C<@convention()>{
^
<stdin>:2:18: error: expected '}' at end of closure
C<@convention()>{
^
<stdin>:2:17: note: to match this opening '{'
C<@convention()>{
^
sil-opt: /path/to/swift/include/swift/Basic/SourceManager.h:184: std::pair<unsigned int, unsigned int> swift::SourceManager::getLineAndColumn(swift::SourceLoc, unsigned int) const: Assertion `Loc.isValid()' failed.
9 sil-opt 0x0000000000a15dec swift::Parser::parseExprPostfix(swift::Diag<>, bool) + 7628
10 sil-opt 0x0000000000a12e6a swift::Parser::parseExprSequence(swift::Diag<>, bool, bool) + 170
11 sil-opt 0x0000000000a12d5f swift::Parser::parseExprImpl(swift::Diag<>, bool) + 191
12 sil-opt 0x0000000000a495e4 swift::Parser::parseExprOrStmt(swift::ASTNode&) + 420
13 sil-opt 0x0000000000a4b09f swift::Parser::parseBraceItems(llvm::SmallVectorImpl<swift::ASTNode>&, swift::BraceItemListKind, swift::BraceItemListKind) + 1647
14 sil-opt 0x00000000009f5cbc swift::Parser::parseTopLevel() + 156
15 sil-opt 0x00000000009f123f swift::parseIntoSourceFile(swift::SourceFile&, unsigned int, bool*, swift::SILParserState*, swift::PersistentParserState*, swift::DelayedParsingCallbacks*) + 207
16 sil-opt 0x0000000000739206 swift::CompilerInstance::performSema() + 2918
17 sil-opt 0x0000000000723e5c main + 1916
Stack dump:
0. Program arguments: sil-opt -enable-sil-verify-all
1. With parser at source location: <stdin>:2:18
```
2015-12-21 13:34:32 +01:00
practicalswift
2fd839b7ba
[SIL] Add test case for crash triggered in swift::ValueDecl::getInterfaceType() const
...
Stack trace:
```
<stdin>:3:25: error: expected '(' in argument list of function declaration
@objc protocol P{func t throw
^
<stdin>:3:25: error: expected throwing specifier; did you mean 'throws'?
@objc protocol P{func t throw
^~~~~
throws
<stdin>:3:30: error: consecutive declarations on a line must be separated by ';'
@objc protocol P{func t throw
^
;
<stdin>:3:30: error: expected declaration
@objc protocol P{func t throw
^
4 sil-opt 0x0000000000d2488c swift::ValueDecl::getInterfaceType() const + 12
5 sil-opt 0x0000000000d25486 swift::TypeDecl::getDeclaredInterfaceType() const + 6
6 sil-opt 0x0000000000aea9bf swift::TypeChecker::isRepresentableInObjC(swift::AbstractFunctionDecl const*, swift::ObjCReason, llvm::Optional<swift::ForeignErrorConvention>&) + 1631
11 sil-opt 0x0000000000a9adb7 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 151
12 sil-opt 0x0000000000a665e2 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1474
13 sil-opt 0x0000000000739222 swift::CompilerInstance::performSema() + 2946
14 sil-opt 0x0000000000723e5c main + 1916
Stack dump:
0. Program arguments: sil-opt -enable-sil-verify-all
1. While type-checking 'P' at <stdin>:3:7
```
2015-12-21 11:27:46 +01:00
Dmitri Gribenko
0afd1d3ff8
Merge pull request #704 from practicalswift/sil-017-swift-decl-walk
...
[SIL] Add test case for crash triggered in swift::Decl::walk(…)
2015-12-21 00:15:50 -08:00
practicalswift
79dd392a4e
[SIL] Add test case for crash triggered in swift::Decl::walk(swift::ASTWalker&)
...
Stack trace:
```
<stdin>:3:13: error: consecutive statements on a line must be separated by ';'
import Swift func g(@opened(Any
^
;
<stdin>:3:29: error: known id for 'opened' attribute must be a UUID string
import Swift func g(@opened(Any
^
<stdin>:3:29: error: expected ')' after id value for 'opened' attribute
import Swift func g(@opened(Any
^
<stdin>:3:28: note: to match this opening '('
import Swift func g(@opened(Any
^
<stdin>:3:21: error: unnamed parameters must be written with the empty name '_'
import Swift func g(@opened(Any
^
_:
<stdin>:3:32: error: expected ',' separator
import Swift func g(@opened(Any
^
,
<stdin>:3:32: error: expected parameter type following ':'
import Swift func g(@opened(Any
^
<stdin>:3:32: error: expected ',' separator
import Swift func g(@opened(Any
^
,
Found opened existential archetype Any outside enclosing OpenExistentialExpr
15 sil-opt 0x0000000000ccd684 swift::Decl::walk(swift::ASTWalker&) + 20
16 sil-opt 0x0000000000d5600e swift::SourceFile::walk(swift::ASTWalker&) + 174
17 sil-opt 0x0000000000d85c44 swift::verify(swift::SourceFile&) + 52
18 sil-opt 0x0000000000a662cb swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1963
19 sil-opt 0x00000000007391c2 swift::CompilerInstance::performSema() + 2946
20 sil-opt 0x0000000000723dfc main + 1916
Stack dump:
0. Program arguments: sil-opt -enable-sil-verify-all
1. While walking into decl 'g' at <stdin>:3:14
2. While walking into body of 'g' at <stdin>:3:14
```
2015-12-21 09:07:48 +01:00
Dmitri Gribenko
edfbf40f88
Merge pull request #703 from practicalswift/sil-016-swift-typechecker-typecheckfunctionbodyuntil
...
[SIL] Add test case for crash triggered in swift::TypeChecker::typeCheckFunctionBodyUntil(…)
2015-12-21 00:00:54 -08:00
practicalswift
a983bec48a
[SIL] Add test case for crash triggered in swift::TypeChecker::typeCheckFunctionBodyUntil(swift::FuncDecl*, swift::SourceLoc)
...
Stack trace:
```
<stdin>:2:7: error: expected '(' in argument list of function declaration
func n->a{return:}class a
^
<stdin>:2:17: error: expected expression in 'return' statement
func n->a{return:}class a
^
<stdin>:2:19: error: consecutive statements on a line must be separated by ';'
func n->a{return:}class a
^
;
<stdin>:2:26: error: expected '{' in class
func n->a{return:}class a
^
sil-opt: /path/to/llvm/include/llvm/Support/Casting.h:95: static bool llvm::isa_impl_cl<swift::ProtocolDecl, const swift::NominalTypeDecl *>::doit(const From *) [To = swift::ProtocolDecl, From = const swift::NominalTypeDecl *]: Assertion `Val && "isa<> used on a null pointer"' failed.
11 sil-opt 0x0000000000ae0d3b swift::TypeChecker::typeCheckFunctionBodyUntil(swift::FuncDecl*, swift::SourceLoc) + 379
12 sil-opt 0x0000000000ae0b7e swift::TypeChecker::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) + 46
13 sil-opt 0x0000000000ae17a8 swift::TypeChecker::typeCheckAbstractFunctionBody(swift::AbstractFunctionDecl*) + 136
15 sil-opt 0x0000000000a6620b swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1771
16 sil-opt 0x00000000007391c2 swift::CompilerInstance::performSema() + 2946
17 sil-opt 0x0000000000723dfc main + 1916
Stack dump:
0. Program arguments: sil-opt -enable-sil-verify-all
1. While type-checking 'n' at <stdin>:2:1
```
2015-12-21 08:56:27 +01:00
Dmitri Gribenko
b28e300024
Merge pull request #701 from practicalswift/sil-015-swift-parser-parsesilwitnesstable
...
[SIL] Add test case for crash triggered in swift::Parser::parseSILWitnessTable(…)
2015-12-20 23:42:39 -08:00
practicalswift
c592b66cc7
[SIL] Add test case for crash triggered in swift::Parser::parseSILWitnessTable()
...
Stack trace:
```
sil-opt: /path/to/swift/lib/Parse/ParseSIL.cpp:790: llvm::PointerUnion<ValueDecl *, Module *> lookupTopDecl(swift::Parser &, swift::Identifier): Assertion `DeclLookup.isSuccess() && DeclLookup.Results.size() == 1' failed.
11 sil-opt 0x0000000000a27272 swift::Parser::parseSILWitnessTable() + 450
12 sil-opt 0x00000000009f5a13 swift::Parser::parseTopLevel() + 755
13 sil-opt 0x00000000009f0d3f swift::parseIntoSourceFile(swift::SourceFile&, unsigned int, bool*, swift::SILParserState*, swift::PersistentParserState*, swift::DelayedParsingCallbacks*) + 207
14 sil-opt 0x00000000007391a6 swift::CompilerInstance::performSema() + 2918
15 sil-opt 0x0000000000723dfc main + 1916
Stack dump:
0. Program arguments: sil-opt -enable-sil-verify-all
1. With parser at source location: <stdin>:3:22
```
2015-12-21 08:39:31 +01:00
practicalswift
746a93b0e6
[SIL] Add test case for crash triggered in swift::SILDeclRef::SILDeclRef(swift::ValueDecl*, swift::SILDeclRef::Kind, swift::ResilienceExpansion, unsigned int, bool)
...
Stack trace:
```
<stdin>:3:8: error: expected '{' in class
class C}sil_vtable C{#C
^
<stdin>:3:8: error: extraneous '}' at top level
class C}sil_vtable C{#C
^
sil-opt: /path/to/swift/lib/SIL/SILDeclRef.cpp:144: swift::SILDeclRef::SILDeclRef(swift::ValueDecl *, SILDeclRef::Kind, swift::ResilienceExpansion, unsigned int, bool): Assertion `(kind == Kind::IVarInitializer || kind == Kind::IVarDestroyer) && "can only create ivar initializer/destroyer SILDeclRef for class"' failed.
8 sil-opt 0x00000000009cf6e6 swift::SILDeclRef::SILDeclRef(swift::ValueDecl*, swift::SILDeclRef::Kind, swift::ResilienceExpansion, unsigned int, bool) + 150
10 sil-opt 0x0000000000a26959 swift::Parser::parseSILVTable() + 905
11 sil-opt 0x00000000009f59e3 swift::Parser::parseTopLevel() + 707
12 sil-opt 0x00000000009f0d3f swift::parseIntoSourceFile(swift::SourceFile&, unsigned int, bool*, swift::SILParserState*, swift::PersistentParserState*, swift::DelayedParsingCallbacks*) + 207
13 sil-opt 0x00000000007391a6 swift::CompilerInstance::performSema() + 2918
14 sil-opt 0x0000000000723dfc main + 1916
Stack dump:
0. Program arguments: sil-opt -enable-sil-verify-all
1. With parser at source location: <stdin>:3:24
```
2015-12-21 07:37:02 +01:00
Dmitri Gribenko
9381b2099d
Merge pull request #686 from practicalswift/sil-012-swift-dependentgenerictyperesolver-resolveselfassociatedtype
...
[SIL] Add test case for crash triggered in swift::DependentGenericTypeResolver::resolveSelfAssociatedType(…)
2015-12-20 15:12:12 -08:00
practicalswift
87008f24ad
[SIL] Add test case for crash triggered in swift::Parser::parseSILGlobal()
...
Stack trace:
```
<stdin>:3:36: error: expected ']' or ',' in attribute list
sil_global@_a:$()sil_global[fragile@_a:$(
^
<stdin>:3:42: error: expected type
sil_global@_a:$()sil_global[fragile@_a:$(
^
<stdin>:3:42: error: expected ',' separator
sil_global@_a:$()sil_global[fragile@_a:$(
^
,
sil-opt: /path/to/swift/lib/SIL/SILGlobalVariable.cpp:29: static swift::SILGlobalVariable *swift::SILGlobalVariable::create(swift::SILModule &, swift::SILLinkage, bool, llvm::StringRef, swift::SILType, Optional<swift::SILLocation>, swift::VarDecl *): Assertion `!entry->getValue() && "global variable already exists"' failed.
9 sil-opt 0x0000000000a25f6c swift::Parser::parseSILGlobal() + 684
10 sil-opt 0x00000000009f5c3b swift::Parser::parseTopLevel() + 731
11 sil-opt 0x00000000009f0f7f swift::parseIntoSourceFile(swift::SourceFile&, unsigned int, bool*, swift::SILParserState*, swift::PersistentParserState*, swift::DelayedParsingCallbacks*) + 207
12 sil-opt 0x00000000007392a6 swift::CompilerInstance::performSema() + 2918
13 sil-opt 0x0000000000723efc main + 1916
Stack dump:
0. Program arguments: sil-opt -enable-sil-verify-all
1. With parser at source location: <stdin>:3:42
```
2015-12-20 22:08:36 +01:00
practicalswift
e48323ce10
[SIL] Add test case for crash triggered in swift::DependentGenericTypeResolver::resolveSelfAssociatedType(swift::Type, swift::DeclContext*, swift::AssociatedTypeDecl*)
...
Stack trace:
```
<stdin>:2:23: error: expected '>' to complete generic parameter list
protocol O{func f(<u,a{},a.i
^
<stdin>:2:19: note: to match this opening '<'
protocol O{func f(<u,a{},a.i
^
<stdin>:2:23: error: expected parameter type following ':'
protocol O{func f(<u,a{},a.i
^
<stdin>:2:23: error: expected ',' separator
protocol O{func f(<u,a{},a.i
^
,
<stdin>:2:23: error: expected parameter type following ':'
protocol O{func f(<u,a{},a.i
^
<stdin>:2:23: error: expected ',' separator
protocol O{func f(<u,a{},a.i
^
,
<stdin>:2:26: error: unnamed parameters must be written with the empty name '_'
protocol O{func f(<u,a{},a.i
^
_:
<stdin>:2:29: error: expected ',' separator
protocol O{func f(<u,a{},a.i
^
,
<stdin>:2:29: error: expected parameter type following ':'
protocol O{func f(<u,a{},a.i
^
<stdin>:2:29: error: expected ',' separator
protocol O{func f(<u,a{},a.i
^
,
<stdin>:2:29: error: consecutive declarations on a line must be separated by ';'
protocol O{func f(<u,a{},a.i
^
;
<stdin>:2:29: error: expected declaration
protocol O{func f(<u,a{},a.i
^
<unknown>:0: error: type annotation missing in pattern
sil-opt: /path/to/swift/lib/Sema/TypeCheckGeneric.cpp:34: virtual swift::Type swift::DependentGenericTypeResolver::resolveDependentMemberType(swift::Type, swift::DeclContext *, swift::SourceRange, swift::ComponentIdentTypeRepr *): Assertion `archetype && "Bad generic context nesting?"' failed.
8 sil-opt 0x0000000000ab8550 swift::DependentGenericTypeResolver::resolveSelfAssociatedType(swift::Type, swift::DeclContext*, swift::AssociatedTypeDecl*) + 0
10 sil-opt 0x0000000000ae6bde swift::TypeChecker::resolveIdentifierType(swift::DeclContext*, swift::IdentTypeRepr*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, bool, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 158
12 sil-opt 0x0000000000ae6ad4 swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 212
14 sil-opt 0x0000000000abeee1 swift::TypeChecker::typeCheckPattern(swift::Pattern*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*) + 721
15 sil-opt 0x0000000000abee38 swift::TypeChecker::typeCheckPattern(swift::Pattern*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*) + 552
17 sil-opt 0x0000000000ab91cc swift::TypeChecker::validateGenericFuncSignature(swift::AbstractFunctionDecl*) + 124
22 sil-opt 0x0000000000a9aaf7 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 151
23 sil-opt 0x0000000000a66322 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1474
24 sil-opt 0x00000000007392c2 swift::CompilerInstance::performSema() + 2946
25 sil-opt 0x0000000000723efc main + 1916
Stack dump:
0. Program arguments: sil-opt -enable-sil-verify-all
1. While type-checking 'O' at <stdin>:2:1
2. While resolving type a.i at [<stdin>:2:26 - line:2:28] RangeText="a.i"
```
2015-12-20 13:55:04 +01:00
practicalswift
fbcbce263c
[SIL] Add test case for crash triggered in llvm::llvm_unreachable_internal(char const*, char const*, unsigned int)
...
Stack trace:
```
<stdin>:2:22: error: expected ',' separator
sil@s:$()->(@owned T c:t
^
,
<stdin>:2:25: error: expected ',' separator
sil@s:$()->(@owned T c:t
^
,
<stdin>:2:25: error: expected type
sil@s:$()->(@owned T c:t
^
<stdin>:2:25: error: expected ',' separator
sil@s:$()->(@owned T c:t
^
,
<stdin>:2:20: error: use of undeclared type 'T'
sil@s:$()->(@owned T c:t
^
NamedTypeRepr only shows up as an element of Tuple
UNREACHABLE executed at /path/to/swift/lib/Sema/TypeCheckType.cpp:1400!
6 sil-opt 0x0000000002c0db6d llvm::llvm_unreachable_internal(char const*, char const*, unsigned int) + 461
12 sil-opt 0x0000000000ae6ad4 swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 212
13 sil-opt 0x0000000000a66c0f swift::performTypeLocChecking(swift::ASTContext&, swift::TypeLoc&, bool, swift::DeclContext*, bool) + 1007
15 sil-opt 0x0000000000a23113 swift::Parser::parseDeclSIL() + 627
16 sil-opt 0x00000000009f5ada swift::Parser::parseTopLevel() + 378
17 sil-opt 0x00000000009f0f7f swift::parseIntoSourceFile(swift::SourceFile&, unsigned int, bool*, swift::SILParserState*, swift::PersistentParserState*, swift::DelayedParsingCallbacks*) + 207
18 sil-opt 0x00000000007392a6 swift::CompilerInstance::performSema() + 2918
19 sil-opt 0x0000000000723efc main + 1916
Stack dump:
0. Program arguments: sil-opt -enable-sil-verify-all
1. With parser at source location: <stdin>:2:25
2. While resolving type @convention(thin) () -> ( T, c: t)sil-opt: /path/to/swift/include/swift/Basic/SourceLoc.h:93: swift::SourceRange::SourceRange(swift::SourceLoc, swift::SourceLoc): Assertion `Start.isValid() == End.isValid() && "Start and end should either both be valid or both be invalid!"' failed.
```
2015-12-20 12:22:27 +01:00
Dmitri Gribenko
d9802dd59b
Annotate a test as crashing in the AST verifier
2015-12-19 17:50:24 -07:00
Dmitri Gribenko
77db095be5
Merge pull request #675 from practicalswift/sil-010-swift-typechecker-addimplicitconstructors
...
[SIL] Add test case for crash triggered in swift::TypeChecker::addImplicitConstructors(…)
2015-12-19 16:27:30 -08:00
practicalswift
252774ba51
[SIL] Add test case for crash triggered in swift::TypeChecker::addImplicitConstructors(swift::NominalTypeDecl*)
...
Stack trace:
```
<stdin>:4:6: error: consecutive declarations on a line must be separated by ';'
var h
^
;
<stdin>:4:6: error: expected declaration
var h
^
<stdin>:3:24: error: type annotation missing in pattern
class C{@NSManaged var S
^
<stdin>:4:5: error: type annotation missing in pattern
var h
^
<stdin>:3:7: error: class 'C' has no initializers
class C{@NSManaged var S
^
sil-opt: /path/to/swift/lib/Sema/TypeCheckDecl.cpp:1010: auto isNeverDefaultInitializable(swift::Pattern *)::(anonymous class)::operator()(swift::VarDecl *) const: Assertion `!var->getAttrs().hasAttribute<NSManagedAttr>()' failed.
11 sil-opt 0x0000000000a9ff1f swift::TypeChecker::addImplicitConstructors(swift::NominalTypeDecl*) + 1359
14 sil-opt 0x0000000000a9aba7 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 151
15 sil-opt 0x0000000000a663fa swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1610
16 sil-opt 0x00000000007392c2 swift::CompilerInstance::performSema() + 2946
17 sil-opt 0x0000000000723efc main + 1916
Stack dump:
0. Program arguments: sil-opt -enable-sil-verify-all
1. While type-checking 'C' at <stdin>:3:1
```
2015-12-20 01:16:41 +01:00
Dmitri Gribenko
054874e763
Merge pull request #666 from practicalswift/sil-008-swift-genericparamlist-getasgenericsignatureelements
...
[SIL] Add test case for crash triggered in swift::GenericParamList::getAsGenericSignatureElements(…)
2015-12-19 16:04:01 -08:00
Dmitri Gribenko
f6371591e7
Merge pull request #671 from practicalswift/sil-009-swift-parser-parsedeclsil
...
[SIL] Add test case for crash triggered in swift::Parser::parseDeclSIL()
2015-12-19 15:22:21 -08:00
practicalswift
3bd2823f58
[SIL] Add test case for crash triggered in swift::Parser::parseDeclSIL()
...
Stack trace:
```
sil-opt: /path/to/swift/lib/SIL/Verifier.cpp:2992: void (anonymous namespace)::SILVerifier::visitSILFunction(swift::SILFunction *): Assertion `F->isAvailableExternally() && "external declaration of internal SILFunction not allowed"' failed.
9 sil-opt 0x0000000000a243f8 swift::Parser::parseDeclSIL() + 5384
10 sil-opt 0x00000000009f5b2a swift::Parser::parseTopLevel() + 378
11 sil-opt 0x00000000009f0fcf swift::parseIntoSourceFile(swift::SourceFile&, unsigned int, bool*, swift::SILParserState*, swift::PersistentParserState*, swift::DelayedParsingCallbacks*) + 207
12 sil-opt 0x00000000007392a6 swift::CompilerInstance::performSema() + 2918
13 sil-opt 0x0000000000723efc main + 1916
Stack dump:
0. Program arguments: sil-opt -enable-sil-verify-all
1. With parser at source location: <stdin>:3:22
2. While verifying SIL function @s for <stdin>:3:13
```
2015-12-19 21:50:48 +01:00
practicalswift
7b00e8b82b
[SIL] Add test case for crash triggered in swift::GenericParamList::getAsGenericSignatureElements(swift::ASTContext&, llvm::DenseMap<swift::ArchetypeType*, swift::Type, llvm::DenseMapInfo<swift::ArchetypeType*>, llvm::detail::DenseMapPair<swift::ArchetypeType*, swift::Type> >&, llvm::SmallVectorImpl<swift::GenericTypeParamType*>&, llvm::SmallVectorImpl<swift::Requirement>&) const
...
Stack trace:
```
<stdin>:3:29: error: expected type
sil@__:$<__ where τ:k>()->(
<stdin>:3:29: error: expected ',' separator
sil@__:$<__ where τ:k>()->(
<stdin>:3:19: error: use of undeclared type 'τ'
sil@__:$<__ where τ:k>()->(
sil-opt: /path/to/llvm/include/llvm/ADT/ArrayRef.h:172: ArrayRef<T> llvm::ArrayRef<swift::ArchetypeType *>::slice(unsigned int, unsigned int) const [T = swift::ArchetypeType *]: Assertion `N+M <= size() && "Invalid specifier"' failed.
8 sil-opt 0x0000000000d20b65 swift::GenericParamList::getAsGenericSignatureElements(swift::ASTContext&, llvm::DenseMap<swift::ArchetypeType*, swift::Type, llvm::DenseMapInfo<swift::ArchetypeType*>, llvm::detail::DenseMapPair<swift::ArchetypeType*, swift::Type> >&, llvm::SmallVectorImpl<swift::GenericTypeParamType*>&, llvm::SmallVectorImpl<swift::Requirement>&) const + 2693
9 sil-opt 0x0000000000d1ff3c swift::GenericParamList::getAsCanonicalGenericSignature(llvm::DenseMap<swift::ArchetypeType*, swift::Type, llvm::DenseMapInfo<swift::ArchetypeType*>, llvm::detail::DenseMapPair<swift::ArchetypeType*, swift::Type> >&, swift::ASTContext&) const + 92
13 sil-opt 0x0000000000ae6c04 swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 212
14 sil-opt 0x0000000000a66c5f swift::performTypeLocChecking(swift::ASTContext&, swift::TypeLoc&, bool, swift::DeclContext*, bool) + 1007
16 sil-opt 0x0000000000a23163 swift::Parser::parseDeclSIL() + 627
17 sil-opt 0x00000000009f5b2a swift::Parser::parseTopLevel() + 378
18 sil-opt 0x00000000009f0fcf swift::parseIntoSourceFile(swift::SourceFile&, unsigned int, bool*, swift::SILParserState*, swift::PersistentParserState*, swift::DelayedParsingCallbacks*) + 207
19 sil-opt 0x00000000007392a6 swift::CompilerInstance::performSema() + 2918
20 sil-opt 0x0000000000723efc main + 1916
Stack dump:
0. Program arguments: sil-opt -enable-sil-verify-all
1. With parser at source location: <stdin>:3:29
2. While resolving type @convention(thin) () -> ()sil-opt: /path/to/swift/include/swift/Basic/SourceLoc.h:93: swift::SourceRange::SourceRange(swift::SourceLoc, swift::SourceLoc): Assertion `Start.isValid() == End.isValid() && "Start and end should either both be valid or both be invalid!"' failed.
```
2015-12-19 17:48:56 +01:00
Dmitri Gribenko
fa35b993e3
Merge pull request #662 from practicalswift/sil-007-swift-abstractstoragedecl-makecomputed
...
[SIL] Add test case for crash triggered in swift::AbstractStorageDecl::makeComputed(…)
2015-12-19 04:56:02 -08:00
practicalswift
58ce678fe7
[SIL] Add test case for crash triggered in swift::AbstractStorageDecl::makeComputed(swift::SourceLoc, swift::FuncDecl*, swift::FuncDecl*, swift::FuncDecl*, swift::SourceLoc)
...
Stack trace:
```
<stdin>:3:35: error: expected '}' at end of variable get/set clause
protocol a{@sil_stored var e:a{get
^
<stdin>:3:31: note: to match this opening '{'
protocol a{@sil_stored var e:a{get
^
<stdin>:3:35: error: consecutive declarations on a line must be separated by ';'
protocol a{@sil_stored var e:a{get
^
;
<stdin>:3:35: error: expected declaration
protocol a{@sil_stored var e:a{get
^
<stdin>:3:12: error: attribute cannot be applied to declaration
protocol a{@sil_stored var e:a{get
^~~~~~~~~~~
<stdin>:3:28: error: property in protocol must have explicit { get } or { get set } specifier
protocol a{@sil_stored var e:a{get
^
sil-opt: /path/to/swift/lib/AST/Decl.cpp:2788: void swift::AbstractStorageDecl::makeComputed(swift::SourceLoc, swift::FuncDecl *, swift::FuncDecl *, swift::FuncDecl *, swift::SourceLoc): Assertion `getStorageKind() == Stored && "StorageKind already set"' failed.
8 sil-opt 0x0000000000d28290 swift::AbstractStorageDecl::makeComputed(swift::SourceLoc, swift::FuncDecl*, swift::FuncDecl*, swift::FuncDecl*, swift::SourceLoc) + 352
9 sil-opt 0x0000000000af320d swift::convertStoredVarInProtocolToComputed(swift::VarDecl*, swift::TypeChecker&) + 45
14 sil-opt 0x0000000000a9aba7 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 151
15 sil-opt 0x0000000000a66372 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1474
16 sil-opt 0x00000000007392c2 swift::CompilerInstance::performSema() + 2946
17 sil-opt 0x0000000000723efc main + 1916
Stack dump:
0. Program arguments: sil-opt -enable-sil-verify-all
1. While type-checking 'a' at <stdin>:3:1
```
2015-12-19 13:30:16 +01:00
Dmitri Gribenko
6d02fe9bd9
Merge pull request #660 from practicalswift/sil-006-swift-syntaxsugartype-getimplementationtype
...
[SIL] Add test case for crash triggered in swift::SyntaxSugarType::getImplementationType()
2015-12-19 04:03:38 -08:00
practicalswift
74b07c151d
[SIL] Add test case for crash triggered in swift::SyntaxSugarType::getImplementationType()
...
Stack trace:
```
<stdin>:3:8: error: expected '{' in class
class C
^
<stdin>:4:22: error: consecutive declarations on a line must be separated by ';'
struct e{weak var x:C
^
;
<stdin>:4:22: error: expected declaration
struct e{weak var x:C
^
sil-opt: /path/to/swift/lib/AST/Type.cpp:1361: swift::Type swift::SyntaxSugarType::getImplementationType(): Assertion `implDecl && "Optional type has not been set yet"' failed.
8 sil-opt 0x0000000000d776ed swift::SyntaxSugarType::getImplementationType() + 77
9 sil-opt 0x0000000000d7754f swift::TypeBase::getDesugaredType() + 15
11 sil-opt 0x0000000000d33e7f swift::DiagnosticEngine::emitDiagnostic(swift::Diagnostic const&) + 3039
12 sil-opt 0x0000000000d3314f swift::DiagnosticEngine::flushActiveDiagnostic() + 319
13 sil-opt 0x0000000000a73ed5 swift::TypeChecker::checkOwnershipAttr(swift::VarDecl*, swift::OwnershipAttr*) + 309
14 sil-opt 0x0000000000a73bac swift::TypeChecker::checkTypeModifyingDeclAttributes(swift::VarDecl*) + 76
15 sil-opt 0x0000000000abfbfc swift::TypeChecker::coercePatternToType(swift::Pattern*&, swift::DeclContext*, swift::Type, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*) + 2332
16 sil-opt 0x0000000000abf00c swift::TypeChecker::typeCheckPattern(swift::Pattern*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*) + 780
18 sil-opt 0x0000000000a95fc6 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 3974
19 sil-opt 0x0000000000af8f53 swift::createImplicitConstructor(swift::TypeChecker&, swift::NominalTypeDecl*, swift::ImplicitConstructorKind) + 451
20 sil-opt 0x0000000000a9fee3 swift::TypeChecker::addImplicitConstructors(swift::NominalTypeDecl*) + 1299
23 sil-opt 0x0000000000a9aba7 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 151
24 sil-opt 0x0000000000a66372 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1474
25 sil-opt 0x00000000007392c2 swift::CompilerInstance::performSema() + 2946
26 sil-opt 0x0000000000723efc main + 1916
Stack dump:
0. Program arguments: sil-opt -enable-sil-verify-all
1. While type-checking 'e' at <stdin>:4:1
```
2015-12-19 12:50:03 +01:00
practicalswift
5979c639e0
[SIL] Add test case for crash triggered in swift::SILFunction::verify() const
...
Stack trace:
```
sil-opt: /path/to/swift/lib/SIL/Verifier.cpp:2995: void (anonymous namespace)::SILVerifier::visitSILFunction(swift::SILFunction *): Assertion `!hasSharedVisibility(F->getLinkage()) && "external declarations of SILFunctions with shared visibility is not " "allowed"' failed.
8 sil-opt 0x00000000009aad02 swift::SILFunction::verify() const + 402
9 sil-opt 0x0000000000a243f8 swift::Parser::parseDeclSIL() + 5384
10 sil-opt 0x00000000009f5b2a swift::Parser::parseTopLevel() + 378
11 sil-opt 0x00000000009f0fcf swift::parseIntoSourceFile(swift::SourceFile&, unsigned int, bool*, swift::SILParserState*, swift::PersistentParserState*, swift::DelayedParsingCallbacks*) + 207
12 sil-opt 0x00000000007392a6 swift::CompilerInstance::performSema() + 2918
13 sil-opt 0x0000000000723efc main + 1916
Stack dump:
0. Program arguments: sil-opt -enable-sil-verify-all
1. With parser at source location: <stdin>:4:1
2. While verifying SIL function @a for <stdin>:3:21
```
2015-12-19 11:48:50 +01:00
Dmitri Gribenko
e545aba350
Merge pull request #642 from practicalswift/sil-004-swift-expr-getsourcerange
...
[SIL] Add test case for crash triggered in swift::Expr::getSourceRange()
2015-12-18 22:37:47 -08:00
practicalswift
f94d870fc9
Rename SIL crash - use .sil suffix instead of .swift
2015-12-18 21:16:30 +01:00
practicalswift
6e2b9b22d3
[SIL] Add test case for crash triggered in swift::Expr::getSourceRange() const
...
Stack trace:
```
<stdin>:3:15: error: expected convention name identifier in 'convention' attribute
l<@convention()>(
^
<stdin>:3:16: error: expected type
l<@convention()>(
^
<stdin>:3:2: note: while parsing this '<' as a type parameter bracket
l<@convention()>(
^
<stdin>:3:18: error: expected expression in list of expressions
l<@convention()>(
^
<stdin>:3:18: error: expected ',' separator
l<@convention()>(
^
,
<stdin>:3:1: error: expressions are not allowed at the top level
l<@convention()>(
^
sil-opt: /path/to/swift/include/swift/Basic/SourceLoc.h:93: swift::SourceRange::SourceRange(swift::SourceLoc, swift::SourceLoc): Assertion `Start.isValid() == End.isValid() && "Start and end should either both be valid or both be invalid!"' failed.
8 sil-opt 0x0000000000d3598b swift::Expr::getSourceRange() const + 1371
17 sil-opt 0x0000000000ccbfd4 swift::Decl::walk(swift::ASTWalker&) + 20
18 sil-opt 0x0000000000d5495e swift::SourceFile::walk(swift::ASTWalker&) + 174
19 sil-opt 0x0000000000d84594 swift::verify(swift::SourceFile&) + 52
20 sil-opt 0x00000000009f50b3 swift::Parser::parseTopLevel() + 563
21 sil-opt 0x00000000009f049f swift::parseIntoSourceFile(swift::SourceFile&, unsigned int, bool*, swift::SILParserState*, swift::PersistentParserState*, swift::DelayedParsingCallbacks*) + 207
22 sil-opt 0x0000000000739116 swift::CompilerInstance::performSema() + 2918
23 sil-opt 0x0000000000723d6c main + 1916
Stack dump:
0. Program arguments: sil-opt -enable-sil-verify-all
1. With parser at source location: <stdin>:3:18
2. While walking into decl declaration 0x5fa2ee0 at <stdin>:3:1
3. While verifying ranges expression at [<stdin>:3:1 - line:3:1] RangeText="l"
```
2015-12-18 21:00:19 +01:00
Dmitri Gribenko
883aee82c1
Merge pull request #631 from practicalswift/sil-002-swift-performnamebinding
...
[SIL] Add test case for crash triggered in swift::performNameBinding(…)
2015-12-18 02:32:49 -08:00
practicalswift
fa711cb9ce
[SIL] Add test case for crash triggered in swift::Parser::parseTypeSimple(swift::Diag<>, bool)
...
Stack trace:
```
<stdin>:3:7: error: expected '(' in argument list of function declaration
func x:inout p<
^
<stdin>:3:7: error: expected '->' after function parameter tuple
func x:inout p<
^
->
<stdin>:3:16: error: expected type
func x:inout p<
^
sil-opt: /path/to/swift/include/swift/Parse/ParserResult.h:73: T *swift::ParserResult<swift::TypeRepr>::get() const [T = swift::TypeRepr]: Assertion `getPtrOrNull() && "not checked for nullptr"' failed.
8 sil-opt 0x0000000000a54abd swift::Parser::parseTypeSimple(swift::Diag<>, bool) + 1229
9 sil-opt 0x0000000000a5620a swift::Parser::parseType(swift::Diag<>, bool) + 202
10 sil-opt 0x0000000000a1e1fc swift::Parser::parseFunctionSignature(swift::Identifier, swift::DeclName&, llvm::SmallVectorImpl<swift::Pattern*>&, swift::Parser::DefaultArgumentInfo&, swift::SourceLoc&, bool&, swift::TypeRepr*&) + 1020
11 sil-opt 0x0000000000a07cb5 swift::Parser::parseDeclFunc(swift::SourceLoc, swift::StaticSpellingKind, swift::OptionSet<swift::Parser::ParseDeclFlags, unsigned int>, swift::DeclAttributes&) + 1957
12 sil-opt 0x00000000009ff69a swift::Parser::parseDecl(llvm::SmallVectorImpl<swift::Decl*>&, swift::OptionSet<swift::Parser::ParseDeclFlags, unsigned int>) + 3306
13 sil-opt 0x0000000000a4968b swift::Parser::parseBraceItems(llvm::SmallVectorImpl<swift::ASTNode>&, swift::BraceItemListKind, swift::BraceItemListKind) + 2027
14 sil-opt 0x00000000009f413c swift::Parser::parseTopLevel() + 156
15 sil-opt 0x00000000009ef6bf swift::parseIntoSourceFile(swift::SourceFile&, unsigned int, bool*, swift::SILParserState*, swift::PersistentParserState*, swift::DelayedParsingCallbacks*) + 207
16 sil-opt 0x0000000000738da6 swift::CompilerInstance::performSema() + 2918
17 sil-opt 0x00000000007239fc main + 1916
Stack dump:
0. Program arguments: sil-opt -enable-sil-verify-all
1. With parser at source location: <stdin>:4:1
```
2015-12-18 08:52:11 +01:00
practicalswift
65e7ee6080
[SIL] Add test case for crash triggered in swift::performNameBinding(swift::SourceFile&, unsigned int)
...
Stack trace:
```
sil-opt: /path/to/swift/lib/Sema/NameBinding.cpp:196: void (anonymous namespace)::NameBinder::addImport(SmallVectorImpl<std::pair<ImportedModule, ImportOptions> > &, swift::ImportDecl *): Assertion `topLevelModule && "top-level module missing"' failed.
8 sil-opt 0x0000000000a5ae29 swift::performNameBinding(swift::SourceFile&, unsigned int) + 6969
9 sil-opt 0x0000000000a63a37 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 55
10 sil-opt 0x0000000000738af2 swift::CompilerInstance::performSema() + 2946
11 sil-opt 0x000000000072373c main + 1916
Stack dump:
0. Program arguments: sil-opt -enable-sil-verify-all
```
2015-12-17 23:15:35 +01:00
Dmitri Gribenko
1d5c9b153b
Annotate SIL crash tests for the --no-assertions build
2015-12-17 14:53:55 -07:00
practicalswift
a95646680d
[SIL] Add test case for crash triggered in swift::Parser::parseSILVTable()
...
Stack trace:
```
sil-opt: /path/to/swift/lib/Parse/ParseSIL.cpp:790: llvm::PointerUnion<ValueDecl *, Module *> lookupTopDecl(swift::Parser &, swift::Identifier): Assertion `DeclLookup.isSuccess() && DeclLookup.Results.size() == 1' failed.
9 sil-opt 0x0000000000a24740 swift::Parser::parseSILVTable() + 640
10 sil-opt 0x00000000009f38d3 swift::Parser::parseTopLevel() + 707
11 sil-opt 0x00000000009eecbb swift::parseIntoSourceFile(swift::SourceFile&, unsigned int, bool*, swift::SILParserState*, swift::PersistentParserState*, swift::DelayedParsingCallbacks*) + 107
12 sil-opt 0x0000000000738ad6 swift::CompilerInstance::performSema() + 2918
13 sil-opt 0x000000000072373c main + 1916
Stack dump:
0. Program arguments: sil-opt -enable-sil-verify-all
1. With parser at source location: <stdin>:2:13
```
2015-12-17 20:07:37 +01:00