Dmitri Gribenko
941235c25e
New indexing model: remove a duplicate API
2016-03-18 23:03:19 -07:00
Michael Ilseman
8cb669dd56
Disable crasher test that ASAN somehow fixes.
...
The disabled crasher test does not crash with ASAN enabled, which is
particularly odd. Disable the test to unblock builders and testers
while diagnosing.
2016-03-18 16:54:00 -07:00
Jordan Rose
40f57149f6
Move StdlibUnittest tests to their own directory.
...
StdlibUnittest.swift became StdlibUnittest/Common.swift;
all others just dropped the "StdlibUnittest" prefix.
2016-03-18 16:19:30 -07:00
Jordan Rose
e6a519fbda
[StdlibUnittest] Install our own handler for uncaught ObjC exceptions.
...
We don't want to be at the whims of the system on what to do with an
uncaught exception; we need to make sure its message gets printed to
stderr so that the parent process can check it.
(There's a bit of trickery here to see if the class looks like an
NSException; otherwise we lose the name of the exception and just get
the reason.)
2016-03-18 13:55:45 -07:00
Doug Gregor
d92ae77076
Eliminate most remaining uses of _convertNSFooToFoo and _convertFooToNSFoo.
...
Generalized bridging has fully subsumed most of these. NSError is
still special, and _convertStringToNSString remains for the the
runtime's implementation of SwiftObject's -description method.
2016-03-18 11:42:00 -07:00
practicalswift
2e3d3dbe09
[swiftc] Add test case for crash triggered in swift::TypeChecker::computeDefaultAccessibility(swift::ExtensionDecl*)
...
Stack trace:
```
swift: /path/to/swift/include/swift/AST/Decl.h:1716: void swift::ExtensionDecl::setDefaultAndMaxAccessibility(swift::Accessibility, swift::Accessibility): Assertion `!hasDefaultAccessibility() && "default accessibility already set"' failed.
9 swift 0x0000000000e4e9ee swift::TypeChecker::computeDefaultAccessibility(swift::ExtensionDecl*) + 830
10 swift 0x0000000000e4eec9 swift::TypeChecker::computeAccessibility(swift::ValueDecl*) + 633
11 swift 0x0000000000e4f20c swift::TypeChecker::validateAccessibility(swift::ValueDecl*) + 76
12 swift 0x0000000000e4c6d2 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 66
16 swift 0x0000000000e52296 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150
17 swift 0x0000000000e75542 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 994
18 swift 0x0000000000cc6e2f swift::CompilerInstance::performSema() + 3087
20 swift 0x000000000078d17c frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2492
21 swift 0x0000000000787c45 main + 2837
Stack dump:
0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28276-swift-typechecker-computedefaultaccessibility.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28276-swift-typechecker-computedefaultaccessibility-b0a9ad.o
1. While type-checking 'A' at validation-test/compiler_crashers/28276-swift-typechecker-computedefaultaccessibility.swift:10:1
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
2016-03-18 19:23:14 +01:00
Harlan Haskins
47541c92b4
[StdlibUnittest] Made output for expected crashes less fatalistic
2016-03-17 18:23:41 -06:00
Chris Lattner
b92870f555
Merge pull request #1717 from practicalswift/swiftc-28275-swift-typebase-getsuperclass
...
[swiftc] Add test case for crash triggered in swift::TypeBase::getSuperclass(…)
2016-03-17 12:55:41 -07:00
Max Moiseev
03cbb49982
[stdlib] _stdlibAssert => _debugPrecondition
2016-03-17 12:16:19 -07:00
practicalswift
6ba696c276
[swiftc] Add test case for crash triggered in swift::TypeBase::getSuperclass(swift::LazyResolver*)
...
Stack trace:
```
swift: /path/to/llvm/include/llvm/Support/Casting.h:237: typename cast_retty<X, Y *>::ret_type llvm::cast(Y *) [X = swift::BoundGenericType, Y = swift::TypeBase]: Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed.
8 swift 0x000000000109c869 swift::TypeBase::getSuperclass(swift::LazyResolver*) + 857
9 swift 0x0000000000e547ad swift::TypeChecker::defineDefaultConstructor(swift::NominalTypeDecl*) + 109
10 swift 0x0000000000e538f9 swift::TypeChecker::addImplicitConstructors(swift::NominalTypeDecl*) + 1417
11 swift 0x0000000000e466cd swift::TypeChecker::checkInheritanceClause(swift::Decl*, swift::GenericTypeResolver*) + 6077
12 swift 0x0000000000e4830f swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 527
13 swift 0x0000000000e481d1 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 209
14 swift 0x0000000000e481d1 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 209
17 swift 0x000000000107f0d2 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
18 swift 0x00000000010863fa swift::UnqualifiedLookup::UnqualifiedLookup(swift::DeclName, swift::DeclContext*, swift::LazyResolver*, bool, swift::SourceLoc, bool, bool) + 3978
19 swift 0x0000000000e879bb swift::TypeChecker::lookupUnqualified(swift::DeclContext*, swift::DeclName, swift::SourceLoc, swift::OptionSet<swift::NameLookupFlags, unsigned int>) + 187
22 swift 0x0000000000e91380 swift::TypeChecker::inferDefaultWitnesses(swift::ProtocolDecl*) + 288
23 swift 0x0000000000e717a8 swift::finishTypeChecking(swift::SourceFile&) + 536
24 swift 0x0000000000cc27ea swift::CompilerInstance::performSema() + 3514
26 swift 0x000000000078c25c frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2492
27 swift 0x0000000000786d25 main + 2837
Stack dump:
0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28275-swift-typebase-getsuperclass.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28275-swift-typebase-getsuperclass-4e8e8d.o
1. While defining default constructor for 'a' at validation-test/compiler_crashers/28275-swift-typebase-getsuperclass.swift:10:44
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
2016-03-17 07:51:03 +01:00
Dave Abrahams
f493b54e44
[stdlib] indexing model: Interval/Range merge
...
This is step 1; we still need to introduce ClosedRange.
2016-03-16 15:59:10 -07:00
practicalswift
7e5bc3a910
[swiftc] Add test case for crash triggered in swift::ValueDecl::isInstanceMember() const
...
Stack trace:
```
4 swift 0x0000000001040c01 swift::ValueDecl::isInstanceMember() const + 1
10 swift 0x0000000000e8d9fc swift::TypeChecker::resolveWitness(swift::NormalProtocolConformance const*, swift::ValueDecl*) + 652
11 swift 0x000000000108c18b swift::NormalProtocolConformance::getWitness(swift::ValueDecl*, swift::LazyResolver*) const + 171
13 swift 0x0000000000e84684 swift::TypeChecker::lookupUnqualified(swift::DeclContext*, swift::DeclName, swift::SourceLoc, swift::OptionSet<swift::NameLookupFlags, unsigned int>) + 404
14 swift 0x0000000000e309e6 swift::TypeChecker::resolveDeclRefExpr(swift::UnresolvedDeclRefExpr*, swift::DeclContext*) + 102
16 swift 0x0000000000fe1b03 swift::Expr::walk(swift::ASTWalker&) + 19
17 swift 0x0000000000e31fdd 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>) + 125
18 swift 0x0000000000e38720 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 576
19 swift 0x0000000000e398e2 swift::TypeChecker::typeCheckBinding(swift::Pattern*&, swift::Expr*&, swift::DeclContext*) + 162
20 swift 0x0000000000e39abb swift::TypeChecker::typeCheckPatternBinding(swift::PatternBindingDecl*, unsigned int) + 267
25 swift 0x0000000000e4a8b6 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150
26 swift 0x0000000000e6dc92 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1026
27 swift 0x0000000000cbefbf swift::CompilerInstance::performSema() + 3087
29 swift 0x000000000078bb5f frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2495
30 swift 0x0000000000786625 main + 2837
Stack dump:
0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28274-swift-valuedecl-isinstancemember.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28274-swift-valuedecl-isinstancemember-23334f.o
1. While type-checking 'S' at validation-test/compiler_crashers/28274-swift-valuedecl-isinstancemember.swift:9:1
2. While type-checking expression at [validation-test/compiler_crashers/28274-swift-valuedecl-isinstancemember.swift:10:7 - line:10:7] RangeText="f"
<unknown>:0: error: unable to execute command: Segmentation fault
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
2016-03-16 23:55:44 +01:00
practicalswift
4b40dd69fc
Merge pull request #1701 from practicalswift/swiftc-28273-swift-archetypebuilder-potentialarchetype-gettype
...
[swiftc] Add test case for crash triggered in swift::ArchetypeBuilder::PotentialArchetype::getType(…)
2016-03-16 23:54:59 +01:00
Ben Langmuir
d22638766e
Swap the order of arguments to expectEqual in Hashing test
...
So that we print "expected" and "actual" on the correct values if it
fails.
2016-03-16 11:32:48 -07:00
Ben Langmuir
24f685c1d2
Decrease the probability that stdlib/Hashing.swift will fail
...
Bump the number of trials from 10 to 14, which makes the test orders of
magnitude less likely to fail. For a range of size 10, doing 10 trials
meant that a single call to checkRange would fail ~0.03% of the time;
with 14 trials the spurious failure rate is ~0.0003%. We have 10 calls
to checkRange in this test with ranges of size <= 10.
While this test didn't fail that often before, we have a very large
number of automated builds and it has been a constant low-level source
of friction that this test fails and we have to look at and then ignore
the results.
2016-03-16 11:29:43 -07:00
practicalswift
90085c2275
[swiftc] Add test case for crash triggered in swift::ArchetypeBuilder::PotentialArchetype::getType(swift::ArchetypeBuilder&)
...
Stack trace:
```
4 swift 0x0000000000f6acdc swift::ArchetypeBuilder::PotentialArchetype::getType(swift::ArchetypeBuilder&) + 28
6 swift 0x000000000109a93d swift::Type::transform(std::function<swift::Type (swift::Type)> const&) const + 45
7 swift 0x000000000109abc7 swift::Type::transform(std::function<swift::Type (swift::Type)> const&) const + 695
8 swift 0x000000000109aa49 swift::Type::transform(std::function<swift::Type (swift::Type)> const&) const + 313
9 swift 0x0000000000f6af7f swift::ArchetypeBuilder::PotentialArchetype::getType(swift::ArchetypeBuilder&) + 703
10 swift 0x0000000000f70285 swift::ArchetypeBuilder::getArchetype(swift::GenericTypeParamDecl*) + 53
12 swift 0x0000000000e44e2a swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 506
13 swift 0x0000000001082f2c swift::DeclContext::lookupQualified(swift::Type, swift::DeclName, unsigned int, swift::LazyResolver*, llvm::SmallVectorImpl<swift::ValueDecl*>&) const + 3612
14 swift 0x0000000000e85347 swift::TypeChecker::lookupMemberType(swift::DeclContext*, swift::Type, swift::Identifier, swift::OptionSet<swift::NameLookupFlags, unsigned int>) + 295
16 swift 0x0000000000eaf42e swift::TypeChecker::resolveIdentifierType(swift::DeclContext*, swift::IdentTypeRepr*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, bool, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 158
18 swift 0x0000000000eb0344 swift::TypeChecker::resolveType(swift::TypeRepr*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 164
19 swift 0x0000000000eaf32a swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 42
20 swift 0x0000000000e80a06 swift::TypeChecker::checkGenericParamList(swift::ArchetypeBuilder*, swift::GenericParamList*, swift::GenericSignature*, bool, swift::GenericTypeResolver*) + 582
21 swift 0x0000000000e82047 swift::TypeChecker::validateGenericSignature(swift::GenericParamList*, swift::DeclContext*, swift::GenericSignature*, std::function<bool (swift::ArchetypeBuilder&)>, bool&) + 135
22 swift 0x0000000000e823e6 swift::TypeChecker::validateGenericTypeSignature(swift::GenericTypeDecl*) + 102
23 swift 0x0000000000e44d9f swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 367
26 swift 0x0000000000e4a8b6 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150
27 swift 0x0000000000e6dc92 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1026
28 swift 0x0000000000cbefbf swift::CompilerInstance::performSema() + 3087
30 swift 0x000000000078bb5f frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2495
31 swift 0x0000000000786625 main + 2837
Stack dump:
0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28273-swift-archetypebuilder-potentialarchetype-gettype.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28273-swift-archetypebuilder-potentialarchetype-gettype-44bd17.o
1. While type-checking 'S' at validation-test/compiler_crashers/28273-swift-archetypebuilder-potentialarchetype-gettype.swift:5:1
2. While resolving type S.e at [validation-test/compiler_crashers/28273-swift-archetypebuilder-potentialarchetype-gettype.swift:5:16 - line:5:18] RangeText="S.e"
<unknown>:0: error: unable to execute command: Segmentation fault
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
2016-03-16 10:59:46 +01:00
practicalswift
3ac95ecbab
Merge pull request #1692 from practicalswift/swiftc-28272-swift-expr-walk
...
[swiftc] Add test case for crash triggered in swift::Expr::walk(…)
2016-03-15 22:33:39 +01:00
practicalswift
5db8277270
[swiftc] Add test case for crash triggered in swift::Expr::walk(swift::ASTWalker&)
...
Stack trace:
```
swift: /path/to/llvm/include/llvm/ADT/Optional.h:138: T &&llvm::Optional<swift::constraints::SelectedOverload>::operator*() && [T = swift::constraints::SelectedOverload]: Assertion `hasVal' failed.
11 swift 0x0000000000fdfea5 swift::Expr::walk(swift::ASTWalker&) + 69
12 swift 0x0000000000ed3e26 swift::constraints::ConstraintSystem::applySolution(swift::constraints::Solution&, swift::Expr*, swift::Type, bool, bool, bool) + 502
13 swift 0x0000000000e36d5a swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 746
16 swift 0x0000000000ef093b swift::constraints::ConstraintSystem::diagnoseFailureForExpr(swift::Expr*) + 10971
17 swift 0x0000000000ef29a0 swift::constraints::ConstraintSystem::salvage(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::Expr*) + 4064
18 swift 0x0000000000e30803 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>) + 787
19 swift 0x0000000000e36cb0 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 576
21 swift 0x0000000000ea8986 swift::TypeChecker::typeCheckTopLevelCodeDecl(swift::TopLevelCodeDecl*) + 134
22 swift 0x0000000000e6c27d swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1149
23 swift 0x0000000000cbdccf swift::CompilerInstance::performSema() + 3087
25 swift 0x000000000078b89f frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2495
26 swift 0x0000000000786365 main + 2837
Stack dump:
0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28272-swift-expr-walk.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28272-swift-expr-walk-29a7d7.o
1. While type-checking expression at [validation-test/compiler_crashers/28272-swift-expr-walk.swift:6:1 - line:6:3] RangeText=".A["
2. While type-checking expression at [validation-test/compiler_crashers/28272-swift-expr-walk.swift:6:1 - line:6:3] RangeText=".A["
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
2016-03-15 11:55:27 +01:00
Dmitri Gribenko
85d955b788
Merge remote-tracking branch 'origin/master' into swift-3-indexing-model
2016-03-15 01:27:03 -07:00
Daniel Duan
f1a1b0e752
[Sema] add a crasher
2016-03-15 00:33:08 -07:00
Ted Kremenek
7772ae7543
Merge pull request #1680 from practicalswift/swiftc-28271-swift-archetypebuilder-getallarchetypes
...
[swiftc] Add test case for crash triggered in swift::ArchetypeBuilder::getAllArchetypes()
2016-03-14 21:35:48 -07:00
practicalswift
2a08c13cee
[crashers] Add license headers.
...
Approvals given in #1649 .
2016-03-14 21:59:04 +01:00
practicalswift
defe364a59
Merge pull request #1668 from practicalswift/add-apache-license-header-to-crashers
...
[crashers] Add license header: Apache License v2.0 with Runtime Library Exception
2016-03-14 21:51:03 +01:00
practicalswift
c3eddb7fb0
[swiftc] Add test case for crash triggered in swift::ArchetypeBuilder::getAllArchetypes()
...
Stack trace:
```
swift: /path/to/swift/include/swift/AST/Types.h:3616: swift::ArchetypeType *swift::ArchetypeType::NestedType::castToArchetype() const: Assertion `!isConcreteType()' failed.
8 swift 0x0000000000f6cec5 swift::ArchetypeBuilder::getAllArchetypes() + 533
12 swift 0x0000000000e41db1 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 1089
16 swift 0x0000000000e475d6 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150
19 swift 0x0000000000ea6e0a swift::TypeChecker::typeCheckClosureBody(swift::ClosureExpr*) + 218
20 swift 0x0000000000ed293c swift::constraints::ConstraintSystem::applySolution(swift::constraints::Solution&, swift::Expr*, swift::Type, bool, bool, bool) + 812
21 swift 0x0000000000e3550a swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 746
24 swift 0x0000000000ea5ada swift::TypeChecker::typeCheckFunctionBodyUntil(swift::FuncDecl*, swift::SourceLoc) + 346
25 swift 0x0000000000ea593e swift::TypeChecker::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) + 46
26 swift 0x0000000000ea64d8 swift::TypeChecker::typeCheckAbstractFunctionBody(swift::AbstractFunctionDecl*) + 136
28 swift 0x0000000000e6aa74 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1300
29 swift 0x0000000000cbcf5f swift::CompilerInstance::performSema() + 3087
31 swift 0x000000000078b6ff frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2495
32 swift 0x00000000007861c5 main + 2837
Stack dump:
0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28271-swift-archetypebuilder-getallarchetypes.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28271-swift-archetypebuilder-getallarchetypes-7ceb13.o
1. While type-checking 'b' at validation-test/compiler_crashers/28271-swift-archetypebuilder-getallarchetypes.swift:6:1
2. While type-checking expression at [validation-test/compiler_crashers/28271-swift-archetypebuilder-getallarchetypes.swift:6:8 - line:9:11] RangeText="{
3. While type-checking 'P' at validation-test/compiler_crashers/28271-swift-archetypebuilder-getallarchetypes.swift:7:1
4. While type-checking 'b' at validation-test/compiler_crashers/28271-swift-archetypebuilder-getallarchetypes.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-03-14 21:01:58 +01:00
practicalswift
7f5266dea8
[crashers] Add full license header.
2016-03-14 20:53:10 +01:00
practicalswift
e6813aa825
[crashers] Update credits.
2016-03-14 20:53:03 +01:00
Chris Lattner
e1ad6d80ee
fix 28270-swift-constraints-constraintsystem-diagnosefailureforexpr.swift
2016-03-14 11:56:32 -07:00
practicalswift
b27f54829a
[swiftc] Add test case for crash triggered in swift::constraints::ConstraintSystem::diagnoseFailureForExpr(swift::Expr*)
...
Stack trace:
```
6 swift 0x000000000310acdd llvm::llvm_unreachable_internal(char const*, char const*, unsigned int) + 461
12 swift 0x0000000000eec759 swift::constraints::ConstraintSystem::diagnoseFailureForExpr(swift::Expr*) + 105
13 swift 0x0000000000ef1230 swift::constraints::ConstraintSystem::salvage(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::Expr*) + 4064
14 swift 0x0000000000e2efb3 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>) + 787
15 swift 0x0000000000e35460 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 576
20 swift 0x0000000000eec759 swift::constraints::ConstraintSystem::diagnoseFailureForExpr(swift::Expr*) + 105
21 swift 0x0000000000ef1230 swift::constraints::ConstraintSystem::salvage(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::Expr*) + 4064
22 swift 0x0000000000e2efb3 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>) + 787
23 swift 0x0000000000e35460 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 576
28 swift 0x0000000000eec759 swift::constraints::ConstraintSystem::diagnoseFailureForExpr(swift::Expr*) + 105
29 swift 0x0000000000ef1230 swift::constraints::ConstraintSystem::salvage(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::Expr*) + 4064
30 swift 0x0000000000e2efb3 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>) + 787
31 swift 0x0000000000e35460 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 576
33 swift 0x0000000000ea6f56 swift::TypeChecker::typeCheckTopLevelCodeDecl(swift::TopLevelCodeDecl*) + 134
34 swift 0x0000000000e6a9dd swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1149
35 swift 0x0000000000cbcf5f swift::CompilerInstance::performSema() + 3087
37 swift 0x000000000078b6ff frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2495
38 swift 0x00000000007861c5 main + 2837
Stack dump:
0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28270-swift-constraints-constraintsystem-diagnosefailureforexpr.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28270-swift-constraints-constraintsystem-diagnosefailureforexpr-edc728.o
1. While type-checking expression at [validation-test/compiler_crashers/28270-swift-constraints-constraintsystem-diagnosefailureforexpr.swift:5:1 - line:5:6] RangeText="!(0^_{"
2. While type-checking expression at [validation-test/compiler_crashers/28270-swift-constraints-constraintsystem-diagnosefailureforexpr.swift:5:3 - line:5:6] RangeText="0^_{"
3. While type-checking expression at [validation-test/compiler_crashers/28270-swift-constraints-constraintsystem-diagnosefailureforexpr.swift:5:5 - line:5:6] RangeText="_{"
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
2016-03-14 11:29:07 +01:00
practicalswift
7318060242
Merge pull request #1667 from practicalswift/flake8-passing-with-default-rules
...
[Python] Make flake8 linting pass without errors/warnings (w/ default rules)
2016-03-14 09:23:22 +01:00
practicalswift
58dd619504
Merge pull request #1669 from practicalswift/swiftc-28269-swift-expr-walk
...
[swiftc] Add test case for crash triggered in swift::Expr::walk(…)
2016-03-14 09:15:11 +01:00
gregomni
03f5c713fd
My last commit a11e911 accidentally fixed this recently added crash.
2016-03-13 22:54:08 -07:00
Dmitri Gribenko
90eb232226
Merge remote-tracking branch 'origin/master' into swift-3-indexing-model
2016-03-13 21:57:34 -07:00
practicalswift
feaa3a7ad0
[swiftc] Add test case for crash triggered in swift::Expr::walk(swift::ASTWalker&)
...
Stack trace:
```
swift: /path/to/swift/lib/Sema/CSApply.cpp:147: swift::Type swift::constraints::Solution::computeSubstitutions(swift::Type, swift::DeclContext *, swift::Type, swift::constraints::ConstraintLocator *, SmallVectorImpl<swift::Substitution> &) const: Assertion `(conforms || firstArchetype->getIsRecursive() || isOpenedAnyObject(replacement) || replacement->is<GenericTypeParamType>()) && "Constraint system missed a conformance?"' failed.
12 swift 0x0000000000fde105 swift::Expr::walk(swift::ASTWalker&) + 69
13 swift 0x0000000000ed2786 swift::constraints::ConstraintSystem::applySolution(swift::constraints::Solution&, swift::Expr*, swift::Type, bool, bool, bool) + 502
14 swift 0x0000000000e3548a swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 746
16 swift 0x0000000000eec723 swift::constraints::ConstraintSystem::diagnoseFailureForExpr(swift::Expr*) + 179
17 swift 0x0000000000ef11b0 swift::constraints::ConstraintSystem::salvage(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::Expr*) + 4064
18 swift 0x0000000000e2ef33 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>) + 787
19 swift 0x0000000000e353e0 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 576
23 swift 0x0000000000ea5a5a swift::TypeChecker::typeCheckFunctionBodyUntil(swift::FuncDecl*, swift::SourceLoc) + 346
24 swift 0x0000000000ea58be swift::TypeChecker::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) + 46
25 swift 0x0000000000ea6458 swift::TypeChecker::typeCheckAbstractFunctionBody(swift::AbstractFunctionDecl*) + 136
27 swift 0x0000000000e6a9f4 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1300
28 swift 0x0000000000cbcedf swift::CompilerInstance::performSema() + 3087
30 swift 0x000000000078b6ff frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2495
31 swift 0x00000000007861c5 main + 2837
Stack dump:
0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28269-swift-expr-walk.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28269-swift-expr-walk-5303a6.o
1. While type-checking getter for t at validation-test/compiler_crashers/28269-swift-expr-walk.swift:10:46
2. While type-checking expression at [<invalid loc> - <invalid loc>]
3. While type-checking expression at [<invalid loc> - <invalid loc>]
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
2016-03-13 22:22:42 +01:00
practicalswift
1edb62dc38
[Python] Make flake8 linting pass without errors/warning (w/ default rules)
2016-03-13 20:19:51 +01:00
practicalswift
dace490553
[swiftc] Add test case for crash triggered in swift::Type::transform(std::function<swift::Type (swift::Type)> const&) const
...
Stack trace:
```
swift: /path/to/llvm/include/llvm/Support/Casting.h:95: static bool llvm::isa_impl_cl<swift::SILFunctionType, const swift::TypeBase *>::doit(const From *) [To = swift::SILFunctionType, From = const swift::TypeBase *]: Assertion `Val && "isa<> used on a null pointer"' failed.
9 swift 0x0000000001096f1d swift::Type::transform(std::function<swift::Type (swift::Type)> const&) const + 45
10 swift 0x000000000109156f swift::Type::subst(swift::ModuleDecl*, llvm::DenseMap<swift::TypeBase*, swift::Type, llvm::DenseMapInfo<swift::TypeBase*>, llvm::detail::DenseMapPair<swift::TypeBase*, swift::Type> >&, swift::OptionSet<swift::SubstFlags, unsigned int>) const + 111
13 swift 0x0000000000e8a11e swift::TypeChecker::resolveTypeWitness(swift::NormalProtocolConformance const*, swift::AssociatedTypeDecl*) + 254
14 swift 0x0000000001087d46 swift::NormalProtocolConformance::getTypeWitnessSubstAndDecl(swift::AssociatedTypeDecl*, swift::LazyResolver*) const + 150
15 swift 0x0000000001087c88 swift::ProtocolConformance::getTypeWitnessSubstAndDecl(swift::AssociatedTypeDecl*, swift::LazyResolver*) const + 40
16 swift 0x0000000001088486 swift::ProtocolConformance::getTypeWitness(swift::AssociatedTypeDecl*, swift::LazyResolver*) const + 6
17 swift 0x0000000000e8210f swift::TypeChecker::lookupMemberType(swift::DeclContext*, swift::Type, swift::Identifier, swift::OptionSet<swift::NameLookupFlags, unsigned int>) + 1071
19 swift 0x0000000000eabdee swift::TypeChecker::resolveIdentifierType(swift::DeclContext*, swift::IdentTypeRepr*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, bool, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 158
21 swift 0x0000000000eacd04 swift::TypeChecker::resolveType(swift::TypeRepr*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 164
22 swift 0x0000000000eabcea swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 42
27 swift 0x0000000000e47556 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150
30 swift 0x0000000000ea5a5a swift::TypeChecker::typeCheckFunctionBodyUntil(swift::FuncDecl*, swift::SourceLoc) + 346
31 swift 0x0000000000ea58be swift::TypeChecker::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) + 46
32 swift 0x0000000000ea6458 swift::TypeChecker::typeCheckAbstractFunctionBody(swift::AbstractFunctionDecl*) + 136
34 swift 0x0000000000e6a9f4 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1300
35 swift 0x0000000000cbcedf swift::CompilerInstance::performSema() + 3087
37 swift 0x000000000078b6ff frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2495
38 swift 0x00000000007861c5 main + 2837
Stack dump:
0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28268-swift-type-transform.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28268-swift-type-transform-b6bd0e.o
1. While type-checking declaration 0x648dd80 at validation-test/compiler_crashers/28268-swift-type-transform.swift:10:5
2. While type-checking 'a' at validation-test/compiler_crashers/28268-swift-type-transform.swift:10:6
3. While resolving type A.e at [validation-test/compiler_crashers/28268-swift-type-transform.swift:11:13 - line:11:15] RangeText="A.e"
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
2016-03-13 12:44:19 +01:00
practicalswift
a3dfb717ab
[swiftc] Add test case for crash triggered in swift::TypeChecker::checkConformance(swift::NormalProtocolConformance*)
...
Stack trace:
```
swift: /path/to/swift/lib/Sema/CSApply.cpp:147: swift::Type swift::constraints::Solution::computeSubstitutions(swift::Type, swift::DeclContext *, swift::Type, swift::constraints::ConstraintLocator *, SmallVectorImpl<swift::Substitution> &) const: Assertion `(conforms || firstArchetype->getIsRecursive() || isOpenedAnyObject(replacement) || replacement->is<GenericTypeParamType>()) && "Constraint system missed a conformance?"' failed.
13 swift 0x0000000000e89f3d swift::TypeChecker::checkConformance(swift::NormalProtocolConformance*) + 2237
17 swift 0x0000000000e47556 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150
20 swift 0x0000000000ea6d8a swift::TypeChecker::typeCheckClosureBody(swift::ClosureExpr*) + 218
21 swift 0x0000000000ed28bc swift::constraints::ConstraintSystem::applySolution(swift::constraints::Solution&, swift::Expr*, swift::Type, bool, bool, bool) + 812
22 swift 0x0000000000e3548a swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 746
25 swift 0x0000000000ea5ead swift::TypeChecker::typeCheckConstructorBodyUntil(swift::ConstructorDecl*, swift::SourceLoc) + 845
26 swift 0x0000000000ea58b2 swift::TypeChecker::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) + 34
27 swift 0x0000000000ea6458 swift::TypeChecker::typeCheckAbstractFunctionBody(swift::AbstractFunctionDecl*) + 136
29 swift 0x0000000000e6a9f4 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1300
30 swift 0x0000000000cbcedf swift::CompilerInstance::performSema() + 3087
32 swift 0x000000000078b6ff frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2495
33 swift 0x00000000007861c5 main + 2837
Stack dump:
0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28267-swift-typechecker-checkconformance.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28267-swift-typechecker-checkconformance-1f2757.o
1. While type-checking 'init' at validation-test/compiler_crashers/28267-swift-typechecker-checkconformance.swift:10:27
2. While type-checking expression at [validation-test/compiler_crashers/28267-swift-typechecker-checkconformance.swift:10:34 - line:10:44] RangeText="{enum S<h{c"
3. While type-checking 'S' at validation-test/compiler_crashers/28267-swift-typechecker-checkconformance.swift:10:35
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
2016-03-13 11:24:57 +01:00
practicalswift
dd94851de7
[swiftc] Add test case for crash triggered in swift::ModuleDecl::lookupPrefixOperator(swift::Identifier, swift::SourceLoc)
...
Stack trace:
```
6 swift 0x000000000310ab3d llvm::llvm_unreachable_internal(char const*, char const*, unsigned int) + 461
7 swift 0x000000000106f570 swift::ModuleDecl::lookupPrefixOperator(swift::Identifier, swift::SourceLoc) + 0
9 swift 0x0000000000f66048 swift::ArchetypeBuilder::PotentialArchetype::addConformance(swift::ProtocolDecl*, swift::RequirementSource const&, swift::ArchetypeBuilder&) + 296
10 swift 0x0000000000f69a16 swift::ArchetypeBuilder::addConformanceRequirement(swift::ArchetypeBuilder::PotentialArchetype*, swift::ProtocolDecl*, swift::RequirementSource, llvm::SmallPtrSetImpl<swift::ProtocolDecl*>&) + 118
13 swift 0x0000000000f6b9ff swift::ArchetypeBuilder::visitInherited(llvm::ArrayRef<swift::TypeLoc>, llvm::function_ref<bool (swift::Type, swift::SourceLoc)>) + 175
14 swift 0x0000000000f697ea swift::ArchetypeBuilder::addAbstractTypeParamRequirements(swift::AbstractTypeParamDecl*, swift::ArchetypeBuilder::PotentialArchetype*, swift::RequirementSource::Kind, llvm::SmallPtrSetImpl<swift::ProtocolDecl*>&) + 426
15 swift 0x0000000000f69b77 swift::ArchetypeBuilder::addConformanceRequirement(swift::ArchetypeBuilder::PotentialArchetype*, swift::ProtocolDecl*, swift::RequirementSource, llvm::SmallPtrSetImpl<swift::ProtocolDecl*>&) + 471
18 swift 0x0000000000f6b9ff swift::ArchetypeBuilder::visitInherited(llvm::ArrayRef<swift::TypeLoc>, llvm::function_ref<bool (swift::Type, swift::SourceLoc)>) + 175
19 swift 0x0000000000f697ea swift::ArchetypeBuilder::addAbstractTypeParamRequirements(swift::AbstractTypeParamDecl*, swift::ArchetypeBuilder::PotentialArchetype*, swift::RequirementSource::Kind, llvm::SmallPtrSetImpl<swift::ProtocolDecl*>&) + 426
20 swift 0x0000000000f6961c swift::ArchetypeBuilder::addGenericParameterRequirements(swift::GenericTypeParamDecl*) + 172
21 swift 0x0000000000e7d3f7 swift::TypeChecker::checkGenericParamList(swift::ArchetypeBuilder*, swift::GenericParamList*, swift::GenericSignature*, bool, swift::GenericTypeResolver*) + 375
22 swift 0x0000000000e7eb07 swift::TypeChecker::validateGenericSignature(swift::GenericParamList*, swift::DeclContext*, swift::GenericSignature*, std::function<bool (swift::ArchetypeBuilder&)>, bool&) + 135
23 swift 0x0000000000e7eea6 swift::TypeChecker::validateGenericTypeSignature(swift::GenericTypeDecl*) + 102
24 swift 0x0000000000e41f31 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 1601
29 swift 0x0000000000e47556 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150
30 swift 0x0000000000e6a8e2 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1026
31 swift 0x0000000000cbcedf swift::CompilerInstance::performSema() + 3087
33 swift 0x000000000078b6ff frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2495
34 swift 0x00000000007861c5 main + 2837
Stack dump:
0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28266-swift-moduledecl-lookupprefixoperator.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28266-swift-moduledecl-lookupprefixoperator-bacf6e.o
1. While type-checking 'B' at validation-test/compiler_crashers/28266-swift-moduledecl-lookupprefixoperator.swift:9:1
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
2016-03-13 10:24:38 +01:00
Dmitri Gribenko
3bf4d15037
Merge pull request #1659 from practicalswift/swiftc-28265-swift-expr-walk
...
[swiftc] Add test case for crash triggered in swift::Expr::walk(…)
2016-03-12 19:30:12 -08:00
Patrick Pijnappel
4d05dc69a1
[stdlib] Resolve merge conflict in Unicode.swift
2016-03-13 14:08:23 +11:00
Ted Kremenek
6d045b0318
Merge pull request #1554 from JaSpa/enum-case-is-no-type
...
[AST/Sema] Don't crash when referencing enum case in where-clause
2016-03-12 16:52:53 -08:00
Dmitri Gribenko
45d45589a6
Merge remote-tracking branch 'origin/master' into swift-3-indexing-model
2016-03-12 16:02:40 -08:00
practicalswift
4a0a62ce1f
[swiftc] Add test case for crash triggered in swift::Expr::walk(swift::ASTWalker&)
...
Stack trace:
```
swift: /path/to/swift/lib/Sema/CSApply.cpp:2314: swift::Expr *(anonymous namespace)::ExprRewriter::applyMemberRefExpr(swift::Expr *, swift::Expr *, swift::SourceLoc, swift::DeclNameLoc, bool): Assertion `resultTy->hasUnresolvedType() && "Should have a selected member if we got a type"' failed.
13 swift 0x0000000000fdccbe swift::Expr::walk(swift::ASTWalker&) + 46
14 swift 0x0000000000ed1376 swift::constraints::ConstraintSystem::applySolution(swift::constraints::Solution&, swift::Expr*, swift::Type, bool, bool, bool) + 502
15 swift 0x0000000000e33eca swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 746
18 swift 0x0000000000eeb2c9 swift::constraints::ConstraintSystem::diagnoseFailureForExpr(swift::Expr*) + 105
19 swift 0x0000000000eefda0 swift::constraints::ConstraintSystem::salvage(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::Expr*) + 4064
20 swift 0x0000000000e2d973 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>) + 787
21 swift 0x0000000000e33e20 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 576
22 swift 0x0000000000e35ad1 swift::TypeChecker::typeCheckCondition(swift::Expr*&, swift::DeclContext*) + 145
23 swift 0x0000000000e35c2b swift::TypeChecker::typeCheckStmtCondition(llvm::MutableArrayRef<swift::StmtConditionElement>&, swift::DeclContext*, swift::Diag<>) + 251
27 swift 0x0000000000ea468a swift::TypeChecker::typeCheckFunctionBodyUntil(swift::FuncDecl*, swift::SourceLoc) + 346
28 swift 0x0000000000ea44ee swift::TypeChecker::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) + 46
29 swift 0x0000000000ea5088 swift::TypeChecker::typeCheckAbstractFunctionBody(swift::AbstractFunctionDecl*) + 136
31 swift 0x0000000000e69624 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1300
32 swift 0x0000000000cbc58f swift::CompilerInstance::performSema() + 3087
34 swift 0x000000000078b54f frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2495
35 swift 0x0000000000786015 main + 2837
Stack dump:
0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28265-swift-expr-walk.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28265-swift-expr-walk-d333bf.o
1. While type-checking 'a' at validation-test/compiler_crashers/28265-swift-expr-walk.swift:10:9
2. While type-checking expression at [validation-test/compiler_crashers/28265-swift-expr-walk.swift:10:19 - line:10:29] RangeText="c == .h.c=a"
3. While type-checking expression at [validation-test/compiler_crashers/28265-swift-expr-walk.swift:10:19 - line:10:27] RangeText="c == .h.c"
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
2016-03-12 22:15:53 +01:00
Ben Langmuir
812d1566a7
[CodeCompletion] Don't look through non-type contexts in override
...
We don't actually want to skip non-type contexts here, since we should
only be showing override completions in the type context itself. This
was pretty obscure to hit in practice, but I noticed it while fixing the
crasher.
2016-03-12 08:39:11 -08:00
Janek Spaderna
8bca045718
[AST] Fail to compute the EnumElementDecl type in case of an ErrorType
...
If the resulting function type contains an ErrorType, this is an indicator that
something else is wrong. Bail out in this case.
This happened if an enum case was referenced inside the where-clause and treated
as a type.
2016-03-12 11:53:16 +01:00
practicalswift
d43320c01a
[swiftc] Add test case for crash triggered in swift::ValueDecl::getInterfaceType() const
...
Stack trace:
```
4 swift 0x000000000103cc7c swift::ValueDecl::getInterfaceType() const + 12
5 swift 0x000000000103d836 swift::TypeDecl::getDeclaredInterfaceType() const + 6
6 swift 0x0000000000e7b8a1 swift::DependentGenericTypeResolver::resolveTypeOfContext(swift::DeclContext*) + 81
7 swift 0x0000000000ea979f swift::TypeChecker::resolveTypeInContext(swift::TypeDecl*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, bool, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 911
11 swift 0x0000000000eaaa1e swift::TypeChecker::resolveIdentifierType(swift::DeclContext*, swift::IdentTypeRepr*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, bool, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 158
13 swift 0x0000000000eab934 swift::TypeChecker::resolveType(swift::TypeRepr*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 164
14 swift 0x0000000000eaa91a swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 42
15 swift 0x0000000000e7c162 swift::TypeChecker::checkGenericParamList(swift::ArchetypeBuilder*, swift::GenericParamList*, swift::GenericSignature*, bool, swift::GenericTypeResolver*) + 690
16 swift 0x0000000000e7d737 swift::TypeChecker::validateGenericSignature(swift::GenericParamList*, swift::DeclContext*, swift::GenericSignature*, std::function<bool (swift::ArchetypeBuilder&)>, bool&) + 135
17 swift 0x0000000000e7dad6 swift::TypeChecker::validateGenericTypeSignature(swift::GenericTypeDecl*) + 102
18 swift 0x0000000000e40b42 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 1554
23 swift 0x0000000000e46196 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150
26 swift 0x0000000000ea59ba swift::TypeChecker::typeCheckClosureBody(swift::ClosureExpr*) + 218
27 swift 0x0000000000ed14ac swift::constraints::ConstraintSystem::applySolution(swift::constraints::Solution&, swift::Expr*, swift::Type, bool, bool, bool) + 812
28 swift 0x0000000000e33eca swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 746
30 swift 0x0000000000ea5b06 swift::TypeChecker::typeCheckTopLevelCodeDecl(swift::TopLevelCodeDecl*) + 134
31 swift 0x0000000000e6958d swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1149
32 swift 0x0000000000cbc58f swift::CompilerInstance::performSema() + 3087
34 swift 0x000000000078b54f frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2495
35 swift 0x0000000000786015 main + 2837
Stack dump:
0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28264-swift-valuedecl-getinterfacetype.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28264-swift-valuedecl-getinterfacetype-d01804.o
1. While type-checking expression at [validation-test/compiler_crashers/28264-swift-valuedecl-getinterfacetype.swift:9:1 - line:9:35] RangeText="{class A{typealias B<T where B:T>:v"
2. While type-checking 'A' at validation-test/compiler_crashers/28264-swift-valuedecl-getinterfacetype.swift:9:2
3. While resolving type B at [validation-test/compiler_crashers/28264-swift-valuedecl-getinterfacetype.swift:9:30 - line:9:30] RangeText="B"
<unknown>:0: error: unable to execute command: Segmentation fault
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
2016-03-12 10:32:05 +01:00
Dmitri Gribenko
3cde854287
Merge remote-tracking branch 'origin/master' into swift-3-indexing-model
2016-03-12 01:11:32 -08:00
Ben Langmuir
5bbc06b35c
[CodeCompletion] Fix override completion parser lookback issues
...
This allows us to get override completions correct when
* There are multiple decls on one line
* The preceding attributes/keywords span multiple lines
Resolving a longstanding FIXME.
2016-03-11 23:00:11 -08:00
Ben Langmuir
47723848bd
[CodeCompletion] Fix crash in override completion in a bogus context
...
Use the right context for getting the formal access. To get the
completions right, we should fix the FIXME about not backtracking the
parser so far.
2016-03-11 17:15:19 -08:00
Chris Lattner
583ea34d63
Merge pull request #1643 from practicalswift/swiftc-28263-swift-typechecker-validatedecl
...
[swiftc] Add test case for crash triggered in swift::TypeChecker::validateDecl(…)
2016-03-11 16:57:53 -08:00
Chris Lattner
21e1de1614
Merge pull request #1625 from practicalswift/swiftc-28262-swift-typechecker-applyunboundgenericarguments
...
[swiftc] Add test case for crash triggered in swift::TypeChecker::applyUnboundGenericArguments(…)
2016-03-11 16:57:32 -08:00