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
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
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
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
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
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
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
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
practicalswift
c2415448aa
[SourceKit] Add test case for crash triggered in swift::DeclContext::getProtocolSelf() const
...
Stack trace:
```
found code completion token A at offset 159
4 swift-ide-test 0x0000000000b462ee swift::DeclContext::getProtocolSelf() const + 30
6 swift-ide-test 0x00000000009305a0 swift::configureImplicitSelf(swift::TypeChecker&, swift::AbstractFunctionDecl*, swift::GenericParamList*&) + 176
9 swift-ide-test 0x0000000000930acd swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 797
14 swift-ide-test 0x0000000000b59c4d swift::lookupVisibleDecls(swift::VisibleDeclConsumer&, swift::DeclContext const*, swift::LazyResolver*, bool, swift::SourceLoc) + 1117
24 swift-ide-test 0x0000000000ae4334 swift::Decl::walk(swift::ASTWalker&) + 20
25 swift-ide-test 0x0000000000b6d88e swift::SourceFile::walk(swift::ASTWalker&) + 174
26 swift-ide-test 0x0000000000b6cc6f swift::ModuleDecl::walk(swift::ASTWalker&) + 79
27 swift-ide-test 0x0000000000b473a2 swift::DeclContext::walkContext(swift::ASTWalker&) + 146
28 swift-ide-test 0x0000000000863b2d swift::performDelayedParsing(swift::DeclContext*, swift::PersistentParserState&, swift::CodeCompletionCallbacksFactory*) + 61
29 swift-ide-test 0x0000000000773cd4 swift::CompilerInstance::performSema() + 3316
30 swift-ide-test 0x000000000071c633 main + 35027
Stack dump:
0. Program arguments: swift-ide-test -code-completion -code-completion-token=A -source-filename=<INPUT-FILE>
1. While walking into decl declaration 0x4253e40 at <INPUT-FILE>:2:1
2. While type-checking 'p' at <INPUT-FILE>:2:22
```
2015-12-14 18:07:59 +01:00
practicalswift
ca47cc6287
[SourceKit] Add test case for crash triggered in swift::TypeChecker::getTypeOfExpressionWithoutApplying(swift::Expr*&, swift::DeclContext*, swift::FreeTypeVariableBinding, swift::ExprTypeCheckListener*)
...
Stack trace:
```
found code completion token A at offset 109
swift-ide-test: /path/to/swift/lib/Sema/TypeCheckConstraints.cpp:1247: Optional<swift::Type> swift::TypeChecker::getTypeOfExpressionWithoutApplying(swift::Expr *&, swift::DeclContext *, swift::FreeTypeVariableBinding, swift::ExprTypeCheckListener *): Assertion `exprType && !exprType->is<ErrorType>() && "erroneous solution?"' failed.
8 swift-ide-test 0x000000000091ca15 swift::TypeChecker::getTypeOfExpressionWithoutApplying(swift::Expr*&, swift::DeclContext*, swift::FreeTypeVariableBinding, swift::ExprTypeCheckListener*) + 517
10 swift-ide-test 0x000000000090557e swift::getTypeOfCompletionContextExpr(swift::ASTContext&, swift::DeclContext*, swift::Expr*&) + 1150
12 swift-ide-test 0x0000000000863bd6 swift::performDelayedParsing(swift::DeclContext*, swift::PersistentParserState&, swift::CodeCompletionCallbacksFactory*) + 230
13 swift-ide-test 0x0000000000773cd4 swift::CompilerInstance::performSema() + 3316
14 swift-ide-test 0x000000000071c633 main + 35027
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:3 - line:2:3] RangeText="0"
```
2015-12-14 16:40:55 +01:00
practicalswift
5112308aa6
[SourceKit] Add test case for crash triggered in swift::TypeBase::getCanonicalType()
...
Stack trace:
```
found code completion token A at offset 137
4 swift-ide-test 0x0000000000b8adc4 swift::TypeBase::getCanonicalType() + 20
6 swift-ide-test 0x0000000000936237 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 151
7 swift-ide-test 0x0000000000904e72 swift::typeCheckCompletionDecl(swift::Decl*) + 1122
18 swift-ide-test 0x0000000000ae4594 swift::Decl::walk(swift::ASTWalker&) + 20
19 swift-ide-test 0x0000000000b6db1e swift::SourceFile::walk(swift::ASTWalker&) + 174
20 swift-ide-test 0x0000000000b6ceff swift::ModuleDecl::walk(swift::ASTWalker&) + 79
21 swift-ide-test 0x0000000000b47602 swift::DeclContext::walkContext(swift::ASTWalker&) + 146
22 swift-ide-test 0x0000000000863d8d swift::performDelayedParsing(swift::DeclContext*, swift::PersistentParserState&, swift::CodeCompletionCallbacksFactory*) + 61
23 swift-ide-test 0x0000000000773d54 swift::CompilerInstance::performSema() + 3316
24 swift-ide-test 0x000000000071c7c3 main + 35027
Stack dump:
0. Program arguments: swift-ide-test -code-completion -code-completion-token=A -source-filename=<INPUT-FILE>
1. While walking into decl declaration 0x<INPUT-FILE>:2:1
2. While type-checking 'C' at <INPUT-FILE>:2:20
```
2015-12-13 12:54:16 +01:00
practicalswift
02c025042c
Add SourceKit crash in swift::DiagnosticEngine::emitDiagnostic(swift::Diagnostic const&)
...
found code completion token A at offset 139
swift-ide-test: /path/to/llvm/include/llvm/Support/Casting.h:95: static bool llvm::isa_impl_cl<swift::ParenType, const swift::TypeBase *>::doit(const From *) [To = swift::ParenType, From = const swift::TypeBase *]: Assertion `Val && "isa<> used on a null pointer"' failed.
10 swift-ide-test 0x0000000000b4aecf swift::DiagnosticEngine::emitDiagnostic(swift::Diagnostic const&) + 3039
11 swift-ide-test 0x0000000000b4a19f swift::DiagnosticEngine::flushActiveDiagnostic() + 319
15 swift-ide-test 0x0000000000936237 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 151
16 swift-ide-test 0x0000000000904e72 swift::typeCheckCompletionDecl(swift::Decl*) + 1122
21 swift-ide-test 0x0000000000ae4594 swift::Decl::walk(swift::ASTWalker&) + 20
22 swift-ide-test 0x0000000000b6db1e swift::SourceFile::walk(swift::ASTWalker&) + 174
23 swift-ide-test 0x0000000000b6ceff swift::ModuleDecl::walk(swift::ASTWalker&) + 79
24 swift-ide-test 0x0000000000b47602 swift::DeclContext::walkContext(swift::ASTWalker&) + 146
25 swift-ide-test 0x0000000000863d8d swift::performDelayedParsing(swift::DeclContext*, swift::PersistentParserState&, swift::CodeCompletionCallbacksFactory*) + 61
26 swift-ide-test 0x0000000000773d54 swift::CompilerInstance::performSema() + 3316
27 swift-ide-test 0x000000000071c7c3 main + 35027
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
2. While type-checking 'a' at <INPUT-FILE>:2:27
2015-12-13 09:54:38 +01:00
practicalswift
4585bce530
Add SourceKit crash.
...
Thanks to @ddunbar who suggested swift-ide-test as a fuzzing target:
https://twitter.com/daniel_dunbar/status/675712444228997120
2015-12-12 22:53:35 +01:00
Ben Langmuir
50cc79c7f2
Fix crash code-completing after 1 + [0]
...
A literal in a sub-expression of the right-most expression in a sequence
could accidentally still have an error-type when going through CSApply.
rdar://problem/23488528
2015-11-16 11:35:13 -08:00
Ben Langmuir
7649d3202d
[CodeCompletion] Add test for a fixed crasher assigning to AnyObject
...
rdar://problem/23379556
2015-11-12 13:09:44 -08:00
Ben Langmuir
d119d6e3b0
[CodeCompletion] Update validation-test/IDE after keyword changes
2015-11-02 14:35:09 -08:00
Ben Langmuir
465c2db70e
[CodeCompletion] Add a test for some previously crashing extensions
...
This got incidentally fixed recently, but wasn't yet tested.
rdar://problem/21825270
Swift SVN r32792
2015-10-21 17:58:25 +00:00
Ben Langmuir
c7da7457e6
Update validation/IDE tests missed in previous commit
...
Swift SVN r26263
2015-03-18 17:26:11 +00:00
Denis Vnukov
152df92966
[CodeCompletion] Code Completion String getName should always return non-empty string value for
...
valid code completions. Code completion tests call and validate getName’s result.
A minor fix for code completion fro subscripts.
Swift SVN r25101
2015-02-09 22:32:05 +00:00
Dmitri Hrybenko
400bd74ae7
validation-test: use %target substitutions more
...
Swift SVN r25024
2015-02-06 01:10:56 +00:00
Graham Batty
83b4384fac
Update test flags for linux failures and support.
...
Also removed the sdk 'feature' in favour of the more specific
objc_interop.
Swift SVN r24856
2015-01-30 21:31:48 +00:00
Dmitri Hrybenko
1eea220932
Use one module cache directory for all the lit tests to speed them up
...
Doing so is safe even though we have mock SDK. The include paths for
modules with the same name in the real and mock SDKs are different, and
the module files will be distinct (because they will have a different
hash).
This reduces test runtime on OS X by 30% and brings it under a minute on
a 16-core machine.
This also uncovered some problems with some tests -- even when run for
iOS configurations, some tests would still run with macosx triple. I
fixed the tests where I noticed this issue.
rdar://problem/19125022
Swift SVN r23683
2014-12-04 11:21:48 +00:00
Dmitri Hrybenko
1347b446c9
Stop using the MODULES_SDK variable in -D flags for the C++ compiler
...
Swift SVN r23097
2014-11-04 05:44:12 +00:00
Dmitri Hrybenko
fc8af07472
Remove long_tests requirements in the validation testsuite
...
Swift SVN r21278
2014-08-19 11:05:27 +00:00
Dmitri Hrybenko
a74a29ece3
Move long-running code completion tests to the validation testsuite
...
Swift SVN r21277
2014-08-19 11:04:35 +00:00