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
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
Dmitri Gribenko
212cb4a65c
Merge pull request #533 from practicalswift/remaining-typos-replaces-batch-12-and-17
...
Fix typos (12 of 30, 16 of 30)
2015-12-14 08:43:27 -08: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
c6e8459187
Fix typos.
2015-12-14 11:13:30 +01:00
Chris Willmore
7f08c9d785
Merge pull request #476 from jtbandes/enum-crash
...
Add missing setIsParseError() during enum case parsing
2015-12-13 13:45:16 -08:00
Jacob Bandes-Storch
1b142ed054
Add missing setIsParseError() during enum case parsing
...
An invalid `case` construct would incorrectly return a successful status, causing `parseDecl` to crash later when it assumed there were valid decls in the `Entries` vector.
2015-12-13 13:11:22 -08: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
Dmitri Gribenko
3d7ed4a2ba
Merge pull request #475 from practicalswift/sourcekit-002-swift-diagnosticengine-emitdiagnostic
...
[SourceKit] Add test case for crash triggered in swift::DiagnosticEngine::emitDiagnostic(swift:…
2015-12-13 01:49:20 -08: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
Arsen Gasparyan
52890e5c30
Replace if true {} with do {}
2015-12-13 10:54:54 +03:00
Arsen Gasparyan
3961b71e4e
Use real arc4random_uniform() instead of just random() % max
2015-12-13 10:17:35 +03:00
Chris Lattner
d12b5d0666
Merge pull request #421 from practicalswift/less-exotic-swift-frontend-arguments
...
Compiler crashers: Use canonical "-emit-silgen" to trigger crash case.
2015-12-12 15:11:25 -08: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
Max Moiseev
a1c05e6c95
fixing post-merge failures
2015-12-11 15:55:02 -08:00
Max Moiseev
786e1ea2b1
Merge remote-tracking branch 'origin' into swift-3-api-guidelines
2015-12-11 15:19:02 -08:00
Doug Gregor
06c5e9cd5b
Enable "omit needless words" by default.
...
Most of this is in updating the standard library, SDK overlays, and
piles of test cases to use the new names. No surprises here, although
this shows us some potential heuristic tweaks.
There is one substantive compiler change that needs to be factored out
involving synthesizing calls to copyWithZone()/copy(zone:). Aside from
that, there are four failing tests:
Swift :: ClangModules/objc_parse.swift
Swift :: Interpreter/SDK/Foundation_test.swift
Swift :: Interpreter/SDK/archiving_generic_swift_class.swift
Swift :: Interpreter/SDK/objc_currying.swift
due to two independent remaining compiler bugs:
* We're not getting partial ordering between NSCoder's
encode(AnyObject, forKey: String) and NSKeyedArchiver's version of
that method, and
* Dynamic lookup (into AnyObject) doesn't know how to find the new
names. We need the Swift name lookup tables enabled to address this.
2015-12-11 14:46:50 -08:00
Dmitri Gribenko
06d6dab133
Merge pull request #438 from practicalswift/sync-with-swift-compiler-crashes-20151211
...
Sync with https://github.com/practicalswift/swift-compiler-crashes
2015-12-11 14:42:05 -08:00
Doug Gregor
851f2eaf60
Merge pull request #272 from jtbandes/fix3
...
[AST] Improve ErrorType handling in TypeBase::getMemberSubstitutions()
2015-12-11 13:55:59 -08:00
Doug Gregor
53b1503a78
Merge pull request #253 from jtbandes/master
...
Fix crash in `DependentGenericTypeResolver::resolveDependentMemberType`
2015-12-11 13:53:01 -08:00
practicalswift
b55d606412
Update with last commit of synced repo.
2015-12-11 21:47:34 +01:00
practicalswift
fe2bc2421e
Sync with https://github.com/practicalswift/swift-compiler-crashes
...
Add 5 compiler crashes (+ 1 fixed crash).
2015-12-11 21:35:06 +01:00
Slava Pestov
f6e4355b69
Sema: Fix monthly TypeNullifier bug
...
This time, the issue is that TypeNullifier skips bodies of
multi-statement closures. However, ExprRewriter will type
happily pass them on to typeCheckClosureBody(). This could
trigger assertions. Fix this by skipping type checking of
multi-statement closures when diagnosing.
There seems to be a minor QoI regression in some test cases
that already looked pretty dodgy and/or had FIXMEs. However
I think its worth fixing a crash.
2015-12-11 08:58:52 -08:00
practicalswift
0ae877ac2c
Use canonical "-emit-silgen" to trigger crash case.
2015-12-11 10:51:46 +01:00
Maxim Moiseev
b702b1a903
more number type renames
2015-12-10 17:08:41 -08:00
Maxim Moiseev
1b6244f3ee
integer types renamed
2015-12-10 17:03:40 -08:00
Max Moiseev
7c4a693c3c
fixing OptionSetType related tests
2015-12-10 16:59:18 -08:00
Maxim Moiseev
0e0191380a
OptionSetType => OptionSet
2015-12-10 14:58:24 -08:00
Maxim Moiseev
2c95bb6d51
BooleanType => Boolean
2015-12-10 14:56:32 -08:00
Jacob Bandes-Storch
61dea21228
Fix crash in DependentGenericTypeResolver::resolveDependentMemberType
...
An erroneous `baseTy` would cause resolveArchetype to return nullptr, resulting in a null dereference.
2015-12-10 14:52:53 -08:00
Dmitri Gribenko
78930e7fac
Remove MutableSliceable
2015-12-10 14:50:12 -08:00
Dmitri Gribenko
21f081fc1a
Merge pull request #405 from practicalswift/normalize-run-directives
...
Compiler crashers: Normalize format of "RUN:" directives.
2015-12-10 14:36:19 -08:00