Dmitri Gribenko
6a87399a2f
Merge pull request #1210 from glessard/string-validation-test-predicates
...
[test] more accurate skip conditions in String validation tests
2016-02-05 16:07:43 -08:00
Slava Pestov
44951f0bd3
These two Evolution tests are failing with optimizations enabled
...
I'll investigate shortly.
2016-02-05 12:50:05 -08:00
practicalswift
824c8068e6
[swiftc] Add test case for crash triggered in swift::TypeChecker::validateGenericFuncSignature(swift::AbstractFunctionDecl*)
...
Stack trace:
```
swift: /path/to/swift/include/swift/AST/Decl.h:4461: void swift::AbstractFunctionDecl::setGenericSignature(swift::GenericSignature *): Assertion `!this->GenericSig && "already have signature?"' failed.
8 swift 0x0000000000e3f6ca swift::TypeChecker::validateGenericFuncSignature(swift::AbstractFunctionDecl*) + 3658
13 swift 0x0000000000e1ffc6 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150
14 swift 0x0000000000debd82 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1490
15 swift 0x0000000000c93bcf swift::CompilerInstance::performSema() + 2975
17 swift 0x0000000000777121 frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2481
18 swift 0x0000000000771d05 main + 2773
Stack dump:
0. Program arguments: /path/to/build/Ninja-ReleaseAssert/swift-linux-x86_64/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28249-swift-typechecker-validategenericfuncsignature.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28249-swift-typechecker-validategenericfuncsignature-baa5eb.o
1. While type-checking 'S' at validation-test/compiler_crashers/28249-swift-typechecker-validategenericfuncsignature.swift:8:1
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
2016-02-05 20:43:53 +01:00
Guillaume Lessard
99b703e8a4
Improve xfail and skip with better test predicates
2016-02-05 10:21:44 -07:00
practicalswift
e71ec0b278
[swiftc] Add test case for crash triggered in swift::DynamicSelfType::get(swift::Type, swift::ASTContext const&)
...
Stack trace:
```
4 swift 0x0000000000f39519 swift::DynamicSelfType::get(swift::Type, swift::ASTContext const&) + 25
6 swift 0x0000000000e1a530 swift::configureImplicitSelf(swift::TypeChecker&, swift::AbstractFunctionDecl*) + 160
11 swift 0x0000000000e1bd70 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 5920
12 swift 0x0000000001021a2c swift::DeclContext::lookupQualified(swift::Type, swift::DeclName, unsigned int, swift::LazyResolver*, llvm::SmallVectorImpl<swift::ValueDecl*>&) const + 2892
13 swift 0x00000000010203e0 swift::UnqualifiedLookup::UnqualifiedLookup(swift::DeclName, swift::DeclContext*, swift::LazyResolver*, bool, swift::SourceLoc, bool, bool) + 2384
14 swift 0x0000000000e4211b swift::TypeChecker::lookupUnqualified(swift::DeclContext*, swift::DeclName, swift::SourceLoc, swift::OptionSet<swift::NameLookupFlags, unsigned int>) + 187
17 swift 0x0000000000e6ba9e swift::TypeChecker::resolveIdentifierType(swift::DeclContext*, swift::IdentTypeRepr*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, bool, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 158
19 swift 0x0000000000e6ca14 swift::TypeChecker::resolveType(swift::TypeRepr*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 164
20 swift 0x0000000000e6b9aa swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 42
21 swift 0x0000000000f006e2 swift::IterativeTypeChecker::processResolveInheritedClauseEntry(std::pair<llvm::PointerUnion<swift::TypeDecl*, swift::ExtensionDecl*>, unsigned int>, llvm::function_ref<bool (swift::TypeCheckRequest)>) + 146
22 swift 0x0000000000eff96d swift::IterativeTypeChecker::satisfy(swift::TypeCheckRequest) + 493
23 swift 0x0000000000e173d9 swift::TypeChecker::resolveInheritanceClause(llvm::PointerUnion<swift::TypeDecl*, swift::ExtensionDecl*>) + 137
24 swift 0x0000000000e1aa95 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 1093
28 swift 0x0000000000e6ba9e swift::TypeChecker::resolveIdentifierType(swift::DeclContext*, swift::IdentTypeRepr*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, bool, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 158
30 swift 0x0000000000e6ca14 swift::TypeChecker::resolveType(swift::TypeRepr*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 164
31 swift 0x0000000000e6b9aa swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 42
34 swift 0x0000000000e1ffc6 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150
38 swift 0x0000000000e67246 swift::TypeChecker::typeCheckTopLevelCodeDecl(swift::TopLevelCodeDecl*) + 134
39 swift 0x0000000000debded swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1597
40 swift 0x0000000000c93bcf swift::CompilerInstance::performSema() + 2975
42 swift 0x0000000000777121 frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2481
43 swift 0x0000000000771d05 main + 2773
Stack dump:
0. Program arguments: /path/to/build/Ninja-ReleaseAssert/swift-linux-x86_64/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28248-swift-dynamicselftype-get.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28248-swift-dynamicselftype-get-e744d3.o
1. While type-checking 'b' at validation-test/compiler_crashers/28248-swift-dynamicselftype-get.swift:7:4
2. While resolving type a at [validation-test/compiler_crashers/28248-swift-dynamicselftype-get.swift:7:11 - line:7:11] RangeText="a"
3. While resolving type d at [validation-test/compiler_crashers/28248-swift-dynamicselftype-get.swift:7:38 - line:7:38] RangeText="d"
4. While type-checking 'a' at validation-test/compiler_crashers/28248-swift-dynamicselftype-get.swift:7:13
<unknown>:0: error: unable to execute command: Segmentation fault
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
2016-02-05 17:16:11 +01:00
Dmitri Gribenko
0646b00498
Mark Evolution tests as executable
2016-02-04 17:17:41 -08:00
Max Moiseev
61c837209b
Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines
2016-02-04 16:13:39 -08:00
Slava Pestov
99b0e77d35
Merge pull request #1160 from gregomni/generic-func-args
...
[Sema] Extend callee diagnosis to complex args including generics, e.g. (Void) -> T
2016-02-03 22:55:15 -08:00
gregomni
6b30695869
Extend callee diagnosis to complex args including generics, e.g. (Void) -> T
...
Correctly determine callee closeness for func/ops that include generics
as part of more complicated parameters, i.e. tuple or closure args
containing generics as elements or args/results. Still only handling
single archetypes.
Also added code to check generic substitutions already made in the callee
parameters, which further helps diagnosis.
2016-02-03 22:54:19 -08:00
practicalswift
6f84004e41
[swiftc] Add test case for crash triggered in swift::constraints::ConstraintSystem::SolverScope::~SolverScope()
...
Stack trace:
```
4 swift 0x0000000000ee0c96 swift::constraints::ConstraintSystem::SolverScope::~SolverScope() + 582
5 swift 0x0000000000ee5e6b swift::constraints::ConstraintSystem::solveSimplified(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 3915
6 swift 0x0000000000ee3605 swift::constraints::ConstraintSystem::solveRec(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 325
7 swift 0x0000000000ee33b9 swift::constraints::ConstraintSystem::solve(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 73
8 swift 0x0000000000df4b56 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>) + 614
9 swift 0x0000000000dfafa9 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 569
10 swift 0x0000000000dfc152 swift::TypeChecker::typeCheckBinding(swift::Pattern*&, swift::Expr*&, swift::DeclContext*) + 162
11 swift 0x0000000000dfc32b swift::TypeChecker::typeCheckPatternBinding(swift::PatternBindingDecl*, unsigned int) + 267
16 swift 0x0000000000e16116 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150
19 swift 0x0000000000e5d23a swift::TypeChecker::typeCheckClosureBody(swift::ClosureExpr*) + 218
20 swift 0x0000000000e869dc swift::constraints::ConstraintSystem::applySolution(swift::constraints::Solution&, swift::Expr*, swift::Type, bool, bool, bool) + 812
21 swift 0x0000000000dfb01b swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 683
23 swift 0x0000000000e5d386 swift::TypeChecker::typeCheckTopLevelCodeDecl(swift::TopLevelCodeDecl*) + 134
24 swift 0x0000000000de1f5d swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1597
25 swift 0x0000000000c8b4df swift::CompilerInstance::performSema() + 2975
27 swift 0x00000000007769f1 frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2481
28 swift 0x00000000007715d5 main + 2773
Stack dump:
0. Program arguments: /path/to/build/Ninja-ReleaseAssert/swift-linux-x86_64/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28247-swift-constraints-constraintsystem-solverscope-solverscope.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28247-swift-constraints-constraintsystem-solverscope-solverscope-c50a21.o
1. While type-checking expression at [validation-test/compiler_crashers/28247-swift-constraints-constraintsystem-solverscope-solverscope.swift:7:1 - line:7:31] RangeText="{func a(a)class a{var _=a(a{{a{"
2. While type-checking 'a' at validation-test/compiler_crashers/28247-swift-constraints-constraintsystem-solverscope-solverscope.swift:7:11
3. While type-checking expression at [validation-test/compiler_crashers/28247-swift-constraints-constraintsystem-solverscope-solverscope.swift:7:25 - line:7:31] RangeText="a(a{{a{"
<unknown>:0: error: unable to execute command: Segmentation fault
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
2016-02-03 22:20:34 +01:00
Dmitri Gribenko
b728b89b9d
Merge pull request #1126 from harlanhaskins/profdata-merge
...
[coverage] Automatic merger for LLVM profile data
2016-02-03 11:02:47 -08:00
Dmitri Gribenko
0327fc3077
Merge pull request #1187 from glessard/increments
...
silence some warnings in validation-test/stdlib/Algorithm.swift
2016-02-03 10:37:06 -08:00
Dmitri Gribenko
00bde09962
Merge pull request #1186 from glessard/cite-bugreports
...
Cite bug reports in xfail annotations
2016-02-03 10:36:47 -08:00
Guillaume Lessard
f6e00cba4f
Cite bug reports in xfail annotations
2016-02-03 11:29:38 -07:00
Guillaume Lessard
a4a338beb1
Replace ++ by "+= 1"
2016-02-03 11:23:36 -07:00
Dmitri Gribenko
084e284c3f
Mark a crash test as fixed
2016-02-02 17:03:54 -08:00
Chris Lattner
1e380ac991
my fix fixed this testcase too.
2016-02-01 22:31:21 -08:00
Chris Lattner
94dd92fcb8
Fix compiler_crashers 22725 & 28236 by reworking parameter parsing error
...
recovery a bit.
2016-02-01 20:50:32 -08:00
Chris Lattner
7c97117d77
Fix IDE crashers 027, 066, and 068.
...
Expand the "skip" functions in the parser to be more careful about
not skipping passed a #endif or a code completion token, since they
are synchronization points for the parser.
The fix was to change Parser::delayParseFromBeginningToHere to use
a manual loop instead of skipUntil (which can stop early for non-EOF
tokens).
2016-02-01 16:36:28 -08:00
Chris Lattner
9b503272a4
fix compiler_crashers/28232-swift-typechecker-typecheckfunctionbodyuntil.swift
2016-01-31 21:46:34 -08:00
Chris Lattner
d0a9479d46
Fix compiler_crashers/28246-swift-expr-propagatelvalueaccesskind.swift
...
Teach CSApply that InOutExpr around an UnresolvedType shouldn't propagate
lvalue access kinds.
2016-01-31 21:08:38 -08:00
practicalswift
49fc0df3d8
Update revision.
2016-01-31 11:08:31 +01:00
practicalswift
6c18974ff5
[swiftc] Add test case for crash triggered in swift::Expr::propagateLValueAccessKind(swift::AccessKind, bool)
...
Stack trace:
```
swift: /path/to/swift/lib/AST/Expr.cpp:207: void swift::Expr::propagateLValueAccessKind(swift::AccessKind, bool)::PropagateAccessKind::visit(swift::Expr *, swift::AccessKind): Assertion `E->getType()->isAssignableType() && "setting access kind on non-l-value"' failed.
9 swift 0x0000000000fe9127 swift::Expr::propagateLValueAccessKind(swift::AccessKind, bool) + 23
12 swift 0x0000000000f7cda5 swift::Expr::walk(swift::ASTWalker&) + 69
13 swift 0x0000000000e86d26 swift::constraints::ConstraintSystem::applySolution(swift::constraints::Solution&, swift::Expr*, swift::Type, bool, bool, bool) + 502
14 swift 0x0000000000dfb2fb swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 683
17 swift 0x0000000000ea1969 swift::constraints::ConstraintSystem::diagnoseFailureForExpr(swift::Expr*) + 105
18 swift 0x0000000000ea640e swift::constraints::ConstraintSystem::salvage(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::Expr*) + 3934
19 swift 0x0000000000df4ef5 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
20 swift 0x0000000000dfb289 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 569
23 swift 0x0000000000e5ca15 swift::TypeChecker::typeCheckDestructorBodyUntil(swift::DestructorDecl*, swift::SourceLoc) + 181
24 swift 0x0000000000e5bf7b swift::TypeChecker::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) + 27
25 swift 0x0000000000e5cb58 swift::TypeChecker::typeCheckAbstractFunctionBody(swift::AbstractFunctionDecl*) + 136
27 swift 0x0000000000de2532 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1746
28 swift 0x0000000000c8b0ff swift::CompilerInstance::performSema() + 2975
30 swift 0x00000000007766d7 frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2487
31 swift 0x00000000007712b5 main + 2773
Stack dump:
0. Program arguments: /path/to/build/Ninja-ReleaseAssert/swift-linux-x86_64/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28246-swift-expr-propagatelvalueaccesskind.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28246-swift-expr-propagatelvalueaccesskind-47a5b0.o
1. While type-checking 'deinit' at validation-test/compiler_crashers/28246-swift-expr-propagatelvalueaccesskind.swift:8:9
2. While type-checking expression at [validation-test/compiler_crashers/28246-swift-expr-propagatelvalueaccesskind.swift:8:16 - line:8:19] RangeText="{&.T"
3. While type-checking expression at [validation-test/compiler_crashers/28246-swift-expr-propagatelvalueaccesskind.swift:8:17 - line:8:19] RangeText="&.T"
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
2016-01-31 10:36:43 +01:00
David Farler
8a5ed405bf
Make var parameters an error for Swift 3
...
This finishes up revisions to SE-0003 - only var function parameters
are disallowed for Swift 3.
2016-01-30 12:39:17 -08:00
Chris Lattner
a63be90828
fix compiler_crashers/28219-swift-lvaluetype-get.swift
...
Not all types are l-valuable, notably InoutType's. This seems like a
weird restriction to put in the type checker, but it is the cleanest
solution to this. The better solution would be to change how
inoutexpr/inouttype are represented completely... maybe someday.
2016-01-29 23:18:33 -08:00
Chris Lattner
edec3cc519
simplify this testcase, NFC.
2016-01-29 23:18:33 -08:00
Chris Lattner
ff34db7950
fix a few compiler crashers
...
These were due to CSDiags not reverting the semantic expr embedded in CollectionExprs
when retypechecking them.
2016-01-29 21:13:57 -08:00
Dmitri Gribenko
27f422fe39
StdlibUnittest: move logging wrappers for collections to StdlibCollectionUnittest
2016-01-29 19:38:37 -07:00
Dmitri Gribenko
d7b05d647b
Really mark the crash test as fixed
2016-01-29 19:38:36 -07:00
Chris Lattner
2715a9e46e
Another testcase fixed by recent patches.
2016-01-29 17:04:26 -08:00
David Farler
3f635d04c7
Reinstante var bindings in refutable patterns, except function parameters.
...
This reverts commits: b96e06da44 ,
8f2fbdc93a ,
93b6962478 ,
64024118f4 ,
a759ca9141 ,
3434f9642b ,
9f33429891 ,
47c043e8a6 .
This commit leaves 'var' on function parameters as a warning to be
merged into Swift 2.2. For Swift 3, this will be an error, to be
converted in a follow-up.
2016-01-29 15:27:08 -08:00
Chris Lattner
58e33ee374
My previous patch fixed this too accidentally, update the test.
2016-01-29 14:57:57 -08:00
Chris Lattner
9bacb09708
Fix 24969-swift-vardecl-emitlettovarnoteifsimple.swift
...
A use can happen in an initializer declcontext, which has no containing method body.
2016-01-29 14:40:11 -08:00
Chris Lattner
d12a4b988d
Fix 28244-swift-valuedecl-isinstancemember.swift
...
Formerly we stopped type checking a PatternBindingDecl when it was marked
as invalid. This prevented semantic analysis from doing things like expanding
"stored" properties in protocols into computed properties with getters and setter,
causing downstream problems.
Stop doing this, and instead do a bit of work to silence the downstream errors in
a more narrow way.
2016-01-29 14:32:55 -08:00
Dmitri Gribenko
cf7e3f6df4
stdlib: Range.contains: fix coding style and make the function public
...
... so that it actually has a chance to get referenced in the witness
table.
But since the function is in a constrained extension, it can't be.
2016-01-29 13:24:59 -08:00
Dmitri Gribenko
a5a70dd14c
StdlibUnittest: use ResettableValue more, removing error-prone boilerplate from tests
2016-01-29 13:24:59 -08:00
Harlan Haskins
b8a2249091
Merged upstream master into profdata-merge
2016-01-29 13:06:52 -08:00
Harlan Haskins
44e44ad94b
Merged upstream master into profdata-merge
2016-01-29 10:28:07 -08:00
practicalswift
352045350a
[swiftc] Add test case for crash triggered in swift::DependentGenericTypeResolver::resolveSelfAssociatedType(swift::Type, swift::DeclContext*, swift::AssociatedTypeDecl*)
...
Stack trace:
```
swift: /path/to/swift/lib/Sema/TypeCheckGeneric.cpp:34: virtual swift::Type swift::DependentGenericTypeResolver::resolveDependentMemberType(swift::Type, swift::DeclContext *, swift::SourceRange, swift::ComponentIdentTypeRepr *): Assertion `archetype && "Bad generic context nesting?"' failed.
8 swift 0x0000000000e27a20 swift::DependentGenericTypeResolver::resolveSelfAssociatedType(swift::Type, swift::DeclContext*, swift::AssociatedTypeDecl*) + 0
10 swift 0x0000000000e559be 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 0x0000000000e56924 swift::TypeChecker::resolveType(swift::TypeRepr*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 164
13 swift 0x0000000000e558ca swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 42
14 swift 0x0000000000e026ba swift::TypeChecker::checkInheritanceClause(swift::Decl*, swift::GenericTypeResolver*) + 4890
15 swift 0x0000000000e28275 swift::TypeChecker::checkGenericParamList(swift::ArchetypeBuilder*, swift::GenericParamList*, swift::DeclContext*, bool, swift::GenericTypeResolver*) + 373
16 swift 0x0000000000e29abf swift::TypeChecker::validateGenericSignature(swift::GenericParamList*, swift::DeclContext*, swift::GenericSignature*, std::function<bool (swift::ArchetypeBuilder&)>, bool&) + 143
17 swift 0x0000000000e29e74 swift::TypeChecker::validateGenericTypeSignature(swift::NominalTypeDecl*) + 116
18 swift 0x0000000000e04652 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 354
19 swift 0x0000000001006fdc swift::DeclContext::lookupQualified(swift::Type, swift::DeclName, unsigned int, swift::LazyResolver*, llvm::SmallVectorImpl<swift::ValueDecl*>&) const + 2892
20 swift 0x0000000000e2cd55 swift::TypeChecker::lookupMemberType(swift::DeclContext*, swift::Type, swift::Identifier, swift::OptionSet<swift::NameLookupFlags, unsigned int>) + 293
22 swift 0x0000000000e559be swift::TypeChecker::resolveIdentifierType(swift::DeclContext*, swift::IdentTypeRepr*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, bool, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 158
24 swift 0x0000000000e56924 swift::TypeChecker::resolveType(swift::TypeRepr*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 164
25 swift 0x0000000000e558ca swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 42
26 swift 0x0000000000e026ba swift::TypeChecker::checkInheritanceClause(swift::Decl*, swift::GenericTypeResolver*) + 4890
27 swift 0x0000000000e28275 swift::TypeChecker::checkGenericParamList(swift::ArchetypeBuilder*, swift::GenericParamList*, swift::DeclContext*, bool, swift::GenericTypeResolver*) + 373
28 swift 0x0000000000e29abf swift::TypeChecker::validateGenericSignature(swift::GenericParamList*, swift::DeclContext*, swift::GenericSignature*, std::function<bool (swift::ArchetypeBuilder&)>, bool&) + 143
29 swift 0x0000000000e29e74 swift::TypeChecker::validateGenericTypeSignature(swift::NominalTypeDecl*) + 116
30 swift 0x0000000000e04652 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 354
33 swift 0x0000000000e09e06 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150
36 swift 0x0000000000e5102a swift::TypeChecker::typeCheckClosureBody(swift::ClosureExpr*) + 218
37 swift 0x0000000000e7aa0c swift::constraints::ConstraintSystem::applySolution(swift::constraints::Solution&, swift::Expr*, swift::Type, bool, bool, bool) + 812
38 swift 0x0000000000deeefb swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 683
40 swift 0x0000000000e51176 swift::TypeChecker::typeCheckTopLevelCodeDecl(swift::TopLevelCodeDecl*) + 134
41 swift 0x0000000000dd609d swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1597
42 swift 0x0000000000c7ed3f swift::CompilerInstance::performSema() + 2975
44 swift 0x00000000007766a7 frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2487
45 swift 0x0000000000771285 main + 2773
Stack dump:
0. Program arguments: /path/to/build/Ninja-ReleaseAssert/swift-linux-x86_64/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28245-swift-dependentgenerictyperesolver-resolveselfassociatedtype.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28245-swift-dependentgenerictyperesolver-resolveselfassociatedtype-aaad08.o
1. While type-checking expression at [validation-test/compiler_crashers/28245-swift-dependentgenerictyperesolver-resolveselfassociatedtype.swift:8:1 - line:8:29] RangeText="{struct A<T:A.B{class B<U:T.u"
2. While type-checking 'A' at validation-test/compiler_crashers/28245-swift-dependentgenerictyperesolver-resolveselfassociatedtype.swift:8:2
3. While resolving type A.B at [validation-test/compiler_crashers/28245-swift-dependentgenerictyperesolver-resolveselfassociatedtype.swift:8:13 - line:8:15] RangeText="A.B"
4. While resolving type T.u at [validation-test/compiler_crashers/28245-swift-dependentgenerictyperesolver-resolveselfassociatedtype.swift:8:27 - line:8:29] RangeText="T.u"
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
2016-01-29 15:48:49 +01:00
Slava Pestov
d887d823ef
Re-apply "Protocol conformances can now reference resilient value types"
...
This comes with a fix for a null pointer dereference in _typeByName()
that would pop with foreign classes that do not have a
NominalTypeDescriptor.
Also, I decided to back out part of the change for now, where the
NominalTypeDescriptor references an accessor function instead of a
pattern, since this broke LLDB, which reaches into the pattern to
get the generic cache.
Soon we will split off the generic cache from the pattern, and at
that time we can change the NominalTypeDescriptor to point at the
cache. But for now, let's avoid needless churn in LLDB by keeping
that part of the setup unchanged.
2016-01-29 00:49:00 -08:00
Dmitri Gribenko
7368b08d86
Merge pull request #1133 from glessard/always-never-testpredicate
...
Add .Always and .Never cases to StdlibUnittest's TestPredicate
2016-01-28 23:19:55 -08:00
Guillaume Lessard
bc932451f2
Validation tests for .Never and .Always TestPredicate cases
2016-01-28 23:48:29 -07:00
Dmitri Gribenko
a415ade5ae
Merge pull request #854 from an0/master
...
Add O(1) `contains()` implementation for Range with Comparable Element
2016-01-28 21:41:31 -08:00
Harlan Haskins
b1d6e17d9f
[coverage] Added coverage_mode definitions in validation test and Unit test lit.site.cfg.in
2016-01-28 15:31:03 -08:00
Slava Pestov
1312cb8afa
This test no longer crashes with an assertion, so it doesn't require asserts
2016-01-28 15:02:04 -08:00
practicalswift
94e29ef9af
[swiftc] Add test case for crash triggered in swift::ValueDecl::isInstanceMember() const
...
Stack trace:
```
4 swift 0x0000000000fbfa81 swift::ValueDecl::isInstanceMember() const + 1
9 swift 0x0000000000e31bdf swift::TypeChecker::checkConformance(swift::NormalProtocolConformance*) + 2063
13 swift 0x0000000000e07226 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150
16 swift 0x0000000000e4cbaa swift::TypeChecker::typeCheckFunctionBodyUntil(swift::FuncDecl*, swift::SourceLoc) + 362
17 swift 0x0000000000e4c9fe swift::TypeChecker::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) + 46
18 swift 0x0000000000e4d5c8 swift::TypeChecker::typeCheckAbstractFunctionBody(swift::AbstractFunctionDecl*) + 136
20 swift 0x0000000000dd35a2 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1746
21 swift 0x0000000000c7d3df swift::CompilerInstance::performSema() + 2975
23 swift 0x0000000000775927 frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2487
24 swift 0x0000000000770505 main + 2773
Stack dump:
0. Program arguments: /path/to/build/Ninja-ReleaseAssert/swift-linux-x86_64/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28244-swift-valuedecl-isinstancemember.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28244-swift-valuedecl-isinstancemember-b5b6a9.o
1. While type-checking getter for a at validation-test/compiler_crashers/28244-swift-valuedecl-isinstancemember.swift:8:30
2. While type-checking 'S' at validation-test/compiler_crashers/28244-swift-valuedecl-isinstancemember.swift:8:31
<unknown>:0: error: unable to execute command: Segmentation fault
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
2016-01-28 20:53:45 +01:00
Ling Wang
1ae71d4915
Merge from upstream and resolve conflicts
2016-01-28 11:13:42 -06:00
Ling Wang
148c821d2c
Fix test failure
2016-01-28 09:35:00 -06:00
practicalswift
c99a5ba62a
[swiftc] Add test case for crash triggered in swift::TypeBase::getCanonicalType()
...
Stack trace:
```
4 swift 0x0000000001010564 swift::TypeBase::getCanonicalType() + 20
5 swift 0x0000000000e2499f swift::DependentGenericTypeResolver::resolveTypeOfContext(swift::DeclContext*) + 47
6 swift 0x0000000000e51908 swift::TypeChecker::resolveTypeInContext(swift::TypeDecl*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, bool, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 856
10 swift 0x0000000000e5288e 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 0x0000000000e537f4 swift::TypeChecker::resolveType(swift::TypeRepr*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 164
13 swift 0x0000000000e5279a swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 42
14 swift 0x0000000000e2529c swift::TypeChecker::checkGenericParamList(swift::ArchetypeBuilder*, swift::GenericParamList*, swift::DeclContext*, bool, swift::GenericTypeResolver*) + 748
15 swift 0x0000000000e2696f swift::TypeChecker::validateGenericSignature(swift::GenericParamList*, swift::DeclContext*, swift::GenericSignature*, std::function<bool (swift::ArchetypeBuilder&)>, bool&) + 143
16 swift 0x0000000000e26d24 swift::TypeChecker::validateGenericTypeSignature(swift::NominalTypeDecl*) + 116
17 swift 0x0000000000e01af2 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 354
18 swift 0x0000000000e01a50 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 192
19 swift 0x0000000000e01a50 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 192
22 swift 0x0000000000ff86a2 swift::namelookup::lookupInModule(swift::ModuleDecl*, llvm::ArrayRef<std::pair<swift::Identifier, swift::SourceLoc> >, swift::DeclName, llvm::SmallVectorImpl<swift::ValueDecl*>&, swift::NLKind, swift::namelookup::ResolutionKind, swift::LazyResolver*, swift::DeclContext const*, llvm::ArrayRef<std::pair<llvm::ArrayRef<std::pair<swift::Identifier, swift::SourceLoc> >, swift::ModuleDecl*> >) + 1122
23 swift 0x0000000000fffd57 swift::UnqualifiedLookup::UnqualifiedLookup(swift::DeclName, swift::DeclContext*, swift::LazyResolver*, bool, swift::SourceLoc, bool, bool) + 3959
24 swift 0x0000000000e28e7b swift::TypeChecker::lookupUnqualified(swift::DeclContext*, swift::DeclName, swift::SourceLoc, swift::OptionSet<swift::NameLookupFlags, unsigned int>) + 187
25 swift 0x0000000000de4746 swift::TypeChecker::resolveDeclRefExpr(swift::UnresolvedDeclRefExpr*, swift::DeclContext*) + 102
30 swift 0x0000000000f6a21e swift::Expr::walk(swift::ASTWalker&) + 46
31 swift 0x0000000000de5d27 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
32 swift 0x0000000000dec2d9 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 569
35 swift 0x0000000000e4cbaa swift::TypeChecker::typeCheckFunctionBodyUntil(swift::FuncDecl*, swift::SourceLoc) + 362
36 swift 0x0000000000e4c9fe swift::TypeChecker::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) + 46
37 swift 0x0000000000e4d5c8 swift::TypeChecker::typeCheckAbstractFunctionBody(swift::AbstractFunctionDecl*) + 136
39 swift 0x0000000000dd35a2 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1746
40 swift 0x0000000000c7d3df swift::CompilerInstance::performSema() + 2975
42 swift 0x0000000000775927 frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2487
43 swift 0x0000000000770505 main + 2773
Stack dump:
0. Program arguments: /path/to/build/Ninja-ReleaseAssert/swift-linux-x86_64/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28243-swift-typebase-getcanonicaltype.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28243-swift-typebase-getcanonicaltype-a30a37.o
1. While type-checking 'b' at validation-test/compiler_crashers/28243-swift-typebase-getcanonicaltype.swift:9:1
2. While type-checking expression at [validation-test/compiler_crashers/28243-swift-typebase-getcanonicaltype.swift:10:1 - line:12:1] RangeText="{
3. While resolving type A at [validation-test/compiler_crashers/28243-swift-typebase-getcanonicaltype.swift:16:20 - line:16:20] RangeText="A"
<unknown>:0: error: unable to execute command: Segmentation fault
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
2016-01-28 10:40:59 +01:00
practicalswift
18cec6c843
[swiftc] Add test case for crash triggered in swift::constraints::ConstraintSystem::simplify(bool)
...
Stack trace:
```
4 swift 0x0000000000ecfd73 swift::constraints::ConstraintSystem::simplify(bool) + 163
5 swift 0x0000000000ed30b0 swift::constraints::ConstraintSystem::solveRec(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 48
6 swift 0x0000000000ed6c1a swift::constraints::ConstraintSystem::solveSimplified(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 8506
7 swift 0x0000000000ed3d19 swift::constraints::ConstraintSystem::solveRec(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 3225
8 swift 0x0000000000ed5813 swift::constraints::ConstraintSystem::solveSimplified(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 3379
9 swift 0x0000000000ed3d19 swift::constraints::ConstraintSystem::solveRec(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 3225
10 swift 0x0000000000ed5813 swift::constraints::ConstraintSystem::solveSimplified(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 3379
11 swift 0x0000000000ed3d19 swift::constraints::ConstraintSystem::solveRec(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 3225
12 swift 0x0000000000ed2f79 swift::constraints::ConstraintSystem::solve(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 73
13 swift 0x0000000000de5f16 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>) + 614
14 swift 0x0000000000dec2d9 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 569
15 swift 0x0000000000ded450 swift::TypeChecker::typeCheckBinding(swift::Pattern*&, swift::Expr*&, swift::DeclContext*) + 112
16 swift 0x0000000000ded5f9 swift::TypeChecker::typeCheckPatternBinding(swift::PatternBindingDecl*, unsigned int) + 265
21 swift 0x0000000000e07226 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150
24 swift 0x0000000000e4cbaa swift::TypeChecker::typeCheckFunctionBodyUntil(swift::FuncDecl*, swift::SourceLoc) + 362
25 swift 0x0000000000e4c9fe swift::TypeChecker::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) + 46
26 swift 0x0000000000e4d5c8 swift::TypeChecker::typeCheckAbstractFunctionBody(swift::AbstractFunctionDecl*) + 136
28 swift 0x0000000000dd35a2 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1746
29 swift 0x0000000000c7d3df swift::CompilerInstance::performSema() + 2975
31 swift 0x0000000000775927 frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2487
32 swift 0x0000000000770505 main + 2773
Stack dump:
0. Program arguments: /path/to/build/Ninja-ReleaseAssert/swift-linux-x86_64/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28242-swift-constraints-constraintsystem-simplify.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28242-swift-constraints-constraintsystem-simplify-fda504.o
1. While type-checking getter for a at validation-test/compiler_crashers/28242-swift-constraints-constraintsystem-simplify.swift:7:16
2. While type-checking 'D' at validation-test/compiler_crashers/28242-swift-constraints-constraintsystem-simplify.swift:7:17
3. While type-checking expression at [validation-test/compiler_crashers/28242-swift-constraints-constraintsystem-simplify.swift:7:32 - line:7:41] RangeText="b([print{}"
<unknown>:0: error: unable to execute command: Segmentation fault
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
2016-01-28 10:34:38 +01:00