Commit Graph

7859 Commits

Author SHA1 Message Date
Ben Langmuir
675c7d74f8 Merge pull request #584 from practicalswift/sourcekit-021-swift-typechecker-resolveidentifiertype
[SourceKit] Add test case for crash triggered in swift::TypeChecker::resolveIdentifierType(…)
2015-12-16 08:54:51 -08:00
Ben Langmuir
3cb074c8bb Merge pull request #583 from practicalswift/sourcekit-020-swift-typechecker-validategenericfuncsignature
[SourceKit] Add test case for crash triggered in swift::TypeChecker::validateGenericFuncSignature(…)
2015-12-16 08:54:40 -08:00
Ben Langmuir
eebe8e9f7e Merge pull request #582 from practicalswift/sourcekit-019-swift-vardecl-emitlettovarnoteifsimple
[SourceKit] Add test case for crash triggered in swift::VarDecl::emitLetToVarNoteIfSimple(…)
2015-12-16 08:54:28 -08:00
Ben Langmuir
915b9238a0 Merge pull request #581 from practicalswift/sourcekit-018-swift-type-transform
[SourceKit] Add test case for crash triggered in swift::Type::transform(…)
2015-12-16 08:54:20 -08:00
Ben Langmuir
2d0eb1e2f7 Merge pull request #580 from practicalswift/sourcekit-017-swift-expr-walk
[SourceKit] Add test case for crash triggered in swift::Expr::walk(…)
2015-12-16 08:54:09 -08:00
Ben Langmuir
30b9d80754 Merge pull request #579 from practicalswift/sourcekit-016-swift-mangle-mangler-mangleidentifier
[SourceKit] Add test case for crash triggered in swift::Mangle::Mangler::mangleIdentifier(…)
2015-12-16 08:53:51 -08:00
Ben Langmuir
f42b5265ba Merge pull request #578 from practicalswift/sourcekit-015-swift-typechecker-lookupunqualified
[SourceKit] Add test case for crash triggered in swift::TypeChecker::lookupUnqualified(…)
2015-12-16 08:51:34 -08:00
practicalswift
8f9ec9ee9e [SourceKit] Add test case for crash triggered in swift::Identifier::isOperatorSlow() const
Stack trace:

```
found code completion token A at offset 107
swift-ide-test: /path/to/swift/lib/AST/Identifier.cpp:63: bool swift::Identifier::isOperatorSlow() const: Assertion `res == conversionOK && "invalid UTF-8 in identifier?!"' failed.
8  swift-ide-test  0x0000000000b5b276 swift::Identifier::isOperatorSlow() const + 406
10 swift-ide-test  0x0000000000b7a164 swift::UnqualifiedLookup::UnqualifiedLookup(swift::DeclName, swift::DeclContext*, swift::LazyResolver*, bool, swift::SourceLoc, bool, bool) + 196
11 swift-ide-test  0x000000000095c6ab swift::TypeChecker::lookupUnqualified(swift::DeclContext*, swift::DeclName, swift::SourceLoc, swift::OptionSet<swift::NameLookupFlags, unsigned int>) + 187
12 swift-ide-test  0x0000000000917959 swift::TypeChecker::resolveDeclRefExpr(swift::UnresolvedDeclRefExpr*, swift::DeclContext*) + 121
14 swift-ide-test  0x0000000000ae6353 swift::Expr::walk(swift::ASTWalker&) + 19
15 swift-ide-test  0x0000000000918537 swift::TypeChecker::solveForExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::FreeTypeVariableBinding, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem&, llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>) + 119
16 swift-ide-test  0x000000000091efed swift::TypeChecker::getTypeOfExpressionWithoutApplying(swift::Expr*&, swift::DeclContext*, swift::FreeTypeVariableBinding, swift::ExprTypeCheckListener*) + 221
18 swift-ide-test  0x0000000000907c7e swift::getTypeOfCompletionContextExpr(swift::ASTContext&, swift::DeclContext*, swift::Expr*&) + 1150
20 swift-ide-test  0x0000000000865a46 swift::performDelayedParsing(swift::DeclContext*, swift::PersistentParserState&, swift::CodeCompletionCallbacksFactory*) + 230
21 swift-ide-test  0x0000000000774304 swift::CompilerInstance::performSema() + 3316
22 swift-ide-test  0x000000000071cc33 main + 35011
Stack dump:
0.	Program arguments: swift-ide-test -code-completion -code-completion-token=A -source-filename=<INPUT-FILE>
1.	While type-checking expression at [<INPUT-FILE>:2:1 - line:2:1] RangeText="Á"
```
2015-12-16 15:42:30 +01:00
practicalswift
ec203a1901 [SourceKit] Add test case for crash triggered in swift::Expr::propagateLValueAccessKind(swift::AccessKind, bool)
Stack trace:

```
found code completion token A at offset 116
swift-ide-test: /path/to/swift/lib/AST/Expr.cpp:204: void swift::Expr::propagateLValueAccessKind(swift::AccessKind, bool)::PropagateAccessKind::visit(swift::Expr *, swift::AccessKind): Assertion `(AllowOverwrite || !E->hasLValueAccessKind()) && "l-value access kind has already been set"' failed.
9  swift-ide-test  0x0000000000b524e7 swift::Expr::propagateLValueAccessKind(swift::AccessKind, bool) + 23
12 swift-ide-test  0x0000000000ae6385 swift::Expr::walk(swift::ASTWalker&) + 69
13 swift-ide-test  0x00000000009b9af6 swift::constraints::ConstraintSystem::applySolution(swift::constraints::Solution&, swift::Expr*, swift::Type, bool, bool, bool) + 502
14 swift-ide-test  0x000000000091ebdb swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 683
17 swift-ide-test  0x0000000000981c9a swift::TypeChecker::typeCheckClosureBody(swift::ClosureExpr*) + 218
18 swift-ide-test  0x00000000009b9c2c swift::constraints::ConstraintSystem::applySolution(swift::constraints::Solution&, swift::Expr*, swift::Type, bool, bool, bool) + 812
19 swift-ide-test  0x000000000091ebdb swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 683
21 swift-ide-test  0x0000000000981de6 swift::TypeChecker::typeCheckTopLevelCodeDecl(swift::TopLevelCodeDecl*) + 134
22 swift-ide-test  0x000000000090907d swift::typeCheckTopLevelCodeDecl(swift::TopLevelCodeDecl*) + 1117
32 swift-ide-test  0x0000000000ae6734 swift::Decl::walk(swift::ASTWalker&) + 20
33 swift-ide-test  0x0000000000b6fbce swift::SourceFile::walk(swift::ASTWalker&) + 174
34 swift-ide-test  0x0000000000b6efaf swift::ModuleDecl::walk(swift::ASTWalker&) + 79
35 swift-ide-test  0x0000000000b49722 swift::DeclContext::walkContext(swift::ASTWalker&) + 146
36 swift-ide-test  0x000000000086599d swift::performDelayedParsing(swift::DeclContext*, swift::PersistentParserState&, swift::CodeCompletionCallbacksFactory*) + 61
37 swift-ide-test  0x0000000000774304 swift::CompilerInstance::performSema() + 3316
38 swift-ide-test  0x000000000071cc33 main + 35011
Stack dump:
0.	Program arguments: swift-ide-test -code-completion -code-completion-token=A -source-filename=<INPUT-FILE>
1.	While walking into decl declaration 0x54b8f10 at <INPUT-FILE>:2:1
2.	While type-checking expression at [<INPUT-FILE>:2:1 - line:2:12] RangeText="{()=(var a{"
3.	While type-checking expression at [<INPUT-FILE>:2:2 - line:2:5] RangeText="()=("
```
2015-12-16 14:10:10 +01:00
practicalswift
aa13c59ea7 [SourceKit] Add test case for crash triggered in swift::Mangle::Mangler::mangleNominalType(swift::NominalTypeDecl const*, swift::ResilienceExpansion, swift::Mangle::Mangler::BindGenerics, swift::CanGenericSignature, swift::GenericParamList const*)
Stack trace:

```
found code completion token A at offset 129
swift-ide-test: /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.
9  swift-ide-test  0x0000000000b612c4 swift::Mangle::Mangler::mangleNominalType(swift::NominalTypeDecl const*, swift::ResilienceExpansion, swift::Mangle::Mangler::BindGenerics, swift::CanGenericSignature, swift::GenericParamList const*) + 340
10 swift-ide-test  0x0000000000b65cf6 swift::Mangle::Mangler::mangleAccessorEntity(swift::AccessorKind, swift::AddressorKind, swift::AbstractStorageDecl const*, swift::ResilienceExpansion) + 86
11 swift-ide-test  0x0000000000b61741 swift::Mangle::Mangler::mangleEntity(swift::ValueDecl const*, swift::ResilienceExpansion, unsigned int) + 417
12 swift-ide-test  0x0000000000b614dc swift::Mangle::Mangler::mangleConstructorEntity(swift::ConstructorDecl const*, bool, swift::ResilienceExpansion, unsigned int) + 76
13 swift-ide-test  0x0000000000b61092 swift::Mangle::Mangler::mangleDefaultArgumentEntity(swift::DeclContext const*, unsigned int) + 66
14 swift-ide-test  0x0000000000b65b4e swift::Mangle::Mangler::mangleClosureComponents(swift::Type, unsigned int, bool, swift::DeclContext const*, swift::DeclContext const*) + 94
15 swift-ide-test  0x0000000000b61270 swift::Mangle::Mangler::mangleNominalType(swift::NominalTypeDecl const*, swift::ResilienceExpansion, swift::Mangle::Mangler::BindGenerics, swift::CanGenericSignature, swift::GenericParamList const*) + 256
16 swift-ide-test  0x0000000000b61270 swift::Mangle::Mangler::mangleNominalType(swift::NominalTypeDecl const*, swift::ResilienceExpansion, swift::Mangle::Mangler::BindGenerics, swift::CanGenericSignature, swift::GenericParamList const*) + 256
17 swift-ide-test  0x0000000000b61270 swift::Mangle::Mangler::mangleNominalType(swift::NominalTypeDecl const*, swift::ResilienceExpansion, swift::Mangle::Mangler::BindGenerics, swift::CanGenericSignature, swift::GenericParamList const*) + 256
18 swift-ide-test  0x0000000000b9fe22 swift::ide::printDeclUSR(swift::ValueDecl const*, llvm::raw_ostream&) + 722
20 swift-ide-test  0x000000000077bd88 copyAssociatedUSRs(llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>&, swift::Decl const*) + 104
21 swift-ide-test  0x000000000077c508 swift::ide::CodeCompletionResultBuilder::takeResult() + 1624
29 swift-ide-test  0x0000000000ae6734 swift::Decl::walk(swift::ASTWalker&) + 20
30 swift-ide-test  0x0000000000b6fbce swift::SourceFile::walk(swift::ASTWalker&) + 174
31 swift-ide-test  0x0000000000b6efaf swift::ModuleDecl::walk(swift::ASTWalker&) + 79
32 swift-ide-test  0x0000000000b49722 swift::DeclContext::walkContext(swift::ASTWalker&) + 146
33 swift-ide-test  0x000000000086599d swift::performDelayedParsing(swift::DeclContext*, swift::PersistentParserState&, swift::CodeCompletionCallbacksFactory*) + 61
34 swift-ide-test  0x0000000000774304 swift::CompilerInstance::performSema() + 3316
35 swift-ide-test  0x000000000071cc33 main + 35011
Stack dump:
0.	Program arguments: swift-ide-test -code-completion -code-completion-token=A -source-filename=<INPUT-FILE>
1.	While walking into decl getter for a at <INPUT-FILE>:2:6
```
2015-12-16 14:10:04 +01:00
practicalswift
f76ba30d8f [SourceKit] Add test case for crash triggered in swift::Mangle::Mangler::mangleDeclType(swift::ValueDecl const*, swift::ResilienceExpansion, unsigned int)
Stack trace:

```
found code completion token A at offset 168
swift-ide-test: /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.
10 swift-ide-test  0x0000000000b64392 swift::Mangle::Mangler::mangleDeclType(swift::ValueDecl const*, swift::ResilienceExpansion, unsigned int) + 354
11 swift-ide-test  0x0000000000b614dc swift::Mangle::Mangler::mangleConstructorEntity(swift::ConstructorDecl const*, bool, swift::ResilienceExpansion, unsigned int) + 76
12 swift-ide-test  0x0000000000b61092 swift::Mangle::Mangler::mangleDefaultArgumentEntity(swift::DeclContext const*, unsigned int) + 66
13 swift-ide-test  0x0000000000b65b4e swift::Mangle::Mangler::mangleClosureComponents(swift::Type, unsigned int, bool, swift::DeclContext const*, swift::DeclContext const*) + 94
14 swift-ide-test  0x0000000000b61741 swift::Mangle::Mangler::mangleEntity(swift::ValueDecl const*, swift::ResilienceExpansion, unsigned int) + 417
15 swift-ide-test  0x0000000000b65cf6 swift::Mangle::Mangler::mangleAccessorEntity(swift::AccessorKind, swift::AddressorKind, swift::AbstractStorageDecl const*, swift::ResilienceExpansion) + 86
16 swift-ide-test  0x0000000000b61270 swift::Mangle::Mangler::mangleNominalType(swift::NominalTypeDecl const*, swift::ResilienceExpansion, swift::Mangle::Mangler::BindGenerics, swift::CanGenericSignature, swift::GenericParamList const*) + 256
17 swift-ide-test  0x0000000000b9fe22 swift::ide::printDeclUSR(swift::ValueDecl const*, llvm::raw_ostream&) + 722
19 swift-ide-test  0x000000000077bd88 copyAssociatedUSRs(llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>&, swift::Decl const*) + 104
20 swift-ide-test  0x000000000077c508 swift::ide::CodeCompletionResultBuilder::takeResult() + 1624
23 swift-ide-test  0x0000000000b5bd5b swift::lookupVisibleDecls(swift::VisibleDeclConsumer&, swift::DeclContext const*, swift::LazyResolver*, bool, swift::SourceLoc) + 555
27 swift-ide-test  0x0000000000ae6734 swift::Decl::walk(swift::ASTWalker&) + 20
28 swift-ide-test  0x0000000000b6fbce swift::SourceFile::walk(swift::ASTWalker&) + 174
29 swift-ide-test  0x0000000000b6efaf swift::ModuleDecl::walk(swift::ASTWalker&) + 79
30 swift-ide-test  0x0000000000b49722 swift::DeclContext::walkContext(swift::ASTWalker&) + 146
31 swift-ide-test  0x000000000086599d swift::performDelayedParsing(swift::DeclContext*, swift::PersistentParserState&, swift::CodeCompletionCallbacksFactory*) + 61
32 swift-ide-test  0x0000000000774304 swift::CompilerInstance::performSema() + 3316
33 swift-ide-test  0x000000000071cc33 main + 35011
Stack dump:
0.	Program arguments: swift-ide-test -code-completion -code-completion-token=A -source-filename=<INPUT-FILE>
1.	While walking into decl getter for A at <INPUT-FILE>:2:6
```
2015-12-16 14:09:56 +01:00
practicalswift
cbaf989677 [SourceKit] Add test case for crash triggered in swift::Decl::walk(swift::ASTWalker&)
Stack trace:

```
found code completion token A at offset 114
child source range not contained within its parent: var f
  parent range: [<INPUT-FILE>:2:1 - line:2:11] RangeText="{var f={{}"
  child range: [<INPUT-FILE>:2:2 - line:2:12] RangeText="var f={{}r"
14 swift-ide-test  0x0000000000ae6734 swift::Decl::walk(swift::ASTWalker&) + 20
15 swift-ide-test  0x0000000000b6fbce swift::SourceFile::walk(swift::ASTWalker&) + 174
16 swift-ide-test  0x0000000000ba00c4 swift::verify(swift::SourceFile&) + 52
17 swift-ide-test  0x000000000086a4a3 swift::Parser::parseTopLevel() + 563
18 swift-ide-test  0x000000000086591b swift::parseIntoSourceFile(swift::SourceFile&, unsigned int, bool*, swift::SILParserState*, swift::PersistentParserState*, swift::DelayedParsingCallbacks*) + 107
19 swift-ide-test  0x0000000000774176 swift::CompilerInstance::performSema() + 2918
20 swift-ide-test  0x000000000071cc33 main + 35011
Stack dump:
0.	Program arguments: swift-ide-test -code-completion -code-completion-token=A -source-filename=<INPUT-FILE>
1.	With parser at source location: <INPUT-FILE>:2:13
2.	While walking into decl declaration 0x5338df0 at <INPUT-FILE>:2:1
3.	While verifying ranges declaration 0x53390a8 at <INPUT-FILE>:2:2
```
2015-12-16 14:07:22 +01:00
practicalswift
9cc6e52388 [SourceKit] Add test case for crash triggered in swift::TypeChecker::validateGenericSignature(swift::GenericParamList*, swift::DeclContext*, swift::GenericSignature*, std::function<bool (swift::ArchetypeBuilder&)>, bool&)
Stack trace:

```
found code completion token A at offset 145
swift-ide-test: /path/to/swift/lib/Sema/TypeCheckGeneric.cpp:498: void collectRequirements(swift::ArchetypeBuilder &, ArrayRef<swift::GenericTypeParamType *>, SmallVectorImpl<swift::Requirement> &): Assertion `pa && "Missing potential archetype for generic parameter"' failed.
9  swift-ide-test  0x0000000000959683 swift::TypeChecker::validateGenericSignature(swift::GenericParamList*, swift::DeclContext*, swift::GenericSignature*, std::function<bool (swift::ArchetypeBuilder&)>, bool&) + 403
10 swift-ide-test  0x00000000009599b4 swift::TypeChecker::validateGenericTypeSignature(swift::NominalTypeDecl*) + 116
11 swift-ide-test  0x0000000000933021 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 353
14 swift-ide-test  0x0000000000938707 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 151
17 swift-ide-test  0x0000000000981c9a swift::TypeChecker::typeCheckClosureBody(swift::ClosureExpr*) + 218
18 swift-ide-test  0x00000000009b9c2c swift::constraints::ConstraintSystem::applySolution(swift::constraints::Solution&, swift::Expr*, swift::Type, bool, bool, bool) + 812
19 swift-ide-test  0x000000000091ebdb swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 683
22 swift-ide-test  0x00000000009808db swift::TypeChecker::typeCheckFunctionBodyUntil(swift::FuncDecl*, swift::SourceLoc) + 379
23 swift-ide-test  0x000000000098071e swift::TypeChecker::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) + 46
24 swift-ide-test  0x0000000000908bd8 swift::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) + 1128
32 swift-ide-test  0x0000000000ae6734 swift::Decl::walk(swift::ASTWalker&) + 20
33 swift-ide-test  0x0000000000b6fbce swift::SourceFile::walk(swift::ASTWalker&) + 174
34 swift-ide-test  0x0000000000b6efaf swift::ModuleDecl::walk(swift::ASTWalker&) + 79
35 swift-ide-test  0x0000000000b49722 swift::DeclContext::walkContext(swift::ASTWalker&) + 146
36 swift-ide-test  0x000000000086599d swift::performDelayedParsing(swift::DeclContext*, swift::PersistentParserState&, swift::CodeCompletionCallbacksFactory*) + 61
37 swift-ide-test  0x0000000000774304 swift::CompilerInstance::performSema() + 3316
38 swift-ide-test  0x000000000071cc33 main + 35011
Stack dump:
0.	Program arguments: swift-ide-test -code-completion -code-completion-token=A -source-filename=<INPUT-FILE>
1.	While walking into decl 'c' at <INPUT-FILE>:2:1
2.	While type-checking expression at [<INPUT-FILE>:2:29 - line:2:41] RangeText="{class B<T:e"
3.	While type-checking 'B' at <INPUT-FILE>:2:30
```
2015-12-16 14:07:15 +01:00
practicalswift
111eca1b35 [SourceKit] Add test case for crash triggered in swift::TypeBase::getDesugaredType()
Stack trace:

```
found code completion token A at offset 110
4  swift-ide-test  0x0000000000b919c0 swift::TypeBase::getDesugaredType() + 32
8  swift-ide-test  0x0000000000ae6385 swift::Expr::walk(swift::ASTWalker&) + 69
9  swift-ide-test  0x00000000008cf368 swift::constraints::ConstraintSystem::generateConstraints(swift::Expr*) + 200
10 swift-ide-test  0x00000000009185c0 swift::TypeChecker::solveForExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::FreeTypeVariableBinding, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem&, llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>) + 256
11 swift-ide-test  0x000000000091eb69 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 569
12 swift-ide-test  0x000000000091fc80 swift::TypeChecker::typeCheckBinding(swift::Pattern*&, swift::Expr*&, swift::DeclContext*) + 112
13 swift-ide-test  0x000000000091fe29 swift::TypeChecker::typeCheckPatternBinding(swift::PatternBindingDecl*, unsigned int) + 265
15 swift-ide-test  0x0000000000933e4b swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 3979
16 swift-ide-test  0x0000000000b7bf7c swift::DeclContext::lookupQualified(swift::Type, swift::DeclName, unsigned int, swift::LazyResolver*, llvm::SmallVectorImpl<swift::ValueDecl*>&) const + 2908
17 swift-ide-test  0x0000000000b7a96c swift::UnqualifiedLookup::UnqualifiedLookup(swift::DeclName, swift::DeclContext*, swift::LazyResolver*, bool, swift::SourceLoc, bool, bool) + 2252
18 swift-ide-test  0x000000000095c6ab swift::TypeChecker::lookupUnqualified(swift::DeclContext*, swift::DeclName, swift::SourceLoc, swift::OptionSet<swift::NameLookupFlags, unsigned int>) + 187
21 swift-ide-test  0x000000000098651e swift::TypeChecker::resolveIdentifierType(swift::DeclContext*, swift::IdentTypeRepr*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, bool, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 158
23 swift-ide-test  0x0000000000986414 swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 212
24 swift-ide-test  0x00000000009310d1 swift::TypeChecker::checkInheritanceClause(swift::Decl*, swift::GenericTypeResolver*) + 4929
25 swift-ide-test  0x00000000009335a3 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 1763
30 swift-ide-test  0x0000000000938707 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 151
31 swift-ide-test  0x0000000000905e02 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1298
32 swift-ide-test  0x0000000000774192 swift::CompilerInstance::performSema() + 2946
33 swift-ide-test  0x000000000071cc33 main + 35011
Stack dump:
0.	Program arguments: swift-ide-test -code-completion -code-completion-token=A -source-filename=<INPUT-FILE>
1.	While type-checking 'B' at <INPUT-FILE>:2:7
2.	While resolving type a at [<INPUT-FILE>:2:23 - line:2:23] RangeText="a"
3.	While type-checking expression at [<INPUT-FILE>:2:32 - line:2:33] RangeText="B{"
```
2015-12-16 14:07:07 +01:00
practicalswift
68dfc12ae4 [SourceKit] Add test case for crash triggered in swift::Mangle::Mangler::mangleType(swift::Type, swift::ResilienceExpansion, unsigned int)
Stack trace:

```
found code completion token A at offset 173
swift-ide-test: /path/to/swift/lib/AST/Mangle.cpp:1276: void swift::Mangle::Mangler::mangleType(swift::Type, swift::ResilienceExpansion, unsigned int): Assertion `ArchetypesDepth >= info.Depth' failed.
8  swift-ide-test  0x0000000000b63cc8 swift::Mangle::Mangler::mangleType(swift::Type, swift::ResilienceExpansion, unsigned int) + 7160
9  swift-ide-test  0x0000000000b6431e swift::Mangle::Mangler::mangleDeclType(swift::ValueDecl const*, swift::ResilienceExpansion, unsigned int) + 238
10 swift-ide-test  0x0000000000b9fe7f swift::ide::printDeclUSR(swift::ValueDecl const*, llvm::raw_ostream&) + 815
12 swift-ide-test  0x000000000077bd88 copyAssociatedUSRs(llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>&, swift::Decl const*) + 104
13 swift-ide-test  0x000000000077c508 swift::ide::CodeCompletionResultBuilder::takeResult() + 1624
17 swift-ide-test  0x0000000000b5bd5b swift::lookupVisibleDecls(swift::VisibleDeclConsumer&, swift::DeclContext const*, swift::LazyResolver*, bool, swift::SourceLoc) + 555
22 swift-ide-test  0x0000000000ae6734 swift::Decl::walk(swift::ASTWalker&) + 20
23 swift-ide-test  0x0000000000b6fbce swift::SourceFile::walk(swift::ASTWalker&) + 174
24 swift-ide-test  0x0000000000b6efaf swift::ModuleDecl::walk(swift::ASTWalker&) + 79
25 swift-ide-test  0x0000000000b49722 swift::DeclContext::walkContext(swift::ASTWalker&) + 146
26 swift-ide-test  0x000000000086599d swift::performDelayedParsing(swift::DeclContext*, swift::PersistentParserState&, swift::CodeCompletionCallbacksFactory*) + 61
27 swift-ide-test  0x0000000000774304 swift::CompilerInstance::performSema() + 3316
28 swift-ide-test  0x000000000071cc33 main + 35011
Stack dump:
0.	Program arguments: swift-ide-test -code-completion -code-completion-token=A -source-filename=<INPUT-FILE>
1.	While walking into decl getter for a at <INPUT-FILE>:2:6
```
2015-12-16 13:57:54 +01:00
practicalswift
00ae7f5c9d [SourceKit] Add test case for crash triggered in swift::Mangle::Mangler::bindGenericParameters(swift::CanGenericSignature, swift::GenericParamList const*)
Stack trace:

```
found code completion token A at offset 139
swift-ide-test: /path/to/swift/lib/AST/Mangle.cpp:356: void swift::Mangle::Mangler::bindGenericParameters(swift::CanGenericSignature, const swift::GenericParamList *): Assertion `ArchetypesDepth == genericParams->getDepth()' failed.
8  swift-ide-test  0x0000000000b61a65 swift::Mangle::Mangler::bindGenericParameters(swift::CanGenericSignature, swift::GenericParamList const*) + 565
9  swift-ide-test  0x0000000000b612c4 swift::Mangle::Mangler::mangleNominalType(swift::NominalTypeDecl const*, swift::ResilienceExpansion, swift::Mangle::Mangler::BindGenerics, swift::CanGenericSignature, swift::GenericParamList const*) + 340
10 swift-ide-test  0x0000000000b65cf6 swift::Mangle::Mangler::mangleAccessorEntity(swift::AccessorKind, swift::AddressorKind, swift::AbstractStorageDecl const*, swift::ResilienceExpansion) + 86
11 swift-ide-test  0x0000000000b61741 swift::Mangle::Mangler::mangleEntity(swift::ValueDecl const*, swift::ResilienceExpansion, unsigned int) + 417
12 swift-ide-test  0x0000000000b9fe7f swift::ide::printDeclUSR(swift::ValueDecl const*, llvm::raw_ostream&) + 815
14 swift-ide-test  0x000000000077bd88 copyAssociatedUSRs(llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>&, swift::Decl const*) + 104
15 swift-ide-test  0x000000000077c508 swift::ide::CodeCompletionResultBuilder::takeResult() + 1624
19 swift-ide-test  0x0000000000b5bd5b swift::lookupVisibleDecls(swift::VisibleDeclConsumer&, swift::DeclContext const*, swift::LazyResolver*, bool, swift::SourceLoc) + 555
28 swift-ide-test  0x0000000000ae6734 swift::Decl::walk(swift::ASTWalker&) + 20
29 swift-ide-test  0x0000000000b6fbce swift::SourceFile::walk(swift::ASTWalker&) + 174
30 swift-ide-test  0x0000000000b6efaf swift::ModuleDecl::walk(swift::ASTWalker&) + 79
31 swift-ide-test  0x0000000000b49722 swift::DeclContext::walkContext(swift::ASTWalker&) + 146
32 swift-ide-test  0x000000000086599d swift::performDelayedParsing(swift::DeclContext*, swift::PersistentParserState&, swift::CodeCompletionCallbacksFactory*) + 61
33 swift-ide-test  0x0000000000774304 swift::CompilerInstance::performSema() + 3316
34 swift-ide-test  0x000000000071cc33 main + 35011
Stack dump:
0.	Program arguments: swift-ide-test -code-completion -code-completion-token=A -source-filename=<INPUT-FILE>
1.	While walking into decl 'a' at <INPUT-FILE>:2:1
```
2015-12-16 13:57:48 +01:00
practicalswift
f5fefb0498 [SourceKit] Add test case for crash triggered in swift::ArchetypeBuilder::PotentialArchetype::getRepresentative()
Stack trace:

```
found code completion token A at offset 136
4  swift-ide-test  0x0000000000a96594 swift::ArchetypeBuilder::PotentialArchetype::getRepresentative() + 4
5  swift-ide-test  0x0000000000956eab swift::DependentGenericTypeResolver::resolveSelfAssociatedType(swift::Type, swift::DeclContext*, swift::AssociatedTypeDecl*) + 27
6  swift-ide-test  0x00000000009859cc swift::TypeChecker::resolveTypeInContext(swift::TypeDecl*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, bool, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 796
10 swift-ide-test  0x000000000098651e swift::TypeChecker::resolveIdentifierType(swift::DeclContext*, swift::IdentTypeRepr*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, bool, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 158
12 swift-ide-test  0x0000000000986414 swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 212
14 swift-ide-test  0x0000000000957afc swift::TypeChecker::validateGenericFuncSignature(swift::AbstractFunctionDecl*) + 124
17 swift-ide-test  0x00000000009331e0 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 800
18 swift-ide-test  0x0000000000b7bf7c swift::DeclContext::lookupQualified(swift::Type, swift::DeclName, unsigned int, swift::LazyResolver*, llvm::SmallVectorImpl<swift::ValueDecl*>&) const + 2908
19 swift-ide-test  0x0000000000b7a96c swift::UnqualifiedLookup::UnqualifiedLookup(swift::DeclName, swift::DeclContext*, swift::LazyResolver*, bool, swift::SourceLoc, bool, bool) + 2252
20 swift-ide-test  0x000000000095c6ab swift::TypeChecker::lookupUnqualified(swift::DeclContext*, swift::DeclName, swift::SourceLoc, swift::OptionSet<swift::NameLookupFlags, unsigned int>) + 187
23 swift-ide-test  0x000000000098651e swift::TypeChecker::resolveIdentifierType(swift::DeclContext*, swift::IdentTypeRepr*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, bool, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 158
25 swift-ide-test  0x0000000000986414 swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 212
26 swift-ide-test  0x00000000009f6e72 swift::IterativeTypeChecker::processResolveInheritedClauseEntry(std::pair<llvm::PointerUnion<swift::TypeDecl*, swift::ExtensionDecl*>, unsigned int>, llvm::function_ref<bool (swift::TypeCheckRequest)>) + 146
27 swift-ide-test  0x00000000009f6777 swift::IterativeTypeChecker::satisfy(swift::TypeCheckRequest) + 359
28 swift-ide-test  0x000000000092fd49 swift::TypeChecker::resolveInheritanceClause(llvm::PointerUnion<swift::TypeDecl*, swift::ExtensionDecl*>) + 137
29 swift-ide-test  0x00000000009332f3 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 1075
30 swift-ide-test  0x0000000000b7bf7c swift::DeclContext::lookupQualified(swift::Type, swift::DeclName, unsigned int, swift::LazyResolver*, llvm::SmallVectorImpl<swift::ValueDecl*>&) const + 2908
31 swift-ide-test  0x0000000000b7a96c swift::UnqualifiedLookup::UnqualifiedLookup(swift::DeclName, swift::DeclContext*, swift::LazyResolver*, bool, swift::SourceLoc, bool, bool) + 2252
32 swift-ide-test  0x000000000095c6ab swift::TypeChecker::lookupUnqualified(swift::DeclContext*, swift::DeclName, swift::SourceLoc, swift::OptionSet<swift::NameLookupFlags, unsigned int>) + 187
35 swift-ide-test  0x000000000098651e swift::TypeChecker::resolveIdentifierType(swift::DeclContext*, swift::IdentTypeRepr*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, bool, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 158
37 swift-ide-test  0x0000000000986414 swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 212
39 swift-ide-test  0x0000000000957afc swift::TypeChecker::validateGenericFuncSignature(swift::AbstractFunctionDecl*) + 124
44 swift-ide-test  0x0000000000938707 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 151
45 swift-ide-test  0x0000000000905e02 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1298
46 swift-ide-test  0x0000000000774192 swift::CompilerInstance::performSema() + 2946
47 swift-ide-test  0x000000000071cc33 main + 35011
Stack dump:
0.	Program arguments: swift-ide-test -code-completion -code-completion-token=A -source-filename=<INPUT-FILE>
1.	While type-checking 'c' at <INPUT-FILE>:2:1
2.	While resolving type P at [<INPUT-FILE>:2:19 - line:2:19] RangeText="P"
3.	While resolving type a at [<INPUT-FILE>:4:13 - line:4:13] RangeText="a"
4.	While type-checking 'a' at <INPUT-FILE>:3:13
5.	While resolving type b at [<INPUT-FILE>:3:20 - line:3:20] RangeText="b"
```
2015-12-16 13:57:41 +01:00
practicalswift
3d8922d5df [SourceKit] Add test case for crash triggered in swift::ArchetypeBuilder::addGenericParameter(swift::GenericTypeParamType*)
Stack trace:

```
found code completion token A at offset 152
swift-ide-test: /path/to/swift/lib/AST/ArchetypeBuilder.cpp:721: swift::ArchetypeBuilder::PotentialArchetype *swift::ArchetypeBuilder::addGenericParameter(swift::GenericTypeParamType *, swift::ProtocolDecl *, swift::Identifier): Assertion `!Impl->PotentialArchetypes[Key]' failed.
9  swift-ide-test  0x0000000000a98f1a swift::ArchetypeBuilder::addGenericParameter(swift::GenericTypeParamType*) + 106
10 swift-ide-test  0x0000000000a9c3ae swift::ArchetypeBuilder::addGenericSignature(swift::GenericSignature*, bool, bool) + 94
11 swift-ide-test  0x0000000000b57713 swift::GenericSignature::getCanonicalManglingSignature(swift::ModuleDecl&) const + 243
12 swift-ide-test  0x0000000000b644c5 swift::Mangle::Mangler::getDeclTypeForMangling(swift::ValueDecl const*, llvm::ArrayRef<swift::GenericTypeParamType*>&, unsigned int&, llvm::ArrayRef<swift::Requirement>&, llvm::SmallVectorImpl<swift::Requirement>&) + 165
13 swift-ide-test  0x0000000000b642a4 swift::Mangle::Mangler::mangleDeclType(swift::ValueDecl const*, swift::ResilienceExpansion, unsigned int) + 116
14 swift-ide-test  0x0000000000b9fe7f swift::ide::printDeclUSR(swift::ValueDecl const*, llvm::raw_ostream&) + 815
16 swift-ide-test  0x000000000077bd88 copyAssociatedUSRs(llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>&, swift::Decl const*) + 104
17 swift-ide-test  0x000000000077c508 swift::ide::CodeCompletionResultBuilder::takeResult() + 1624
21 swift-ide-test  0x0000000000b5bf8d swift::lookupVisibleDecls(swift::VisibleDeclConsumer&, swift::DeclContext const*, swift::LazyResolver*, bool, swift::SourceLoc) + 1117
26 swift-ide-test  0x0000000000ae6734 swift::Decl::walk(swift::ASTWalker&) + 20
27 swift-ide-test  0x0000000000b6fbce swift::SourceFile::walk(swift::ASTWalker&) + 174
28 swift-ide-test  0x0000000000b6efaf swift::ModuleDecl::walk(swift::ASTWalker&) + 79
29 swift-ide-test  0x0000000000b49722 swift::DeclContext::walkContext(swift::ASTWalker&) + 146
30 swift-ide-test  0x000000000086599d swift::performDelayedParsing(swift::DeclContext*, swift::PersistentParserState&, swift::CodeCompletionCallbacksFactory*) + 61
31 swift-ide-test  0x0000000000774304 swift::CompilerInstance::performSema() + 3316
32 swift-ide-test  0x000000000071cc33 main + 35011
Stack dump:
0.	Program arguments: swift-ide-test -code-completion -code-completion-token=A -source-filename=<INPUT-FILE>
1.	While walking into decl getter for a at <INPUT-FILE>:2:6
```
2015-12-16 13:57:35 +01:00
practicalswift
ba18677e5c [SourceKit] Add test case for crash triggered in swift::TypeChecker::applyGenericArguments(swift::Type, swift::SourceLoc, swift::DeclContext*, llvm::MutableArrayRef<swift::TypeLoc>, bool, swift::GenericTypeResolver*)
Stack trace:

```
found code completion token A at offset 159
swift-ide-test: /path/to/swift/lib/Sema/TypeCheckGeneric.cpp:1028: bool swift::TypeChecker::checkGenericArguments(swift::DeclContext *, swift::SourceLoc, swift::SourceLoc, swift::Type, swift::GenericSignature *, ArrayRef<swift::Type>): Assertion `genericParams.size() == genericArgs.size()' failed.
9  swift-ide-test  0x0000000000986288 swift::TypeChecker::applyGenericArguments(swift::Type, swift::SourceLoc, swift::DeclContext*, llvm::MutableArrayRef<swift::TypeLoc>, bool, swift::GenericTypeResolver*) + 888
14 swift-ide-test  0x000000000098651e swift::TypeChecker::resolveIdentifierType(swift::DeclContext*, swift::IdentTypeRepr*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, bool, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 158
16 swift-ide-test  0x0000000000986414 swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 212
17 swift-ide-test  0x00000000009f6e72 swift::IterativeTypeChecker::processResolveInheritedClauseEntry(std::pair<llvm::PointerUnion<swift::TypeDecl*, swift::ExtensionDecl*>, unsigned int>, llvm::function_ref<bool (swift::TypeCheckRequest)>) + 146
18 swift-ide-test  0x00000000009f6777 swift::IterativeTypeChecker::satisfy(swift::TypeCheckRequest) + 359
19 swift-ide-test  0x000000000092fd49 swift::TypeChecker::resolveInheritanceClause(llvm::PointerUnion<swift::TypeDecl*, swift::ExtensionDecl*>) + 137
20 swift-ide-test  0x00000000009332f3 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 1075
25 swift-ide-test  0x0000000000938707 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 151
26 swift-ide-test  0x0000000000907312 swift::typeCheckCompletionDecl(swift::Decl*) + 1122
29 swift-ide-test  0x0000000000865a46 swift::performDelayedParsing(swift::DeclContext*, swift::PersistentParserState&, swift::CodeCompletionCallbacksFactory*) + 230
30 swift-ide-test  0x0000000000774304 swift::CompilerInstance::performSema() + 3316
31 swift-ide-test  0x000000000071cc33 main + 35011
Stack dump:
0.	Program arguments: swift-ide-test -code-completion -code-completion-token=A -source-filename=<INPUT-FILE>
1.	While type-checking 'c' at <INPUT-FILE>:6:2
2.	While resolving type B<T> at [<INPUT-FILE>:8:24 - line:8:27] RangeText="B<T>"
```
2015-12-16 13:57:25 +01:00
practicalswift
d958f4c2fa [SourceKit] Add test case for crash triggered in swift::TypeChecker::resolveIdentifierType(swift::DeclContext*, swift::IdentTypeRepr*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, bool, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*)
Stack trace:

```
found code completion token A at offset 125
swift-ide-test: /path/to/swift/lib/Sema/TypeCheckType.cpp:428: swift::Type swift::TypeChecker::applyGenericArguments(swift::Type, swift::SourceLoc, swift::DeclContext *, MutableArrayRef<swift::TypeLoc>, bool, swift::GenericTypeResolver *): Assertion `genericSig != nullptr' failed.
13 swift-ide-test  0x000000000098651e swift::TypeChecker::resolveIdentifierType(swift::DeclContext*, swift::IdentTypeRepr*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, bool, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 158
15 swift-ide-test  0x0000000000986414 swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 212
16 swift-ide-test  0x00000000009f6e72 swift::IterativeTypeChecker::processResolveInheritedClauseEntry(std::pair<llvm::PointerUnion<swift::TypeDecl*, swift::ExtensionDecl*>, unsigned int>, llvm::function_ref<bool (swift::TypeCheckRequest)>) + 146
17 swift-ide-test  0x00000000009f6777 swift::IterativeTypeChecker::satisfy(swift::TypeCheckRequest) + 359
18 swift-ide-test  0x000000000092fd49 swift::TypeChecker::resolveInheritanceClause(llvm::PointerUnion<swift::TypeDecl*, swift::ExtensionDecl*>) + 137
19 swift-ide-test  0x00000000009332f3 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 1075
24 swift-ide-test  0x0000000000938707 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 151
27 swift-ide-test  0x0000000000981c9a swift::TypeChecker::typeCheckClosureBody(swift::ClosureExpr*) + 218
28 swift-ide-test  0x00000000009b9c2c swift::constraints::ConstraintSystem::applySolution(swift::constraints::Solution&, swift::Expr*, swift::Type, bool, bool, bool) + 812
29 swift-ide-test  0x000000000091ebdb swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 683
31 swift-ide-test  0x0000000000981de6 swift::TypeChecker::typeCheckTopLevelCodeDecl(swift::TopLevelCodeDecl*) + 134
32 swift-ide-test  0x0000000000905e6d swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1405
33 swift-ide-test  0x0000000000774192 swift::CompilerInstance::performSema() + 2946
34 swift-ide-test  0x000000000071cc33 main + 35011
Stack dump:
0.	Program arguments: swift-ide-test -code-completion -code-completion-token=A -source-filename=<INPUT-FILE>
1.	While type-checking expression at [<INPUT-FILE>:2:1 - line:2:47] RangeText="{class T{protocol b{typealias b:B<T>struct B<b"
2.	While type-checking 'T' at <INPUT-FILE>:2:2
3.	While resolving type B<T> at [<INPUT-FILE>:2:34 - line:2:37] RangeText="B<T>"
```
2015-12-16 13:53:01 +01:00
practicalswift
567b8926d5 [SourceKit] Add test case for crash triggered in swift::TypeChecker::validateGenericFuncSignature(swift::AbstractFunctionDecl*)
Stack trace:

```
found code completion token A at offset 154
swift-ide-test: /path/to/swift/lib/Sema/TypeCheckGeneric.cpp:498: void collectRequirements(swift::ArchetypeBuilder &, ArrayRef<swift::GenericTypeParamType *>, SmallVectorImpl<swift::Requirement> &): Assertion `pa && "Missing potential archetype for generic parameter"' failed.
9  swift-ide-test  0x0000000000957c0f swift::TypeChecker::validateGenericFuncSignature(swift::AbstractFunctionDecl*) + 399
14 swift-ide-test  0x0000000000938707 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 151
17 swift-ide-test  0x00000000009808db swift::TypeChecker::typeCheckFunctionBodyUntil(swift::FuncDecl*, swift::SourceLoc) + 379
18 swift-ide-test  0x000000000098071e swift::TypeChecker::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) + 46
19 swift-ide-test  0x0000000000908bd8 swift::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) + 1128
28 swift-ide-test  0x0000000000ae6734 swift::Decl::walk(swift::ASTWalker&) + 20
29 swift-ide-test  0x0000000000b6fbce swift::SourceFile::walk(swift::ASTWalker&) + 174
30 swift-ide-test  0x0000000000b6efaf swift::ModuleDecl::walk(swift::ASTWalker&) + 79
31 swift-ide-test  0x0000000000b49722 swift::DeclContext::walkContext(swift::ASTWalker&) + 146
32 swift-ide-test  0x000000000086599d swift::performDelayedParsing(swift::DeclContext*, swift::PersistentParserState&, swift::CodeCompletionCallbacksFactory*) + 61
33 swift-ide-test  0x0000000000774304 swift::CompilerInstance::performSema() + 3316
34 swift-ide-test  0x000000000071cc33 main + 35011
Stack dump:
0.	Program arguments: swift-ide-test -code-completion -code-completion-token=A -source-filename=<INPUT-FILE>
1.	While walking into decl 'a' at <INPUT-FILE>:2:1
2.	While type-checking 'a' at <INPUT-FILE>:2:29
```
2015-12-16 13:52:07 +01:00
practicalswift
41925c65a5 [SourceKit] Add test case for crash triggered in swift::VarDecl::emitLetToVarNoteIfSimple(swift::DeclContext*) const
Stack trace:

```
found code completion token A at offset 143
swift-ide-test: /path/to/llvm/include/llvm/Support/Casting.h:95: static bool llvm::isa_impl_cl<swift::FuncDecl, const swift::AbstractFunctionDecl *>::doit(const From *) [To = swift::FuncDecl, From = const swift::AbstractFunctionDecl *]: Assertion `Val && "isa<> used on a null pointer"' failed.
8  swift-ide-test  0x0000000000b43ac4 swift::VarDecl::emitLetToVarNoteIfSimple(swift::DeclContext*) const + 612
10 swift-ide-test  0x00000000009203b6 swift::constraints::ConstraintSystem::computeAssignDestType(swift::Expr*, swift::SourceLoc) + 966
13 swift-ide-test  0x0000000000ae6385 swift::Expr::walk(swift::ASTWalker&) + 69
14 swift-ide-test  0x00000000008cf368 swift::constraints::ConstraintSystem::generateConstraints(swift::Expr*) + 200
15 swift-ide-test  0x00000000009185c0 swift::TypeChecker::solveForExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::FreeTypeVariableBinding, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem&, llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>) + 256
16 swift-ide-test  0x000000000091eb69 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 569
17 swift-ide-test  0x000000000091fc80 swift::TypeChecker::typeCheckBinding(swift::Pattern*&, swift::Expr*&, swift::DeclContext*) + 112
18 swift-ide-test  0x000000000091fe29 swift::TypeChecker::typeCheckPatternBinding(swift::PatternBindingDecl*, unsigned int) + 265
23 swift-ide-test  0x0000000000938707 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 151
26 swift-ide-test  0x00000000009808db swift::TypeChecker::typeCheckFunctionBodyUntil(swift::FuncDecl*, swift::SourceLoc) + 379
27 swift-ide-test  0x000000000098071e swift::TypeChecker::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) + 46
28 swift-ide-test  0x0000000000908bd8 swift::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) + 1128
35 swift-ide-test  0x0000000000ae6734 swift::Decl::walk(swift::ASTWalker&) + 20
36 swift-ide-test  0x0000000000b6fbce swift::SourceFile::walk(swift::ASTWalker&) + 174
37 swift-ide-test  0x0000000000b6efaf swift::ModuleDecl::walk(swift::ASTWalker&) + 79
38 swift-ide-test  0x0000000000b49722 swift::DeclContext::walkContext(swift::ASTWalker&) + 146
39 swift-ide-test  0x000000000086599d swift::performDelayedParsing(swift::DeclContext*, swift::PersistentParserState&, swift::CodeCompletionCallbacksFactory*) + 61
40 swift-ide-test  0x0000000000774304 swift::CompilerInstance::performSema() + 3316
41 swift-ide-test  0x000000000071cc33 main + 35011
Stack dump:
0.	Program arguments: swift-ide-test -code-completion -code-completion-token=A -source-filename=<INPUT-FILE>
1.	While walking into decl 'l' at <INPUT-FILE>:2:1
2.	While type-checking 'Q' at <INPUT-FILE>:2:22
3.	While type-checking expression at [<INPUT-FILE>:2:36 - line:2:39] RangeText="a={"
```
2015-12-16 13:50:49 +01:00
practicalswift
462485a497 [SourceKit] Add test case for crash triggered in swift::Type::transform(std::function<swift::Type (swift::Type)> const&) const
Stack trace:

```
found code completion token A at offset 169
6  swift-ide-test  0x0000000000b95d9c swift::Type::transform(std::function<swift::Type (swift::Type)> const&) const + 44
7  swift-ide-test  0x0000000000b97bde swift::TypeBase::getTypeOfMember(swift::ModuleDecl*, swift::Type, swift::DeclContext*) + 174
8  swift-ide-test  0x0000000000985c4b swift::TypeChecker::resolveTypeInContext(swift::TypeDecl*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, bool, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 1435
12 swift-ide-test  0x000000000098651e swift::TypeChecker::resolveIdentifierType(swift::DeclContext*, swift::IdentTypeRepr*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, bool, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 158
14 swift-ide-test  0x0000000000986414 swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 212
19 swift-ide-test  0x0000000000938707 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 151
22 swift-ide-test  0x00000000009808db swift::TypeChecker::typeCheckFunctionBodyUntil(swift::FuncDecl*, swift::SourceLoc) + 379
23 swift-ide-test  0x000000000098071e swift::TypeChecker::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) + 46
24 swift-ide-test  0x0000000000908bd8 swift::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) + 1128
33 swift-ide-test  0x0000000000ae6734 swift::Decl::walk(swift::ASTWalker&) + 20
34 swift-ide-test  0x0000000000b6fbce swift::SourceFile::walk(swift::ASTWalker&) + 174
35 swift-ide-test  0x0000000000b6efaf swift::ModuleDecl::walk(swift::ASTWalker&) + 79
36 swift-ide-test  0x0000000000b49722 swift::DeclContext::walkContext(swift::ASTWalker&) + 146
37 swift-ide-test  0x000000000086599d swift::performDelayedParsing(swift::DeclContext*, swift::PersistentParserState&, swift::CodeCompletionCallbacksFactory*) + 61
38 swift-ide-test  0x0000000000774304 swift::CompilerInstance::performSema() + 3316
39 swift-ide-test  0x000000000071cc33 main + 35011
Stack dump:
0.	Program arguments: swift-ide-test -code-completion -code-completion-token=A -source-filename=<INPUT-FILE>
1.	While walking into decl 'A' at <INPUT-FILE>:2:1
2.	While type-checking 'A' at <INPUT-FILE>:5:1
3.	While resolving type e at [<INPUT-FILE>:5:24 - line:5:24] RangeText="e"
```
2015-12-16 13:32:10 +01:00
practicalswift
0af908706c [SourceKit] Add test case for crash triggered in swift::Expr::walk(swift::ASTWalker&)
Stack trace:

```
found code completion token A at offset 122
swift-ide-test: /path/to/llvm/include/llvm/ADT/PointerUnion.h:297: T llvm::PointerUnion3<swift::Expr *, swift::Stmt *, swift::Decl *>::get() const [PT1 = swift::Expr *, PT2 = swift::Stmt *, PT3 = swift::Decl *, T = swift::Stmt *]: Assertion `is<T>() && "Invalid accessor called"' failed.
14 swift-ide-test  0x0000000000ae636e swift::Expr::walk(swift::ASTWalker&) + 46
15 swift-ide-test  0x00000000009b9af6 swift::constraints::ConstraintSystem::applySolution(swift::constraints::Solution&, swift::Expr*, swift::Type, bool, bool, bool) + 502
16 swift-ide-test  0x000000000091ebdb swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 683
18 swift-ide-test  0x0000000000981de6 swift::TypeChecker::typeCheckTopLevelCodeDecl(swift::TopLevelCodeDecl*) + 134
19 swift-ide-test  0x000000000090907d swift::typeCheckTopLevelCodeDecl(swift::TopLevelCodeDecl*) + 1117
23 swift-ide-test  0x0000000000865a46 swift::performDelayedParsing(swift::DeclContext*, swift::PersistentParserState&, swift::CodeCompletionCallbacksFactory*) + 230
24 swift-ide-test  0x0000000000774304 swift::CompilerInstance::performSema() + 3316
25 swift-ide-test  0x000000000071cc33 main + 35011
Stack dump:
0.	Program arguments: swift-ide-test -code-completion -code-completion-token=A -source-filename=<INPUT-FILE>
1.	While type-checking expression at [<INPUT-FILE>:2:1 - line:3:14] RangeText="[{}
({[{struct A{"
```
2015-12-16 13:31:31 +01:00
practicalswift
c2cc1cd523 [SourceKit] Add test case for crash triggered in swift::Mangle::Mangler::mangleIdentifier(swift::Identifier, swift::Mangle::OperatorFixity)
Stack trace:

```
found code completion token A at offset 122
swift-ide-test: /path/to/llvm/include/llvm/ADT/StringRef.h:73: llvm::StringRef::StringRef(const char *): Assertion `Str && "StringRef cannot be built from a NULL argument"' failed.
8  swift-ide-test  0x0000000000b60404 swift::Mangle::Mangler::mangleIdentifier(swift::Identifier, swift::Mangle::OperatorFixity) + 164
9  swift-ide-test  0x0000000000b61de2 swift::Mangle::Mangler::mangleDeclName(swift::ValueDecl const*) + 850
10 swift-ide-test  0x0000000000b6174c swift::Mangle::Mangler::mangleEntity(swift::ValueDecl const*, swift::ResilienceExpansion, unsigned int) + 428
11 swift-ide-test  0x0000000000b61741 swift::Mangle::Mangler::mangleEntity(swift::ValueDecl const*, swift::ResilienceExpansion, unsigned int) + 417
12 swift-ide-test  0x0000000000b9fe7f swift::ide::printDeclUSR(swift::ValueDecl const*, llvm::raw_ostream&) + 815
14 swift-ide-test  0x000000000077bd88 copyAssociatedUSRs(llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>&, swift::Decl const*) + 104
15 swift-ide-test  0x000000000077c508 swift::ide::CodeCompletionResultBuilder::takeResult() + 1624
19 swift-ide-test  0x0000000000b5bd5b swift::lookupVisibleDecls(swift::VisibleDeclConsumer&, swift::DeclContext const*, swift::LazyResolver*, bool, swift::SourceLoc) + 555
24 swift-ide-test  0x0000000000ae6734 swift::Decl::walk(swift::ASTWalker&) + 20
25 swift-ide-test  0x0000000000b6fbce swift::SourceFile::walk(swift::ASTWalker&) + 174
26 swift-ide-test  0x0000000000b6efaf swift::ModuleDecl::walk(swift::ASTWalker&) + 79
27 swift-ide-test  0x0000000000b49722 swift::DeclContext::walkContext(swift::ASTWalker&) + 146
28 swift-ide-test  0x000000000086599d swift::performDelayedParsing(swift::DeclContext*, swift::PersistentParserState&, swift::CodeCompletionCallbacksFactory*) + 61
29 swift-ide-test  0x0000000000774304 swift::CompilerInstance::performSema() + 3316
30 swift-ide-test  0x000000000071cc33 main + 35011
Stack dump:
0.	Program arguments: swift-ide-test -code-completion -code-completion-token=A -source-filename=<INPUT-FILE>
1.	While walking into decl getter for d at <INPUT-FILE>:2:6
```
2015-12-16 13:30:51 +01:00
practicalswift
7333343cb7 [SourceKit] Add test case for crash triggered in swift::TypeChecker::lookupUnqualified(swift::DeclContext*, swift::DeclName, swift::SourceLoc, swift::OptionSet<swift::NameLookupFlags, unsigned int>)
Stack trace:

```
found code completion token A at offset 161
swift-ide-test: /path/to/swift/lib/Sema/TypeCheckNameLookup.cpp:225: swift::LookupResult swift::TypeChecker::lookupUnqualified(swift::DeclContext *, swift::DeclName, swift::SourceLoc, NameLookupOptions): Assertion `foundInType && "bogus base declaration?"' failed.
8  swift-ide-test  0x000000000095c869 swift::TypeChecker::lookupUnqualified(swift::DeclContext*, swift::DeclName, swift::SourceLoc, swift::OptionSet<swift::NameLookupFlags, unsigned int>) + 633
9  swift-ide-test  0x0000000000917959 swift::TypeChecker::resolveDeclRefExpr(swift::UnresolvedDeclRefExpr*, swift::DeclContext*) + 121
11 swift-ide-test  0x0000000000ae6353 swift::Expr::walk(swift::ASTWalker&) + 19
12 swift-ide-test  0x0000000000918537 swift::TypeChecker::solveForExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::FreeTypeVariableBinding, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem&, llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>) + 119
13 swift-ide-test  0x000000000091efed swift::TypeChecker::getTypeOfExpressionWithoutApplying(swift::Expr*&, swift::DeclContext*, swift::FreeTypeVariableBinding, swift::ExprTypeCheckListener*) + 221
15 swift-ide-test  0x0000000000907c7e swift::getTypeOfCompletionContextExpr(swift::ASTContext&, swift::DeclContext*, swift::Expr*&) + 1150
17 swift-ide-test  0x0000000000865a46 swift::performDelayedParsing(swift::DeclContext*, swift::PersistentParserState&, swift::CodeCompletionCallbacksFactory*) + 230
18 swift-ide-test  0x0000000000774304 swift::CompilerInstance::performSema() + 3316
19 swift-ide-test  0x000000000071cc33 main + 35011
Stack dump:
0.	Program arguments: swift-ide-test -code-completion -code-completion-token=A -source-filename=<INPUT-FILE>
1.	While type-checking expression at [<INPUT-FILE>:2:56 - line:2:56] RangeText="B"
```
2015-12-16 13:30:02 +01:00
practicalswift
0ab09ccd54 [SourceKit] Add test case for crash triggered in swift::Parser::parseDeclVar(swift::OptionSet<swift::Parser::ParseDeclFlags, unsigned int>, swift::DeclAttributes&, llvm::SmallVectorImpl<swift::Decl*>&, swift::SourceLoc, swift::StaticSpellingKind, swift::SourceLoc)
Stack trace:

```
found code completion token A at offset 123
swift-ide-test: /path/to/swift/include/swift/Parse/ParserResult.h:73: T *swift::ParserResult<swift::Expr>::get() const [T = swift::Expr]: Assertion `getPtrOrNull() && "not checked for nullptr"' failed.
8  swift-ide-test  0x000000000087687b swift::Parser::parseDeclVar(swift::OptionSet<swift::Parser::ParseDeclFlags, unsigned int>, swift::DeclAttributes&, llvm::SmallVectorImpl<swift::Decl*>&, swift::SourceLoc, swift::StaticSpellingKind, swift::SourceLoc) + 4619
9  swift-ide-test  0x00000000008737c4 swift::Parser::parseDecl(llvm::SmallVectorImpl<swift::Decl*>&, swift::OptionSet<swift::Parser::ParseDeclFlags, unsigned int>) + 2836
11 swift-ide-test  0x00000000008680c8 swift::Parser::parseList(swift::tok, swift::SourceLoc, swift::SourceLoc&, swift::tok, bool, bool, swift::Diag<>, std::function<swift::ParserStatus ()>) + 728
12 swift-ide-test  0x000000000087a612 swift::Parser::parseDeclProtocol(swift::OptionSet<swift::Parser::ParseDeclFlags, unsigned int>, swift::DeclAttributes&) + 1602
13 swift-ide-test  0x0000000000873a77 swift::Parser::parseDecl(llvm::SmallVectorImpl<swift::Decl*>&, swift::OptionSet<swift::Parser::ParseDeclFlags, unsigned int>) + 3527
14 swift-ide-test  0x00000000008bebab swift::Parser::parseBraceItems(llvm::SmallVectorImpl<swift::ASTNode>&, swift::BraceItemListKind, swift::BraceItemListKind) + 2027
15 swift-ide-test  0x000000000086a30c swift::Parser::parseTopLevel() + 156
16 swift-ide-test  0x000000000086591b swift::parseIntoSourceFile(swift::SourceFile&, unsigned int, bool*, swift::SILParserState*, swift::PersistentParserState*, swift::DelayedParsingCallbacks*) + 107
17 swift-ide-test  0x0000000000774176 swift::CompilerInstance::performSema() + 2918
18 swift-ide-test  0x000000000071cc33 main + 35011
Stack dump:
0.	Program arguments: swift-ide-test -code-completion -code-completion-token=A -source-filename=<INPUT-FILE>
1.	With parser at source location: <INPUT-FILE>:2:20
```
2015-12-16 13:29:08 +01:00
Dmitri Gribenko
d864cfcf3d Merge pull request #556 from dduan/increment_decrement_search_replace
replace singular statement ++/-- with += 1/-= 1 for integer variables
2015-12-15 17:39:29 -08:00
Doug Gregor
2f5f94a12c Merge remote-tracking branch 'origin/swift-3-api-guidelines' into swift-3-omit-needless-words 2015-12-15 17:11:37 -08:00
Doug Gregor
1ba7b5d98d Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2015-12-15 16:01:48 -08:00
Doug Gregor
1e0ecd731a Merge pull request #570 from practicalswift/sourcekit-013-swift-constraints-constraintgraph-addconstraint
[SourceKit] Add test case for crash triggered in swift::constraints::ConstraintGraph::addConstraint(swift::constraints::Constraint*)
2015-12-15 13:48:36 -08:00
practicalswift
051d5d07b2 [SourceKit] Add test case for crash triggered in swift::constraints::ConstraintGraph::addConstraint(swift::constraints::Constraint*)
Stack trace:

```
found code completion token A at offset 111
swift-ide-test: /path/to/swift/lib/Sema/ConstraintGraph.cpp:50: std::pair<ConstraintGraphNode &, unsigned int> swift::constraints::ConstraintGraph::lookupNode(swift::TypeVariableType *): Assertion `impl.getGraphIndex() < TypeVariables.size() && "Out-of-bounds index"' failed.
9  swift-ide-test  0x00000000009a229f swift::constraints::ConstraintGraph::addConstraint(swift::constraints::Constraint*) + 111
10 swift-ide-test  0x00000000009ae272 swift::constraints::ConstraintSystem::addConstraint(swift::constraints::Constraint*, bool, bool) + 258
11 swift-ide-test  0x00000000008de261 swift::constraints::ConstraintSystem::matchTypes(swift::Type, swift::Type, swift::constraints::TypeMatchKind, unsigned int, swift::constraints::ConstraintLocatorBuilder) + 4641
12 swift-ide-test  0x00000000008dcbbd swift::constraints::ConstraintSystem::matchTupleTypes(swift::TupleType*, swift::TupleType*, swift::constraints::TypeMatchKind, unsigned int, swift::constraints::ConstraintLocatorBuilder) + 445
13 swift-ide-test  0x00000000008e1f0c swift::constraints::ConstraintSystem::simplifyRestrictedConstraint(swift::constraints::ConversionRestrictionKind, swift::Type, swift::Type, swift::constraints::TypeMatchKind, unsigned int, swift::constraints::ConstraintLocatorBuilder) + 620
14 swift-ide-test  0x00000000008df773 swift::constraints::ConstraintSystem::matchTypes(swift::Type, swift::Type, swift::constraints::TypeMatchKind, unsigned int, swift::constraints::ConstraintLocatorBuilder) + 10035
15 swift-ide-test  0x00000000008e11e0 swift::constraints::ConstraintSystem::matchFunctionTypes(swift::FunctionType*, swift::FunctionType*, swift::constraints::TypeMatchKind, unsigned int, swift::constraints::ConstraintLocatorBuilder) + 400
16 swift-ide-test  0x00000000008e062b swift::constraints::ConstraintSystem::matchTypes(swift::Type, swift::Type, swift::constraints::TypeMatchKind, unsigned int, swift::constraints::ConstraintLocatorBuilder) + 13803
17 swift-ide-test  0x00000000008dd909 swift::constraints::ConstraintSystem::matchTypes(swift::Type, swift::Type, swift::constraints::TypeMatchKind, unsigned int, swift::constraints::ConstraintLocatorBuilder) + 2249
18 swift-ide-test  0x00000000008e910f swift::constraints::ConstraintSystem::simplifyConstraint(swift::constraints::Constraint const&) + 639
19 swift-ide-test  0x00000000009ae187 swift::constraints::ConstraintSystem::addConstraint(swift::constraints::Constraint*, bool, bool) + 23
20 swift-ide-test  0x00000000009bdbb5 swift::TypeChecker::callWitness(swift::Expr*, swift::DeclContext*, swift::ProtocolDecl*, swift::ProtocolConformance*, swift::DeclName, llvm::MutableArrayRef<swift::Expr*>, swift::Diag<>) + 1797
24 swift-ide-test  0x0000000000ae636e swift::Expr::walk(swift::ASTWalker&) + 46
25 swift-ide-test  0x00000000009b9af6 swift::constraints::ConstraintSystem::applySolution(swift::constraints::Solution&, swift::Expr*, swift::Type, bool, bool, bool) + 502
26 swift-ide-test  0x000000000091ebdb swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 683
28 swift-ide-test  0x00000000009d52b9 swift::constraints::ConstraintSystem::diagnoseFailureForExpr(swift::Expr*) + 4009
29 swift-ide-test  0x00000000009d87ee swift::constraints::ConstraintSystem::salvage(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::Expr*) + 4046
30 swift-ide-test  0x0000000000918755 swift::TypeChecker::solveForExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::FreeTypeVariableBinding, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem&, llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>) + 661
31 swift-ide-test  0x000000000091eb69 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 569
33 swift-ide-test  0x0000000000981de6 swift::TypeChecker::typeCheckTopLevelCodeDecl(swift::TopLevelCodeDecl*) + 134
34 swift-ide-test  0x0000000000905e6d swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1405
35 swift-ide-test  0x0000000000774192 swift::CompilerInstance::performSema() + 2946
36 swift-ide-test  0x000000000071cc33 main + 35011
Stack dump:
0.	Program arguments: swift-ide-test -code-completion -code-completion-token=A -source-filename=<INPUT-FILE>
1.	While type-checking expression at [<INPUT-FILE>:2:1 - line:2:7] RangeText="[[map)"
2.	While type-checking expression at [<INPUT-FILE>:2:1 - line:2:7] RangeText="[[map)"
```
2015-12-15 22:42:47 +01:00
Erik Eckstein
6e763b7c4f [tests] add import statements (for fixing linker errors) also in the slice generator script.
And re-generated all files.
2015-12-15 13:21:15 -08:00
practicalswift
a09576a1c5 [SourceKit] Add test case for crash triggered in llvm::llvm_unreachable_internal(char const*, char const*, unsigned int)
Stack trace:

```
found code completion token A at offset 126
pattern-binding bound no variables?
UNREACHABLE executed at /path/to/swift/lib/AST/Mangle.cpp:189!
6  swift-ide-test  0x0000000002b6105d llvm::llvm_unreachable_internal(char const*, char const*, unsigned int) + 461
7  swift-ide-test  0x0000000000b60b96 swift::Mangle::Mangler::mangleContext(swift::DeclContext const*, swift::Mangle::Mangler::BindGenerics) + 1062
8  swift-ide-test  0x0000000000b65b4e swift::Mangle::Mangler::mangleClosureComponents(swift::Type, unsigned int, bool, swift::DeclContext const*, swift::DeclContext const*) + 94
9  swift-ide-test  0x0000000000b61741 swift::Mangle::Mangler::mangleEntity(swift::ValueDecl const*, swift::ResilienceExpansion, unsigned int) + 417
10 swift-ide-test  0x0000000000b9fe7f swift::ide::printDeclUSR(swift::ValueDecl const*, llvm::raw_ostream&) + 815
12 swift-ide-test  0x000000000077bd88 copyAssociatedUSRs(llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>&, swift::Decl const*) + 104
13 swift-ide-test  0x000000000077c508 swift::ide::CodeCompletionResultBuilder::takeResult() + 1624
17 swift-ide-test  0x0000000000b5bc46 swift::lookupVisibleDecls(swift::VisibleDeclConsumer&, swift::DeclContext const*, swift::LazyResolver*, bool, swift::SourceLoc) + 278
20 swift-ide-test  0x0000000000865a46 swift::performDelayedParsing(swift::DeclContext*, swift::PersistentParserState&, swift::CodeCompletionCallbacksFactory*) + 230
21 swift-ide-test  0x0000000000774304 swift::CompilerInstance::performSema() + 3316
22 swift-ide-test  0x000000000071cc33 main + 35011
Stack dump:
0.	Program arguments: swift-ide-test -code-completion -code-completion-token=A -source-filename=<INPUT-FILE>
```
2015-12-15 22:12:39 +01:00
Max Moiseev
2021dd5a4d Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2015-12-15 12:49:22 -08:00
practicalswift
a14f42a6aa [SourceKit] Add test case for crash triggered in swift::lookupVisibleDecls(swift::VisibleDeclConsumer&, swift::DeclContext const*, swift::LazyResolver*, bool, swift::SourceLoc)
Stack trace:

```
found code completion token A at offset 140
swift-ide-test: /path/to/swift/include/swift/AST/Decl.h:2210: swift::Accessibility swift::ValueDecl::getFormalAccess() const: Assertion `hasAccessibility() && "accessibility not computed yet"' failed.
12 swift-ide-test  0x0000000000b5bf8d swift::lookupVisibleDecls(swift::VisibleDeclConsumer&, swift::DeclContext const*, swift::LazyResolver*, bool, swift::SourceLoc) + 1117
14 swift-ide-test  0x0000000000865a46 swift::performDelayedParsing(swift::DeclContext*, swift::PersistentParserState&, swift::CodeCompletionCallbacksFactory*) + 230
15 swift-ide-test  0x0000000000774304 swift::CompilerInstance::performSema() + 3316
16 swift-ide-test  0x000000000071cc33 main + 35011
Stack dump:
0.	Program arguments: swift-ide-test -code-completion -code-completion-token=A -source-filename=<INPUT-FILE>
```
2015-12-15 20:58:16 +01:00
Erik Eckstein
0830c36974 [tests] add import statements to prevent unresolved symbols when compiling StdlibUnittest with -sil-serialize-all.
This is the second part of 308f39fe56.
It fixes (better: works-around) linker errors when testing in optimized mode.
2015-12-15 10:46:10 -08:00
Ben Langmuir
f925f71210 Merge pull request #560 from practicalswift/sourcekit-010-swift-archetypebuilder-addrequirement
[SourceKit] Add test case for crash triggered in swift::ArchetypeBuilder::addRequirement(swift::Requirement const&, swift::RequirementSource)
2015-12-15 09:21:02 -08:00
Daniel Duan
ebb0c3a204 replaced single-line ++/-- with +=/-= 2015-12-15 09:05:37 -08:00
practicalswift
b382dcd97e [SourceKit] Add test case for crash triggered in swift::ArchetypeBuilder::addRequirement(swift::Requirement const&, swift::RequirementSource)
Stack trace:

```
found code completion token A at offset 105
swift-ide-test: /path/to/swift/lib/AST/ArchetypeBuilder.cpp:1235: void swift::ArchetypeBuilder::addRequirement(const swift::Requirement &, swift::RequirementSource): Assertion `!invalid && "Re-introducing invalid requirement"' failed.
8  swift-ide-test  0x0000000000a9ad94 swift::ArchetypeBuilder::addRequirement(swift::Requirement const&, swift::RequirementSource) + 532
9  swift-ide-test  0x0000000000a9c563 swift::ArchetypeBuilder::addGenericSignature(swift::GenericSignature*, bool, bool) + 531
10 swift-ide-test  0x00000000009575ab swift::TypeChecker::checkGenericParamList(swift::ArchetypeBuilder*, swift::GenericParamList*, swift::DeclContext*, bool, swift::GenericTypeResolver*) + 91
12 swift-ide-test  0x0000000000957afc swift::TypeChecker::validateGenericFuncSignature(swift::AbstractFunctionDecl*) + 124
17 swift-ide-test  0x0000000000938707 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 151
18 swift-ide-test  0x0000000000905e02 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1298
19 swift-ide-test  0x0000000000774192 swift::CompilerInstance::performSema() + 2946
20 swift-ide-test  0x000000000071cc33 main + 35011
Stack dump:
0.	Program arguments: swift-ide-test -code-completion -code-completion-token=A -source-filename=<INPUT-FILE>
1.	While type-checking 'c' at <INPUT-FILE>:3:1
```
2015-12-15 16:38:59 +01:00
Ben Langmuir
3b9b013c23 Merge pull request #538 from practicalswift/sourcekit-006-swift-declcontext-getprotocolself
[SourceKit] Add test case for crash triggered in swift::DeclContext::…
2015-12-15 07:34:18 -08:00
practicalswift
14372cd660 Add 16694-swift-constraints-constraintsystem-opentype.swift as a regression (possible memory corruption).
History:
* Marked as fixed in the swift-compiler-crashes project in February 2015 - does not crash Xcode 6.3 beta with Swift 1.2 (6D520o).
* Re-opened as regression in December 2015 - crashes Swift version 2.2-dev (LLVM 7bae82deaa, Clang 53d04af5ce, Swift 56a62b7eef).

Possible memory corruption:

dmesg:
swift[10043]: segfault at 8 ip 000000000100e5f0 sp 00007ffca9045200 error 4 in swift[400000+3d82000]

valgrind:
==18826== Process terminating with default action of signal 11 (SIGSEGV)
==18826==  Access not within mapped region at address 0x8
==18826==    at 0x100E5F0: swift::TypeBase::getDesugaredType() (in /path/to/swift/bin/swift)
2015-12-15 09:56:12 +01:00
practicalswift
ff246b7f0c [SourceKit] Add test case for crash triggered in swift::performDelayedParsing(swift::DeclContext*, swift::PersistentParserState&, swift::CodeCompletionCallbacksFactory*)
Stack trace:

```
found code completion token A at offset 127
swift-ide-test: /path/to/llvm/include/llvm/Support/Casting.h:237: typename cast_retty<X, Y *>::ret_type llvm::cast(Y *) [X = swift::ExtensionDecl, Y = const swift::DeclContext]: Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed.
12 swift-ide-test  0x0000000000865a46 swift::performDelayedParsing(swift::DeclContext*, swift::PersistentParserState&, swift::CodeCompletionCallbacksFactory*) + 230
13 swift-ide-test  0x0000000000774304 swift::CompilerInstance::performSema() + 3316
14 swift-ide-test  0x000000000071cc33 main + 35011
Stack dump:
0.	Program arguments: swift-ide-test -code-completion -code-completion-token=A -source-filename=<INPUT-FILE>
```
2015-12-15 08:50:49 +01:00
practicalswift
f1eec81b26 [SourceKit] Add test case for crash triggered in swift::TypeChecker::typeCheckFunctionBodyUntil(swift::FuncDecl*, swift::SourceLoc)
Stack trace:

```
found code completion token A at offset 114
swift-ide-test: /path/to/swift/lib/Sema/TypeCheckStmt.cpp:1235: bool swift::TypeChecker::typeCheckFunctionBodyUntil(swift::FuncDecl *, swift::SourceLoc): Assertion `BS && "Should have a body"' failed.
8  swift-ide-test  0x000000000097f61d swift::TypeChecker::typeCheckFunctionBodyUntil(swift::FuncDecl*, swift::SourceLoc) + 541
9  swift-ide-test  0x000000000097f3be swift::TypeChecker::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) + 46
10 swift-ide-test  0x0000000000907878 swift::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) + 1128
12 swift-ide-test  0x00000000008646e6 swift::performDelayedParsing(swift::DeclContext*, swift::PersistentParserState&, swift::CodeCompletionCallbacksFactory*) + 230
13 swift-ide-test  0x00000000007741e4 swift::CompilerInstance::performSema() + 3316
14 swift-ide-test  0x000000000071cb33 main + 35011
Stack dump:
0.	Program arguments: swift-ide-test -code-completion -code-completion-token=A -source-filename=<INPUT-FILE>
```
2015-12-15 07:35:59 +01:00
Chris Lattner
e03bd3ec2b Merge pull request #542 from practicalswift/sourcekit-007-swift-configureimplicitself
[SourceKit] Add test case for crash triggered in swift::configureImpl…
2015-12-14 20:05:43 -08:00
practicalswift
785b53b449 [SourceKit] Add test case for crash triggered in swift::configureImplicitSelf(swift::TypeChecker&, swift::AbstractFunctionDecl*, swift::GenericParamList*&)
Stack trace:

```
found code completion token A at offset 129
swift-ide-test: /path/to/swift/lib/AST/Decl.cpp:3439: swift::Type getSelfTypeForContainer(swift::AbstractFunctionDecl *, bool, bool, swift::GenericParamList **): Assertion `containerTy && "stand alone functions don't have 'self'"' failed.
9  swift-ide-test  0x0000000000931a10 swift::configureImplicitSelf(swift::TypeChecker&, swift::AbstractFunctionDecl*, swift::GenericParamList*&) + 176
12 swift-ide-test  0x0000000000937447 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 151
13 swift-ide-test  0x0000000000906072 swift::typeCheckCompletionDecl(swift::Decl*) + 1122
15 swift-ide-test  0x00000000008647a6 swift::performDelayedParsing(swift::DeclContext*, swift::PersistentParserState&, swift::CodeCompletionCallbacksFactory*) + 230
16 swift-ide-test  0x00000000007742a4 swift::CompilerInstance::performSema() + 3316
17 swift-ide-test  0x000000000071cbd3 main + 35027
Stack dump:
0.	Program arguments: swift-ide-test -code-completion -code-completion-token=A -source-filename=<INPUT-FILE>
1.	While type-checking 'a' at <INPUT-FILE>:2:18
```
2015-12-14 23:50:54 +01:00
Slava Pestov
57dfb45ba6 Sema: Add DeclContext::isGenericTypeContext()
Once nested generic parameter lists are properly chained, we need a
way of checking if we're inside a generic type context that's
distinct from just checking if we have a generic type signature
available.

This distinguishes between these two cases:

class A<T> {
  // generic signature
  func method() -> T { // <T> A<T> -> () -> T
  }
}

func f<T>() {
  class A {
    // no generic signature
    func method() -> T { // A -> () -> T
    }
  }
}
2015-12-14 13:46:45 -08:00
Slava Pestov
c258f991f6 Sema: Nuke NominalTypeDecl::markInvalidGenericSignature()
This would just set the NominalTypeDecl's declared type to
ErrorType, which caused problems elsewhere.

Instead, generalize the logic used for AbstractFunctionDecl.
This correctly wires up the GenericTypeParamDecl's archetypes even
if the signature didn't validate, fixing crashes if the generic
parameters of the type are referenced.
2015-12-14 13:29:55 -08:00
Slava Pestov
d56cbfaaf9 Sema: Check generic parameter inheritance clause after creating archetype
This fixes a crash with invalid code where the inheritance clause
refers back to itself, eg struct E<F : F.A> {}.
2015-12-14 13:29:52 -08:00
Max Moiseev
806be29941 Merge remote-tracking branch 'origin' into swift-3-api-guidelines 2015-12-14 12:05:35 -08:00