Commit Graph

4289 Commits

Author SHA1 Message Date
Arnold Schwaighofer
bb32c67c79 Disable ModelIO test on ios
This test fails on the iphonesimulator x86_64

rdar://35490456
2017-11-11 17:26:28 -08:00
Slava Pestov
2146383697 SILGen: Resilient method dispatch thunks 2017-11-11 16:31:53 -08:00
Xi Ge
0d9745f6eb libSyntax: teach parser to parse dictionary and array literals. (#12821)
This commit also adds ArrayExpr and DictionaryExpr to the libSyntax nodes
family. Also, it refactors the original parser code for these two
expressions to better fit to the design of SyntaxParsingContext.

This commit has also fixed two crashers.
2017-11-09 09:00:43 -08:00
Greg Parker
9a38e609af [IRGen][runtime] Reduce object header to 8 bytes on 32-bit platforms. (#12790)
SR-4353, rdar://29765800
2017-11-08 02:50:11 -08:00
Nate Cook
dcf6e2b409 [stdlib] Fix FloatingPoint.init(exactly:) (#12739)
* [stdlib] Fix FloatingPoint.init(exactly:)

This initializer wasn't actually checking the exact conversion.

SR-4634, rdar://problem/31836766
2017-11-06 15:24:44 -08:00
Doug Gregor
5be25a690c Re-enable parse_stdlib test 2017-11-02 07:16:29 -07:00
Slava Pestov
ccfa6e43f5 Add a crasher 2017-11-01 21:48:07 -07:00
Doug Gregor
00801f4c80 Disable the parse_stdlib test, again.
Recent work on witness tables broke it. We're (still) tracking this failure
via rdar://problem/34771322.
2017-11-01 16:09:35 -07:00
Doug Gregor
dfa9982edd Collapse the 17 “parse_stdlib” tests into a single test.
The sharding of this test buys us nothing, because it was only sharding
the AST verifier, which is an insignificant portion of the runtime
(and memory usage) of this test. Given that the test takes ~2m30s to run
and consumes > 2GB memory, having 17 copies of it running is a problem.
2017-11-01 16:02:20 -07:00
Doug Gregor
d17059c882 Re-enable parse_stdlib tests on macOS.
Our Linux CI is still running out of memory on these tests, but try to
reinstate macOS testing so we don't regress here.
2017-11-01 14:05:12 -07:00
Doug Gregor
945ac3de0a Revert " Re-enable parse_stdlib tests." 2017-11-01 06:59:35 -07:00
swift-ci
c89e49091a Merge pull request #12700 from DougGregor/reenable-parse-stdlib-test 2017-11-01 01:36:07 -07:00
Pavel Yaskevich
ebe3abaff1 Merge pull request #12593 from xedin/rdar-35142121
[ConstraintSolver] Avoid unnecessarily increasing score when matching function types
2017-11-01 00:47:37 -07:00
Doug Gregor
ef0f347885 Re-enable parse_stdlib tests.
Now that memory usage is (more) under control, re-enable the parse_stdlib
tests. Fixes rdar://problem/34771322.
2017-10-31 23:41:41 -07:00
Pavel Yaskevich
66e13bcc85 [ConstraintSolver] Avoid unnecessarily increasing score when matching function types
Remove function-to-function type match score increase, which should only
happen contextually in presence of other restrictions, this used to fix
the case related to matching of arrays of functions with and w/e `throws`
as function parameters which used to be ambigious, and now handled by
collection-upcast conversion score.

Resolves: rdar://problem/35142121
2017-10-31 23:14:35 -07:00
Doug Gregor
fe54e70fce [GSB] Don't infer requirements from types in the definitions of protocols.
Previously, we were inferring requirements from types within the definitions
of protocols, e.g., given something like:

    protocol P {
      associatedtype A: Collection
      associatedtype B where A.Element == Set<B>
    }

we would infer that B: Hashable. The code for doing this was actually
incorrect due to its mis-use of requirement sources, causing a few
crashers. Plus, it's not a good idea in general because it hides the
actual requirements on B. Stop doing this.

Also stop trying to infer requirements from conditional
requirements---those have already been canonicalized and minimized, so
there's nothing to infer from.
2017-10-31 15:28:19 -07:00
Doug Gregor
3a3e96cf66 Set the outer generic parameters of a protocol extension properly.
Fixes two compiler crashers.
2017-10-27 23:41:08 -07:00
Doug Gregor
e0aedef88a [AST] Handle superclass and concrete sources in conformance access paths.
If we encounter a superclass or concrete source within a conformance
access path, use the stored conformance to terminate the path. Fixes a
compiler crasher.
2017-10-27 23:41:08 -07:00
Doug Gregor
439bb8cc2b Make sure that TypeChecker::validateExtension() wires up generic environment.
Fixes a crasher.
2017-10-27 23:41:08 -07:00
Doug Gregor
9e8023d191 Add slow type-checker test from rdar://problem/35213699. 2017-10-27 23:41:08 -07:00
Doug Gregor
014899b7ab Merge pull request #12663 from DougGregor/gsb-fewer-potential-archetypes
[GSB] Yet more cleanup to realize fewer potential archetypes
2017-10-27 23:35:24 -07:00
Doug Gregor
832a154b08 [GSB] Make sure we wire up same-named type declarations consistently.
Fixes a former crasher that included well-formed code that was rejected
by my previous refactoring. Said crasher now passes, and IRGen's properly
as well. Also, account for three more fixed crashers.
2017-10-27 22:17:45 -07:00
Mark Lacey
f53826afd9 Merge pull request #12631 from rudkx/warn-on-iuo-spelling
Add a warning that ImplicitlyUnwrappedOptional is deprecated
2017-10-26 20:45:38 -07:00
Mark Lacey
e07a7362cf Add a warning that ImplicitlyUnwrappedOptional is deprecated in 4+.
Per SE-0054, implicitly unwrapped optional is not a distinct type in the
type system, but rather just the notion that certain Optionals (denoted
by the sigil "!" rather than "?") can be implicitly unwrapped.

This is a first step in the direction of implementing this notion by
emitting a warning if the type is spelled out.
2017-10-26 18:09:26 -07:00
Doug Gregor
3681cdc7a1 Add fixed crasher from rdar://problem/35019075 2017-10-26 14:08:07 -07:00
Slava Pestov
c5182e8b6b Add a regression test for rdar://problem/35088384 2017-10-24 22:47:07 -07:00
Graydon Hoare
30b6fdce83 Merge pull request #12429 from graydon/named-lazy-member-loading
Named lazy member loading 1/N
2017-10-24 14:27:04 -07:00
Jordan Rose
d09669b0df Merge pull request #12169 from jrose-apple/dance-dance-deduplication
[ClangImporter] Don't add duplicate search paths
2017-10-24 11:43:13 -07:00
Slava Pestov
31176d713a Sema: Only validate all members of a class if we access one of its members
... Or if we subclass it, or define an extension of it.
2017-10-22 20:05:01 -07:00
Graydon Hoare
d538519544 [NamedLazyMemberLoading] Skip some type-member logic for ObjC protocols. 2017-10-20 22:48:44 -07:00
Andrew Trick
b73352af7a Disable Unsafe[Raw]BufferPointer testing in optimized mode.
The optimized-build behavior of UnsafeBufferPointer bounds/overflow
checking cannot be tested. The standard library always compiles with debug
checking enabled, so the behavior of the optimized test depends on whether
the inlining heuristics decide to inline these methods. To fix this, we need
a way to force @_inlineable UnsafeBufferPointer methods to be emitted inside
the client code, and thereby subject the stdlib implementation to the test
case's compile options.
2017-10-19 21:12:09 -07:00
Greg Parker
f1fda3cd0d [test] Temporarily XFAIL two UnsafeBufferPointer tests pending rdar://35052802. 2017-10-18 10:02:54 -07:00
Greg Parker
72c65ffcaf Revert "[stdlib] Fix FloatingPoint.init(exactly:) (#11311)"
This reverts commit c9f4df84f6.
It is causing test failures on 32-bit iOS simulator and on Linux.
2017-10-18 01:17:08 -07:00
Doug Gregor
1892dbd598 Cope with ill-formed recursion in associated type overrides computation.
Fixes some crasher regressions and accounts for some newly-fixed
crashers.
2017-10-17 22:23:14 -07:00
Nate Cook
c9f4df84f6 [stdlib] Fix FloatingPoint.init(exactly:) (#11311)
* [stdlib] Fix FloatingPoint.init(exactly:)

This initializer wasn't actually checking the exact conversion. Corrects
the tests as well.
2017-10-17 13:52:11 -05:00
practicalswift
abc88eff1d [swiftc (70 vs. 5600)] Add crasher in swift::ASTContext::getConformance
Add test case for crash triggered in `swift::ASTContext::getConformance`.

Current number of unresolved compiler crashers: 70 (5600 resolved)

/cc @huonw - just wanted to let you know that this crasher caused an assertion failure for the assertion `(bool)typeSig == (bool)extensionSig && "unexpected generic-ness mismatch on conformance"` added on 2017-09-14 by you in commit 945f723d :-)

Assertion failure in [`lib/AST/ProtocolConformance.cpp (line 320)`](01416ab5bf/lib/AST/ProtocolConformance.cpp (L320)):

```
Assertion `(bool)typeSig == (bool)extensionSig && "unexpected generic-ness mismatch on conformance"' failed.

When executing: void swift::NormalProtocolConformance::differenceAndStoreConditionalRequirements()
```

Assertion context:

```c++
                     ->getGenericSignature();
  auto extensionSig = DC->getGenericSignatureOfContext();

  // If the type is generic, the extension should be too, and vice versa.
  assert((bool)typeSig == (bool)extensionSig &&
         "unexpected generic-ness mismatch on conformance");
  if (!typeSig)
    return;

  auto canExtensionSig = extensionSig->getCanonicalSignature();
  auto canTypeSig = typeSig->getCanonicalSignature();
```
Stack trace:

```
0 0x0000000003ebc124 PrintStackTraceSignalHandler(void*) (/path/to/swift/bin/swift+0x3ebc124)
1 0x0000000003ebc466 SignalHandler(int) (/path/to/swift/bin/swift+0x3ebc466)
2 0x00007f1c947e3390 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
3 0x00007f1c92d08428 gsignal /build/glibc-bfm8X4/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0
4 0x00007f1c92d0a02a abort /build/glibc-bfm8X4/glibc-2.23/stdlib/abort.c:91:0
5 0x00007f1c92d00bd7 __assert_fail_base /build/glibc-bfm8X4/glibc-2.23/assert/assert.c:92:0
6 0x00007f1c92d00c82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82)
7 0x00000000016dcc3b (/path/to/swift/bin/swift+0x16dcc3b)
8 0x00000000015ad8fc swift::ASTContext::getConformance(swift::Type, swift::ProtocolDecl*, swift::SourceLoc, swift::DeclContext*, swift::ProtocolConformanceState) (/path/to/swift/bin/swift+0x15ad8fc)
9 0x0000000001708ab3 swift::ConformanceLookupTable::getConformance(swift::NominalTypeDecl*, swift::ConformanceLookupTable::ConformanceEntry*) (/path/to/swift/bin/swift+0x1708ab3)
10 0x000000000170c53b bool __gnu_cxx::__ops::_Iter_pred<swift::ConformanceLookupTable::lookupConformances(swift::NominalTypeDecl*, swift::DeclContext*, swift::LazyResolver*, swift::ConformanceLookupKind, llvm::SmallVectorImpl<swift::ProtocolDecl*>*, llvm::SmallVectorImpl<swift::ProtocolConformance*>*, llvm::SmallVectorImpl<swift::ConformanceDiagnostic>*)::$_12>::operator()<swift::ConformanceLookupTable::ConformanceEntry**>(swift::ConformanceLookupTable::ConformanceEntry**) (/path/to/swift/bin/swift+0x170c53b)
11 0x0000000001709287 swift::ConformanceLookupTable::lookupConformances(swift::NominalTypeDecl*, swift::DeclContext*, swift::LazyResolver*, swift::ConformanceLookupKind, llvm::SmallVectorImpl<swift::ProtocolDecl*>*, llvm::SmallVectorImpl<swift::ProtocolConformance*>*, llvm::SmallVectorImpl<swift::ConformanceDiagnostic>*) (/path/to/swift/bin/swift+0x1709287)
12 0x00000000016dee3f swift::DeclContext::getLocalConformances(swift::ConformanceLookupKind, llvm::SmallVectorImpl<swift::ConformanceDiagnostic>*, bool) const (/path/to/swift/bin/swift+0x16dee3f)
13 0x00000000012ea9a6 swift::TypeChecker::checkConformancesInContext(swift::DeclContext*, swift::IterableDeclContext*) (/path/to/swift/bin/swift+0x12ea9a6)
14 0x00000000012b7898 (anonymous namespace)::DeclChecker::visitExtensionDecl(swift::ExtensionDecl*) (/path/to/swift/bin/swift+0x12b7898)
15 0x00000000012a631f (anonymous namespace)::DeclChecker::visit(swift::Decl*) (/path/to/swift/bin/swift+0x12a631f)
16 0x00000000012a6183 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) (/path/to/swift/bin/swift+0x12a6183)
17 0x0000000001338f7a swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int, unsigned int, unsigned int) (/path/to/swift/bin/swift+0x1338f7a)
18 0x0000000001057b54 swift::CompilerInstance::parseAndTypeCheckMainFile(swift::PersistentParserState&, swift::DelayedParsingCallbacks*, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>) (/path/to/swift/bin/swift+0x1057b54)
19 0x0000000001056c17 swift::CompilerInstance::parseAndCheckTypes(swift::CompilerInstance::ImplicitImports const&) (/path/to/swift/bin/swift+0x1056c17)
20 0x000000000105653a swift::CompilerInstance::performSema() (/path/to/swift/bin/swift+0x105653a)
21 0x00000000004bfec5 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) (/path/to/swift/bin/swift+0x4bfec5)
22 0x00000000004bec2b swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) (/path/to/swift/bin/swift+0x4bec2b)
23 0x0000000000476fd4 main (/path/to/swift/bin/swift+0x476fd4)
24 0x00007f1c92cf3830 __libc_start_main /build/glibc-bfm8X4/glibc-2.23/csu/../csu/libc-start.c:325:0
25 0x0000000000474889 _start (/path/to/swift/bin/swift+0x474889)
```
2017-10-17 10:11:24 +02:00
practicalswift
0d3d3efa85 [swiftc (69 vs. 5600)] Add crasher in swift::TypeBase::getSuperclassForDecl
Add test case for crash triggered in `swift::TypeBase::getSuperclassForDecl`.

Current number of unresolved compiler crashers: 69 (5600 resolved)

/cc @slavapestov - just wanted to let you know that this crasher caused an assertion failure for the assertion `t->is<ArchetypeType>() || t->isExistentialType() && "expected a class, archetype or existential"` added on 2017-04-07 by you in commit 473faf1e :-)

Assertion failure in [`lib/AST/Type.cpp (line 3245)`](ab06b148ee/lib/AST/Type.cpp (L3245)):

```
Assertion `t->is<ArchetypeType>() || t->isExistentialType() && "expected a class, archetype or existential"' failed.

When executing: swift::Type swift::TypeBase::getSuperclassForDecl(const swift::ClassDecl *)
```

Assertion context:

```c++
    // If we have a class-constrained archetype or class-constrained
    // existential, get the underlying superclass constraint.
    auto *nominalDecl = t->getAnyNominal();
    if (!nominalDecl) {
      assert(t->is<ArchetypeType>() || t->isExistentialType() &&
             "expected a class, archetype or existential");
      t = t->getSuperclass();
      assert(t && "archetype or existential is not class constrained");
      continue;
    }
    assert(isa<ClassDecl>(nominalDecl) && "expected a class here");
```
Stack trace:

```
0 0x0000000003ebc124 PrintStackTraceSignalHandler(void*) (/path/to/swift/bin/swift+0x3ebc124)
1 0x0000000003ebc466 SignalHandler(int) (/path/to/swift/bin/swift+0x3ebc466)
2 0x00007f9690e07390 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
3 0x00007f968f32c428 gsignal /build/glibc-bfm8X4/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0
4 0x00007f968f32e02a abort /build/glibc-bfm8X4/glibc-2.23/stdlib/abort.c:91:0
5 0x00007f968f324bd7 __assert_fail_base /build/glibc-bfm8X4/glibc-2.23/assert/assert.c:92:0
6 0x00007f968f324c82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82)
7 0x00000000016f4c5a swift::TypeBase::getSuperclassForDecl(swift::ClassDecl const*) (/path/to/swift/bin/swift+0x16f4c5a)
8 0x00000000016f4d5f swift::TypeBase::getContextSubstitutions(swift::DeclContext const*, swift::GenericEnvironment*) (/path/to/swift/bin/swift+0x16f4d5f)
9 0x00000000012734a1 swift::constraints::ConstraintSystem::openUnboundGenericType(swift::UnboundGenericType*, swift::constraints::ConstraintLocatorBuilder, llvm::DenseMap<swift::GenericTypeParamType*, swift::TypeVariableType*, llvm::DenseMapInfo<swift::GenericTypeParamType*>, llvm::detail::DenseMapPair<swift::GenericTypeParamType*, swift::TypeVariableType*> >&) (/path/to/swift/bin/swift+0x12734a1)
10 0x0000000001279f20 swift::Type llvm::function_ref<swift::Type (swift::Type)>::callback_fn<swift::constraints::ConstraintSystem::openUnboundGenericType(swift::Type, swift::constraints::ConstraintLocatorBuilder)::$_1>(long, swift::Type) (/path/to/swift/bin/swift+0x1279f20)
11 0x00000000016fc286 llvm::Optional<swift::Type> llvm::function_ref<llvm::Optional<swift::Type> (swift::TypeBase*)>::callback_fn<swift::Type::transform(llvm::function_ref<swift::Type (swift::Type)>) const::$_15>(long, swift::TypeBase*) (/path/to/swift/bin/swift+0x16fc286)
12 0x00000000016f56f6 swift::Type::transformRec(llvm::function_ref<llvm::Optional<swift::Type> (swift::TypeBase*)>) const (/path/to/swift/bin/swift+0x16f56f6)
13 0x00000000016f5783 swift::Type::transformRec(llvm::function_ref<llvm::Optional<swift::Type> (swift::TypeBase*)>) const (/path/to/swift/bin/swift+0x16f5783)
14 0x00000000016f60e7 swift::Type::transformRec(llvm::function_ref<llvm::Optional<swift::Type> (swift::TypeBase*)>) const (/path/to/swift/bin/swift+0x16f60e7)
15 0x00000000016eca17 swift::Type::transform(llvm::function_ref<swift::Type (swift::Type)>) const (/path/to/swift/bin/swift+0x16eca17)
16 0x0000000001273be8 swift::constraints::ConstraintSystem::openUnboundGenericType(swift::Type, swift::constraints::ConstraintLocatorBuilder) (/path/to/swift/bin/swift+0x1273be8)
17 0x000000000122c292 swift::ASTVisitor<(anonymous namespace)::ConstraintGenerator, swift::Type, void, void, void, void, void>::visit(swift::Expr*) (/path/to/swift/bin/swift+0x122c292)
18 0x00000000012320be (anonymous namespace)::ConstraintWalker::walkToExprPost(swift::Expr*) (/path/to/swift/bin/swift+0x12320be)
19 0x000000000163319c swift::Expr::walk(swift::ASTWalker&) (/path/to/swift/bin/swift+0x163319c)
20 0x0000000001228bbf swift::constraints::ConstraintSystem::generateConstraints(swift::Expr*) (/path/to/swift/bin/swift+0x1228bbf)
21 0x0000000001256a11 swift::constraints::ConstraintSystem::solve(swift::Expr*&, swift::Type, swift::ExprTypeCheckListener*, llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) (/path/to/swift/bin/swift+0x1256a11)
22 0x000000000128aae7 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>) (/path/to/swift/bin/swift+0x128aae7)
23 0x000000000128e8ac swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem*) (/path/to/swift/bin/swift+0x128e8ac)
24 0x00000000012931d6 swift::TypeChecker::typeCheckBinding(swift::Pattern*&, swift::Expr*&, swift::DeclContext*, bool) (/path/to/swift/bin/swift+0x12931d6)
25 0x0000000001293456 swift::TypeChecker::typeCheckPatternBinding(swift::PatternBindingDecl*, unsigned int, bool) (/path/to/swift/bin/swift+0x1293456)
26 0x00000000012abd98 validatePatternBindingEntries(swift::TypeChecker&, swift::PatternBindingDecl*) (/path/to/swift/bin/swift+0x12abd98)
27 0x00000000012a6338 (anonymous namespace)::DeclChecker::visit(swift::Decl*) (/path/to/swift/bin/swift+0x12a6338)
28 0x00000000012b826b (anonymous namespace)::DeclChecker::visitClassDecl(swift::ClassDecl*) (/path/to/swift/bin/swift+0x12b826b)
29 0x00000000012a63de (anonymous namespace)::DeclChecker::visit(swift::Decl*) (/path/to/swift/bin/swift+0x12a63de)
30 0x00000000012b826b (anonymous namespace)::DeclChecker::visitClassDecl(swift::ClassDecl*) (/path/to/swift/bin/swift+0x12b826b)
31 0x00000000012a63de (anonymous namespace)::DeclChecker::visit(swift::Decl*) (/path/to/swift/bin/swift+0x12a63de)
32 0x00000000012a6183 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) (/path/to/swift/bin/swift+0x12a6183)
33 0x0000000001338ef5 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int, unsigned int, unsigned int) (/path/to/swift/bin/swift+0x1338ef5)
34 0x0000000001057b54 swift::CompilerInstance::parseAndTypeCheckMainFile(swift::PersistentParserState&, swift::DelayedParsingCallbacks*, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>) (/path/to/swift/bin/swift+0x1057b54)
35 0x0000000001056c17 swift::CompilerInstance::parseAndCheckTypes(swift::CompilerInstance::ImplicitImports const&) (/path/to/swift/bin/swift+0x1056c17)
36 0x000000000105653a swift::CompilerInstance::performSema() (/path/to/swift/bin/swift+0x105653a)
37 0x00000000004bfec5 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) (/path/to/swift/bin/swift+0x4bfec5)
38 0x00000000004bec2b swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) (/path/to/swift/bin/swift+0x4bec2b)
39 0x0000000000476fd4 main (/path/to/swift/bin/swift+0x476fd4)
40 0x00007f968f317830 __libc_start_main /build/glibc-bfm8X4/glibc-2.23/csu/../csu/libc-start.c:325:0
41 0x0000000000474889 _start (/path/to/swift/bin/swift+0x474889)
```
2017-10-17 09:29:10 +02:00
practicalswift
8f4bb5b96b [swiftc (68 vs. 5600)] Add crasher in swift::TypeBase::getCanonicalType(...)
Add test case for crash triggered in `swift::TypeBase::getCanonicalType(...)`.

Current number of unresolved compiler crashers: 68 (5600 resolved)

Stack trace:

```
0 0x0000000003ebc124 PrintStackTraceSignalHandler(void*) (/path/to/swift/bin/swift+0x3ebc124)
1 0x0000000003ebc466 SignalHandler(int) (/path/to/swift/bin/swift+0x3ebc466)
2 0x00007fe07c778390 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
3 0x00000000016ee71e swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16ee71e)
4 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
5 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
6 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
7 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
8 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
9 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
10 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
11 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
12 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
13 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
14 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
15 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
16 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
17 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
18 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
19 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
20 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
21 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
22 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
23 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
24 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
25 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
26 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
27 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
28 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
29 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
30 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
31 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
32 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
33 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
34 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
35 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
36 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
37 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
38 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
39 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
40 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
41 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
42 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
43 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
44 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
45 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
46 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
47 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
48 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
49 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
50 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
51 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
52 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
53 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
54 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
55 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
56 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
57 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
58 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
59 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
60 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
61 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
62 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
63 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
64 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
65 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
66 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
67 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
68 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
69 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
70 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
71 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
72 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
73 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
74 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
75 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
76 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
77 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
78 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
79 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
80 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
81 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
82 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
83 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
84 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
85 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
86 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
87 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
88 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
89 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
90 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
91 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
92 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
93 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
94 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
95 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
96 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
97 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
98 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
99 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
100 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
101 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
102 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
103 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
104 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
105 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
106 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
107 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
108 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
109 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
110 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
111 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
112 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
113 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
114 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
115 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
116 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
117 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
118 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
119 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
120 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
121 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
122 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
123 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
124 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
125 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
126 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
127 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
128 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
129 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
130 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
131 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
132 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
133 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
134 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
135 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
136 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
137 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
138 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
139 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
140 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
141 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
142 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
143 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
144 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
145 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
146 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
147 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
148 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
149 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
150 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
151 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
152 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
153 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
154 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
155 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
156 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
157 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
158 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
159 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
160 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
161 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
162 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
163 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
164 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
165 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
166 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
167 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
168 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
169 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
170 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
171 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
172 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
173 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
174 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
175 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
176 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
177 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
178 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
179 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
180 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
181 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
182 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
183 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
184 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
185 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
186 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
187 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
188 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
189 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
190 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
191 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
192 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
193 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
194 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
195 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
196 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
197 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
198 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
199 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
200 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
201 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
202 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
203 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
204 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
205 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
206 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
207 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
208 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
209 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
210 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
211 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
212 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
213 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
214 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
215 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
216 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
217 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
218 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
219 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
220 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
221 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
222 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
223 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
224 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
225 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
226 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
227 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
228 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
229 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
230 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
231 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
232 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
233 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
234 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
235 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
236 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
237 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
238 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
239 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
240 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
241 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
242 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
243 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
244 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
245 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
246 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
247 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
248 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
249 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
250 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
251 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
252 0x00000000016ef5ea swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ef5ea)
253 0x00000000016eaff9 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16eaff9)
254 0x0000000001659ae5 swift::ProtocolDecl::getInheritedProtocols() const (/path/to/swift/bin/swift+0x1659ae5)
255 0x00000000016eeaa0 swift::ProtocolType::canonicalizeProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) (/path/to/swift/bin/swift+0x16eeaa0)
```
2017-10-17 08:14:50 +02:00
practicalswift
b5ca50619f [swiftc (67 vs. 5600)] Add crasher in swift::TypeBase::getCanonicalType(...)
Add test case for crash triggered in `swift::TypeBase::getCanonicalType(...)`.

Current number of unresolved compiler crashers: 67 (5600 resolved)

/cc @slavapestov - just wanted to let you know that this crasher caused an assertion failure for the assertion `gpDecl->getDepth() != GenericTypeParamDecl::InvalidDepth && "parameter hasn't been validated"` added on 2017-02-22 by you in commit fdb0a186 :-)

Assertion failure in [`lib/AST/Type.cpp (line 1107)`](ab72b541f9/lib/AST/Type.cpp (L1107)):

```
Assertion `gpDecl->getDepth() != GenericTypeParamDecl::InvalidDepth && "parameter hasn't been validated"' failed.

When executing: swift::CanType swift::TypeBase::getCanonicalType()
```

Assertion context:

```c++

  case TypeKind::GenericTypeParam: {
    GenericTypeParamType *gp = cast<GenericTypeParamType>(this);
    auto gpDecl = gp->getDecl();
    assert(gpDecl->getDepth() != GenericTypeParamDecl::InvalidDepth &&
           "parameter hasn't been validated");
    Result = GenericTypeParamType::get(gpDecl->getDepth(), gpDecl->getIndex(),
                                       gpDecl->getASTContext());
    break;
  }

```
Stack trace:

```
0 0x0000000003eb9144 PrintStackTraceSignalHandler(void*) (/path/to/swift/bin/swift+0x3eb9144)
1 0x0000000003eb9486 SignalHandler(int) (/path/to/swift/bin/swift+0x3eb9486)
2 0x00007ff3236da390 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
3 0x00007ff321bff428 gsignal /build/glibc-bfm8X4/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0
4 0x00007ff321c0102a abort /build/glibc-bfm8X4/glibc-2.23/stdlib/abort.c:91:0
5 0x00007ff321bf7bd7 __assert_fail_base /build/glibc-bfm8X4/glibc-2.23/assert/assert.c:92:0
6 0x00007ff321bf7c82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82)
7 0x00000000016e8c57 swift::TypeBase::getCanonicalType() (/path/to/swift/bin/swift+0x16e8c57)
8 0x00000000016e8e6c swift::QuerySubstitutionMap::operator()(swift::SubstitutableType*) const (/path/to/swift/bin/swift+0x16e8e6c)
9 0x00000000016f68e9 llvm::Optional<swift::Type> llvm::function_ref<llvm::Optional<swift::Type> (swift::TypeBase*)>::callback_fn<substType(swift::Type, llvm::function_ref<swift::Type (swift::SubstitutableType*)>, llvm::function_ref<llvm::Optional<swift::ProtocolConformanceRef> (swift::CanType, swift::Type, swift::ProtocolType*)>, swift::SubstOptions)::$_20>(long, swift::TypeBase*) (/path/to/swift/bin/swift+0x16f68e9)
10 0x00000000016f2d86 swift::Type::transformRec(llvm::function_ref<llvm::Optional<swift::Type> (swift::TypeBase*)>) const (/path/to/swift/bin/swift+0x16f2d86)
11 0x00000000016f309d swift::Type::transformRec(llvm::function_ref<llvm::Optional<swift::Type> (swift::TypeBase*)>) const (/path/to/swift/bin/swift+0x16f309d)
12 0x00000000016edf35 swift::Type::subst(swift::SubstitutionMap const&, swift::SubstOptions) const (/path/to/swift/bin/swift+0x16edf35)
13 0x0000000000f51803 llvm::Optional<swift::Requirement> swift::Requirement::subst<swift::SubstitutionMap&>(swift::SubstitutionMap&) const (/path/to/swift/bin/swift+0xf51803)
14 0x000000000168fc42 swift::GenericSignatureBuilder::expandConformanceRequirement(swift::GenericSignatureBuilder::PotentialArchetype*, swift::ProtocolDecl*, swift::GenericSignatureBuilder::RequirementSource const*, bool)::$_16::operator()(swift::TypeDecl*, swift::TypeDecl*) const (/path/to/swift/bin/swift+0x168fc42)
15 0x000000000168ec4f swift::GenericSignatureBuilder::expandConformanceRequirement(swift::GenericSignatureBuilder::PotentialArchetype*, swift::ProtocolDecl*, swift::GenericSignatureBuilder::RequirementSource const*, bool) (/path/to/swift/bin/swift+0x168ec4f)
16 0x00000000016914d9 swift::GenericSignatureBuilder::addTypeRequirement(llvm::PointerUnion<swift::GenericSignatureBuilder::PotentialArchetype*, swift::Type>, llvm::PointerUnion<swift::GenericSignatureBuilder::PotentialArchetype*, swift::Type>, swift::GenericSignatureBuilder::FloatingRequirementSource, swift::GenericSignatureBuilder::UnresolvedHandlingKind, swift::ModuleDecl*) (/path/to/swift/bin/swift+0x16914d9)
17 0x00000000016a8c1d swift::GenericSignatureBuilder::ConstraintResult llvm::function_ref<swift::GenericSignatureBuilder::ConstraintResult (swift::Type, swift::TypeRepr const*)>::callback_fn<swift::GenericSignatureBuilder::addInheritedRequirements(swift::TypeDecl*, llvm::PointerUnion<swift::GenericSignatureBuilder::PotentialArchetype*, swift::Type>, swift::GenericSignatureBuilder::RequirementSource const*, swift::ModuleDecl*)::$_23>(long, swift::Type, swift::TypeRepr const*) (/path/to/swift/bin/swift+0x16a8c1d)
18 0x000000000169ee12 std::_Function_handler<void (swift::Type, swift::TypeRepr const*), visitInherited(llvm::ArrayRef<swift::TypeLoc>, llvm::function_ref<swift::GenericSignatureBuilder::ConstraintResult (swift::Type, swift::TypeRepr const*)>)::$_55>::_M_invoke(std::_Any_data const&, swift::Type&&, swift::TypeRepr const*&&) (/path/to/swift/bin/swift+0x169ee12)
19 0x000000000168d29e swift::GenericSignatureBuilder::addInheritedRequirements(swift::TypeDecl*, llvm::PointerUnion<swift::GenericSignatureBuilder::PotentialArchetype*, swift::Type>, swift::GenericSignatureBuilder::RequirementSource const*, swift::ModuleDecl*) (/path/to/swift/bin/swift+0x168d29e)
20 0x000000000168d8ee swift::GenericSignatureBuilder::expandConformanceRequirement(swift::GenericSignatureBuilder::PotentialArchetype*, swift::ProtocolDecl*, swift::GenericSignatureBuilder::RequirementSource const*, bool) (/path/to/swift/bin/swift+0x168d8ee)
21 0x00000000016914d9 swift::GenericSignatureBuilder::addTypeRequirement(llvm::PointerUnion<swift::GenericSignatureBuilder::PotentialArchetype*, swift::Type>, llvm::PointerUnion<swift::GenericSignatureBuilder::PotentialArchetype*, swift::Type>, swift::GenericSignatureBuilder::FloatingRequirementSource, swift::GenericSignatureBuilder::UnresolvedHandlingKind, swift::ModuleDecl*) (/path/to/swift/bin/swift+0x16914d9)
22 0x00000000016a8c1d swift::GenericSignatureBuilder::ConstraintResult llvm::function_ref<swift::GenericSignatureBuilder::ConstraintResult (swift::Type, swift::TypeRepr const*)>::callback_fn<swift::GenericSignatureBuilder::addInheritedRequirements(swift::TypeDecl*, llvm::PointerUnion<swift::GenericSignatureBuilder::PotentialArchetype*, swift::Type>, swift::GenericSignatureBuilder::RequirementSource const*, swift::ModuleDecl*)::$_23>(long, swift::Type, swift::TypeRepr const*) (/path/to/swift/bin/swift+0x16a8c1d)
23 0x000000000169ee12 std::_Function_handler<void (swift::Type, swift::TypeRepr const*), visitInherited(llvm::ArrayRef<swift::TypeLoc>, llvm::function_ref<swift::GenericSignatureBuilder::ConstraintResult (swift::Type, swift::TypeRepr const*)>)::$_55>::_M_invoke(std::_Any_data const&, swift::Type&&, swift::TypeRepr const*&&) (/path/to/swift/bin/swift+0x169ee12)
24 0x000000000168d29e swift::GenericSignatureBuilder::addInheritedRequirements(swift::TypeDecl*, llvm::PointerUnion<swift::GenericSignatureBuilder::PotentialArchetype*, swift::Type>, swift::GenericSignatureBuilder::RequirementSource const*, swift::ModuleDecl*) (/path/to/swift/bin/swift+0x168d29e)
25 0x000000000168d60c swift::GenericSignatureBuilder::expandConformanceRequirement(swift::GenericSignatureBuilder::PotentialArchetype*, swift::ProtocolDecl*, swift::GenericSignatureBuilder::RequirementSource const*, bool) (/path/to/swift/bin/swift+0x168d60c)
26 0x00000000016914d9 swift::GenericSignatureBuilder::addTypeRequirement(llvm::PointerUnion<swift::GenericSignatureBuilder::PotentialArchetype*, swift::Type>, llvm::PointerUnion<swift::GenericSignatureBuilder::PotentialArchetype*, swift::Type>, swift::GenericSignatureBuilder::FloatingRequirementSource, swift::GenericSignatureBuilder::UnresolvedHandlingKind, swift::ModuleDecl*) (/path/to/swift/bin/swift+0x16914d9)
27 0x00000000016a8c1d swift::GenericSignatureBuilder::ConstraintResult llvm::function_ref<swift::GenericSignatureBuilder::ConstraintResult (swift::Type, swift::TypeRepr const*)>::callback_fn<swift::GenericSignatureBuilder::addInheritedRequirements(swift::TypeDecl*, llvm::PointerUnion<swift::GenericSignatureBuilder::PotentialArchetype*, swift::Type>, swift::GenericSignatureBuilder::RequirementSource const*, swift::ModuleDecl*)::$_23>(long, swift::Type, swift::TypeRepr const*) (/path/to/swift/bin/swift+0x16a8c1d)
28 0x000000000169ee12 std::_Function_handler<void (swift::Type, swift::TypeRepr const*), visitInherited(llvm::ArrayRef<swift::TypeLoc>, llvm::function_ref<swift::GenericSignatureBuilder::ConstraintResult (swift::Type, swift::TypeRepr const*)>)::$_55>::_M_invoke(std::_Any_data const&, swift::Type&&, swift::TypeRepr const*&&) (/path/to/swift/bin/swift+0x169ee12)
29 0x000000000168d29e swift::GenericSignatureBuilder::addInheritedRequirements(swift::TypeDecl*, llvm::PointerUnion<swift::GenericSignatureBuilder::PotentialArchetype*, swift::Type>, swift::GenericSignatureBuilder::RequirementSource const*, swift::ModuleDecl*) (/path/to/swift/bin/swift+0x168d29e)
30 0x000000000168d8ee swift::GenericSignatureBuilder::expandConformanceRequirement(swift::GenericSignatureBuilder::PotentialArchetype*, swift::ProtocolDecl*, swift::GenericSignatureBuilder::RequirementSource const*, bool) (/path/to/swift/bin/swift+0x168d8ee)
31 0x00000000016914d9 swift::GenericSignatureBuilder::addTypeRequirement(llvm::PointerUnion<swift::GenericSignatureBuilder::PotentialArchetype*, swift::Type>, llvm::PointerUnion<swift::GenericSignatureBuilder::PotentialArchetype*, swift::Type>, swift::GenericSignatureBuilder::FloatingRequirementSource, swift::GenericSignatureBuilder::UnresolvedHandlingKind, swift::ModuleDecl*) (/path/to/swift/bin/swift+0x16914d9)
32 0x000000000168547c swift::GenericSignatureBuilder::addRequirement(swift::Requirement const&, swift::GenericSignatureBuilder::FloatingRequirementSource, swift::ModuleDecl*) (/path/to/swift/bin/swift+0x168547c)
33 0x000000000169d0dc swift::GenericSignatureBuilder::computeRequirementSignature(swift::ProtocolDecl*) (/path/to/swift/bin/swift+0x169d0dc)
34 0x0000000001658ed6 swift::ProtocolDecl::computeRequirementSignature() (/path/to/swift/bin/swift+0x1658ed6)
35 0x00000000012d7b48 swift::TypeChecker::validateGenericTypeSignature(swift::GenericTypeDecl*) (/path/to/swift/bin/swift+0x12d7b48)
36 0x00000000012a5ab8 swift::TypeChecker::validateDecl(swift::ValueDecl*) (/path/to/swift/bin/swift+0x12a5ab8)
37 0x00000000012b6ba4 (anonymous namespace)::DeclChecker::visitProtocolDecl(swift::ProtocolDecl*) (/path/to/swift/bin/swift+0x12b6ba4)
38 0x00000000012a3c4f (anonymous namespace)::DeclChecker::visit(swift::Decl*) (/path/to/swift/bin/swift+0x12a3c4f)
39 0x00000000012a3ae3 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) (/path/to/swift/bin/swift+0x12a3ae3)
40 0x00000000013367f5 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int, unsigned int, unsigned int) (/path/to/swift/bin/swift+0x13367f5)
41 0x0000000001056f44 swift::CompilerInstance::parseAndTypeCheckMainFile(swift::PersistentParserState&, swift::DelayedParsingCallbacks*, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>) (/path/to/swift/bin/swift+0x1056f44)
42 0x0000000001056007 swift::CompilerInstance::parseAndCheckTypes(swift::CompilerInstance::ImplicitImports const&) (/path/to/swift/bin/swift+0x1056007)
43 0x000000000105592a swift::CompilerInstance::performSema() (/path/to/swift/bin/swift+0x105592a)
44 0x00000000004bfed2 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) (/path/to/swift/bin/swift+0x4bfed2)
45 0x00000000004bec2b swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) (/path/to/swift/bin/swift+0x4bec2b)
46 0x0000000000476fd4 main (/path/to/swift/bin/swift+0x476fd4)
47 0x00007ff321bea830 __libc_start_main /build/glibc-bfm8X4/glibc-2.23/csu/../csu/libc-start.c:325:0
48 0x0000000000474889 _start (/path/to/swift/bin/swift+0x474889)
```
2017-10-12 23:14:55 +02:00
practicalswift
4f27b78562 [swiftc (66 vs. 5600)] Add crasher in swift::TypeChecker::resolveTypeWitness
Add test case for crash triggered in `swift::TypeChecker::resolveTypeWitness`.

Current number of unresolved compiler crashers: 66 (5600 resolved)

/cc @jtbandes - just wanted to let you know that this crasher caused an assertion failure for the assertion `(!isComplete() || isInvalid()) && "Conformance already complete?"` added on 2016-01-07 by you in commit 8cc8c5cc :-)

Assertion failure in [`lib/AST/ProtocolConformance.cpp (line 542)`](9ec6587ec3/lib/AST/ProtocolConformance.cpp (L542)):

```
Assertion `(!isComplete() || isInvalid()) && "Conformance already complete?"' failed.

When executing: void swift::NormalProtocolConformance::setTypeWitness(swift::AssociatedTypeDecl *, swift::Type, swift::TypeDecl *) const
```

Assertion context:

```c++
                                               Type type,
                                               TypeDecl *typeDecl) const {
  assert(getProtocol() == cast<ProtocolDecl>(assocType->getDeclContext()) &&
         "associated type in wrong protocol");
  assert(TypeWitnesses.count(assocType) == 0 && "Type witness already known");
  assert((!isComplete() || isInvalid()) && "Conformance already complete?");
  TypeWitnesses[assocType] = std::make_pair(type, typeDecl);
}

Type ProtocolConformance::getAssociatedType(Type assocType,
                                            LazyResolver *resolver) const {
```
Stack trace:

```
0 0x0000000003eb9144 PrintStackTraceSignalHandler(void*) (/path/to/swift/bin/swift+0x3eb9144)
1 0x0000000003eb9486 SignalHandler(int) (/path/to/swift/bin/swift+0x3eb9486)
2 0x00007f7723992390 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
3 0x00007f7721eb7428 gsignal /build/glibc-bfm8X4/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0
4 0x00007f7721eb902a abort /build/glibc-bfm8X4/glibc-2.23/stdlib/abort.c:91:0
5 0x00007f7721eafbd7 __assert_fail_base /build/glibc-bfm8X4/glibc-2.23/assert/assert.c:92:0
6 0x00007f7721eafc82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82)
7 0x00000000016dabd6 (/path/to/swift/bin/swift+0x16dabd6)
8 0x0000000001303613 (anonymous namespace)::ConformanceChecker::recordTypeWitness(swift::AssociatedTypeDecl*, swift::Type, swift::TypeDecl*, bool) (/path/to/swift/bin/swift+0x1303613)
9 0x0000000001300778 (anonymous namespace)::ConformanceChecker::resolveTypeWitnessViaLookup(swift::AssociatedTypeDecl*) (/path/to/swift/bin/swift+0x1300778)
10 0x00000000012eca30 swift::TypeChecker::resolveTypeWitness(swift::NormalProtocolConformance const*, swift::AssociatedTypeDecl*) (/path/to/swift/bin/swift+0x12eca30)
11 0x00000000016d92f3 swift::NormalProtocolConformance::getTypeWitnessAndDecl(swift::AssociatedTypeDecl*, swift::LazyResolver*, swift::SubstOptions) const (/path/to/swift/bin/swift+0x16d92f3)
12 0x00000000016d9018 swift::ProtocolConformance::getTypeWitnessAndDecl(swift::AssociatedTypeDecl*, swift::LazyResolver*, swift::SubstOptions) const (/path/to/swift/bin/swift+0x16d9018)
13 0x00000000012da41b (anonymous namespace)::LookupResultBuilder::add(swift::ValueDecl*, swift::DeclContext*, swift::Type) (/path/to/swift/bin/swift+0x12da41b)
14 0x00000000012da031 swift::TypeChecker::lookupUnqualified(swift::DeclContext*, swift::DeclName, swift::SourceLoc, swift::OptionSet<swift::NameLookupFlags, unsigned int>) (/path/to/swift/bin/swift+0x12da031)
15 0x00000000012865b6 swift::TypeChecker::resolveDeclRefExpr(swift::UnresolvedDeclRefExpr*, swift::DeclContext*) (/path/to/swift/bin/swift+0x12865b6)
16 0x0000000001295062 (anonymous namespace)::PreCheckExpression::walkToExprPre(swift::Expr*) (/path/to/swift/bin/swift+0x1295062)
17 0x0000000001630d6b swift::Expr::walk(swift::ASTWalker&) (/path/to/swift/bin/swift+0x1630d6b)
18 0x000000000128827a swift::TypeChecker::preCheckExpression(swift::Expr*&, swift::DeclContext*) (/path/to/swift/bin/swift+0x128827a)
19 0x000000000128bfcb swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem*) (/path/to/swift/bin/swift+0x128bfcb)
20 0x0000000001290b36 swift::TypeChecker::typeCheckBinding(swift::Pattern*&, swift::Expr*&, swift::DeclContext*, bool) (/path/to/swift/bin/swift+0x1290b36)
21 0x0000000001290db6 swift::TypeChecker::typeCheckPatternBinding(swift::PatternBindingDecl*, unsigned int, bool) (/path/to/swift/bin/swift+0x1290db6)
22 0x00000000012a96f8 validatePatternBindingEntries(swift::TypeChecker&, swift::PatternBindingDecl*) (/path/to/swift/bin/swift+0x12a96f8)
23 0x00000000012a3c98 (anonymous namespace)::DeclChecker::visit(swift::Decl*) (/path/to/swift/bin/swift+0x12a3c98)
24 0x00000000012b5bcb (anonymous namespace)::DeclChecker::visitClassDecl(swift::ClassDecl*) (/path/to/swift/bin/swift+0x12b5bcb)
25 0x00000000012a3d3e (anonymous namespace)::DeclChecker::visit(swift::Decl*) (/path/to/swift/bin/swift+0x12a3d3e)
26 0x00000000012a3ae3 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) (/path/to/swift/bin/swift+0x12a3ae3)
27 0x00000000013173c5 swift::ASTVisitor<(anonymous namespace)::StmtChecker, void, swift::Stmt*, void, void, void, void>::visit(swift::Stmt*) (/path/to/swift/bin/swift+0x13173c5)
28 0x0000000001316526 (anonymous namespace)::StmtChecker::typeCheckBody(swift::BraceStmt*&) (/path/to/swift/bin/swift+0x1316526)
29 0x0000000001316af4 swift::TypeChecker::typeCheckClosureBody(swift::ClosureExpr*) (/path/to/swift/bin/swift+0x1316af4)
30 0x000000000133c2bb swift::constraints::ConstraintSystem::applySolution(swift::constraints::Solution&, swift::Expr*, swift::Type, bool, bool, bool) (/path/to/swift/bin/swift+0x133c2bb)
31 0x000000000128c306 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem*) (/path/to/swift/bin/swift+0x128c306)
32 0x0000000001317425 swift::ASTVisitor<(anonymous namespace)::StmtChecker, void, swift::Stmt*, void, void, void, void>::visit(swift::Stmt*) (/path/to/swift/bin/swift+0x1317425)
33 0x0000000001316c36 swift::TypeChecker::typeCheckTopLevelCodeDecl(swift::TopLevelCodeDecl*) (/path/to/swift/bin/swift+0x1316c36)
34 0x0000000001336860 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int, unsigned int, unsigned int) (/path/to/swift/bin/swift+0x1336860)
35 0x0000000001056f44 swift::CompilerInstance::parseAndTypeCheckMainFile(swift::PersistentParserState&, swift::DelayedParsingCallbacks*, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>) (/path/to/swift/bin/swift+0x1056f44)
36 0x0000000001056007 swift::CompilerInstance::parseAndCheckTypes(swift::CompilerInstance::ImplicitImports const&) (/path/to/swift/bin/swift+0x1056007)
37 0x000000000105592a swift::CompilerInstance::performSema() (/path/to/swift/bin/swift+0x105592a)
38 0x00000000004bfed2 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) (/path/to/swift/bin/swift+0x4bfed2)
39 0x00000000004bec2b swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) (/path/to/swift/bin/swift+0x4bec2b)
40 0x0000000000476fd4 main (/path/to/swift/bin/swift+0x476fd4)
41 0x00007f7721ea2830 __libc_start_main /build/glibc-bfm8X4/glibc-2.23/csu/../csu/libc-start.c:325:0
42 0x0000000000474889 _start (/path/to/swift/bin/swift+0x474889)
```
2017-10-12 22:23:20 +02:00
practicalswift
4aa8a006bc [swiftc (65 vs. 5600)] Add crasher in swift::NormalProtocolConformance::getTypeWitnessAndDecl
Add test case for crash triggered in `swift::NormalProtocolConformance::getTypeWitnessAndDecl`.

Current number of unresolved compiler crashers: 65 (5600 resolved)

/cc @slavapestov - just wanted to let you know that this crasher caused an assertion failure for the assertion `resolver && "Unable to resolve type witness"` added on 2017-09-12 by you in commit e26949d3 :-)

Assertion failure in [`lib/AST/ProtocolConformance.cpp (line 528)`](1a9533ca7e/lib/AST/ProtocolConformance.cpp (L528)):

```
Assertion `resolver && "Unable to resolve type witness"' failed.

When executing: std::pair<Type, TypeDecl *> swift::NormalProtocolConformance::getTypeWitnessAndDecl(swift::AssociatedTypeDecl *, swift::LazyResolver *, swift::SubstOptions) const
```

Assertion context:

```c++
    return { Type(), nullptr };
  }

  // Otherwise, resolve the type witness.
  PrettyStackTraceRequirement trace("resolving", this, assocType);
  assert(resolver && "Unable to resolve type witness");
  resolver->resolveTypeWitness(this, assocType);

  known = TypeWitnesses.find(assocType);
  assert(known != TypeWitnesses.end() && "Didn't resolve witness?");
  return known->second;
```
Stack trace:

```
0 0x0000000003eb9144 PrintStackTraceSignalHandler(void*) (/path/to/swift/bin/swift+0x3eb9144)
1 0x0000000003eb9486 SignalHandler(int) (/path/to/swift/bin/swift+0x3eb9486)
2 0x00007f91ecfd4390 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
3 0x00007f91eb4f9428 gsignal /build/glibc-bfm8X4/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0
4 0x00007f91eb4fb02a abort /build/glibc-bfm8X4/glibc-2.23/stdlib/abort.c:91:0
5 0x00007f91eb4f1bd7 __assert_fail_base /build/glibc-bfm8X4/glibc-2.23/assert/assert.c:92:0
6 0x00007f91eb4f1c82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82)
7 0x00000000016d93dc swift::NormalProtocolConformance::getTypeWitnessAndDecl(swift::AssociatedTypeDecl*, swift::LazyResolver*, swift::SubstOptions) const (/path/to/swift/bin/swift+0x16d93dc)
8 0x00000000016d9018 swift::ProtocolConformance::getTypeWitnessAndDecl(swift::AssociatedTypeDecl*, swift::LazyResolver*, swift::SubstOptions) const (/path/to/swift/bin/swift+0x16d9018)
9 0x00000000016d8b39 swift::ProtocolConformance::getTypeWitness(swift::AssociatedTypeDecl*, swift::LazyResolver*, swift::SubstOptions) const (/path/to/swift/bin/swift+0x16d8b39)
10 0x00000000012f0e98 (anonymous namespace)::ConformanceChecker::resolveWitnessViaLookup(swift::ValueDecl*) (/path/to/swift/bin/swift+0x12f0e98)
11 0x00000000012e77ac (anonymous namespace)::MultiConformanceChecker::checkAllConformances() (/path/to/swift/bin/swift+0x12e77ac)
12 0x00000000012e8d3b swift::TypeChecker::checkConformancesInContext(swift::DeclContext*, swift::IterableDeclContext*) (/path/to/swift/bin/swift+0x12e8d3b)
13 0x00000000012b5b9d (anonymous namespace)::DeclChecker::visitClassDecl(swift::ClassDecl*) (/path/to/swift/bin/swift+0x12b5b9d)
14 0x00000000012a3d3e (anonymous namespace)::DeclChecker::visit(swift::Decl*) (/path/to/swift/bin/swift+0x12a3d3e)
15 0x00000000012a3ae3 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) (/path/to/swift/bin/swift+0x12a3ae3)
16 0x000000000133687a swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int, unsigned int, unsigned int) (/path/to/swift/bin/swift+0x133687a)
17 0x0000000001056f44 swift::CompilerInstance::parseAndTypeCheckMainFile(swift::PersistentParserState&, swift::DelayedParsingCallbacks*, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>) (/path/to/swift/bin/swift+0x1056f44)
18 0x0000000001056007 swift::CompilerInstance::parseAndCheckTypes(swift::CompilerInstance::ImplicitImports const&) (/path/to/swift/bin/swift+0x1056007)
19 0x000000000105592a swift::CompilerInstance::performSema() (/path/to/swift/bin/swift+0x105592a)
20 0x00000000004bfed2 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) (/path/to/swift/bin/swift+0x4bfed2)
21 0x00000000004bec2b swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) (/path/to/swift/bin/swift+0x4bec2b)
22 0x0000000000476fd4 main (/path/to/swift/bin/swift+0x476fd4)
23 0x00007f91eb4e4830 __libc_start_main /build/glibc-bfm8X4/glibc-2.23/csu/../csu/libc-start.c:325:0
24 0x0000000000474889 _start (/path/to/swift/bin/swift+0x474889)
```
2017-10-12 20:51:57 +02:00
practicalswift
ff809fd72c [swiftc (64 vs. 5600)] Add crasher in swift::ProtocolCompositionType::get
Add test case for crash triggered in `swift::ProtocolCompositionType::get`.

Current number of unresolved compiler crashers: 64 (5600 resolved)

Assertion failure in `llvm/include/llvm/Support/Casting.h (line 106)`:

```
Assertion `Val && "isa<> used on a null pointer"' failed.

When executing: static bool llvm::isa_impl_cl<swift::ClassDecl, const swift::NominalTypeDecl *>::doit(const From *) [To = swift::ClassDecl, From = const swift::NominalTypeDecl *]
```

Assertion context:

```c++
  }
};

template <typename To, typename From> struct isa_impl_cl<To, const From*> {
  static inline bool doit(const From *Val) {
    assert(Val && "isa<> used on a null pointer");
    return isa_impl<To, From>::doit(*Val);
  }
};

template <typename To, typename From> struct isa_impl_cl<To, const From*const> {
```
Stack trace:

```
0 0x0000000003eb9144 PrintStackTraceSignalHandler(void*) (/path/to/swift/bin/swift+0x3eb9144)
1 0x0000000003eb9486 SignalHandler(int) (/path/to/swift/bin/swift+0x3eb9486)
2 0x00007fcbd737c390 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
3 0x00007fcbd58a1428 gsignal /build/glibc-bfm8X4/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0
4 0x00007fcbd58a302a abort /build/glibc-bfm8X4/glibc-2.23/stdlib/abort.c:91:0
5 0x00007fcbd5899bd7 __assert_fail_base /build/glibc-bfm8X4/glibc-2.23/assert/assert.c:92:0
6 0x00007fcbd5899c82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82)
7 0x00000000016f139d addProtocols(swift::Type, llvm::SmallVectorImpl<swift::ProtocolDecl*>&, swift::Type&, bool&) (/path/to/swift/bin/swift+0x16f139d)
8 0x00000000016ecc61 swift::ProtocolCompositionType::get(swift::ASTContext const&, llvm::ArrayRef<swift::Type>, bool) (/path/to/swift/bin/swift+0x16ecc61)
9 0x00000000016f4555 swift::Type::transformRec(llvm::function_ref<llvm::Optional<swift::Type> (swift::TypeBase*)>) const (/path/to/swift/bin/swift+0x16f4555)
10 0x00000000016ea0a7 swift::Type::transform(llvm::function_ref<swift::Type (swift::Type)>) const (/path/to/swift/bin/swift+0x16ea0a7)
11 0x0000000001271548 swift::constraints::ConstraintSystem::openUnboundGenericType(swift::Type, swift::constraints::ConstraintLocatorBuilder) (/path/to/swift/bin/swift+0x1271548)
12 0x0000000001228157 swift::ASTVisitor<(anonymous namespace)::ConstraintGenerator, swift::Type, void, void, void, void, void>::visit(swift::Expr*) (/path/to/swift/bin/swift+0x1228157)
13 0x000000000122fa0e (anonymous namespace)::ConstraintWalker::walkToExprPost(swift::Expr*) (/path/to/swift/bin/swift+0x122fa0e)
14 0x0000000001630dbc swift::Expr::walk(swift::ASTWalker&) (/path/to/swift/bin/swift+0x1630dbc)
15 0x00000000012264cf swift::constraints::ConstraintSystem::generateConstraints(swift::Expr*) (/path/to/swift/bin/swift+0x12264cf)
16 0x0000000001254361 swift::constraints::ConstraintSystem::solve(swift::Expr*&, swift::Type, swift::ExprTypeCheckListener*, llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) (/path/to/swift/bin/swift+0x1254361)
17 0x0000000001288447 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>) (/path/to/swift/bin/swift+0x1288447)
18 0x000000000128c20c swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem*) (/path/to/swift/bin/swift+0x128c20c)
19 0x0000000001290b36 swift::TypeChecker::typeCheckBinding(swift::Pattern*&, swift::Expr*&, swift::DeclContext*, bool) (/path/to/swift/bin/swift+0x1290b36)
20 0x0000000001290db6 swift::TypeChecker::typeCheckPatternBinding(swift::PatternBindingDecl*, unsigned int, bool) (/path/to/swift/bin/swift+0x1290db6)
21 0x00000000012a96f8 validatePatternBindingEntries(swift::TypeChecker&, swift::PatternBindingDecl*) (/path/to/swift/bin/swift+0x12a96f8)
22 0x00000000012a3c98 (anonymous namespace)::DeclChecker::visit(swift::Decl*) (/path/to/swift/bin/swift+0x12a3c98)
23 0x00000000012a3ae3 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) (/path/to/swift/bin/swift+0x12a3ae3)
24 0x00000000013173c5 swift::ASTVisitor<(anonymous namespace)::StmtChecker, void, swift::Stmt*, void, void, void, void>::visit(swift::Stmt*) (/path/to/swift/bin/swift+0x13173c5)
25 0x0000000001316c36 swift::TypeChecker::typeCheckTopLevelCodeDecl(swift::TopLevelCodeDecl*) (/path/to/swift/bin/swift+0x1316c36)
26 0x0000000001336860 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int, unsigned int, unsigned int) (/path/to/swift/bin/swift+0x1336860)
27 0x0000000001056f44 swift::CompilerInstance::parseAndTypeCheckMainFile(swift::PersistentParserState&, swift::DelayedParsingCallbacks*, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>) (/path/to/swift/bin/swift+0x1056f44)
28 0x0000000001056007 swift::CompilerInstance::parseAndCheckTypes(swift::CompilerInstance::ImplicitImports const&) (/path/to/swift/bin/swift+0x1056007)
29 0x000000000105592a swift::CompilerInstance::performSema() (/path/to/swift/bin/swift+0x105592a)
30 0x00000000004bfed2 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) (/path/to/swift/bin/swift+0x4bfed2)
31 0x00000000004bec2b swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) (/path/to/swift/bin/swift+0x4bec2b)
32 0x0000000000476fd4 main (/path/to/swift/bin/swift+0x476fd4)
33 0x00007fcbd588c830 __libc_start_main /build/glibc-bfm8X4/glibc-2.23/csu/../csu/libc-start.c:325:0
34 0x0000000000474889 _start (/path/to/swift/bin/swift+0x474889)
```
2017-10-12 20:03:33 +02:00
practicalswift
964e6036e6 [swiftc (63 vs. 5600)] Add crasher in swift::GenericSignatureBuilder::RequirementSource::getMinimalConformanceSource
Add test case for crash triggered in `swift::GenericSignatureBuilder::RequirementSource::getMinimalConformanceSource`.

Current number of unresolved compiler crashers: 63 (5600 resolved)

/cc @DougGregor - just wanted to let you know that this crasher caused an assertion failure for the assertion `nestedPAByName && "Didn't find the associated type we wanted"` added on 2017-03-23 by you in commit 8bd863e6 :-)

Assertion failure in [`lib/AST/GenericSignatureBuilder.cpp (line 640)`](f1d8f94b6d/lib/AST/GenericSignatureBuilder.cpp (L640)):

```
Assertion `nestedPAByName && "Didn't find the associated type we wanted"' failed.

When executing: PotentialArchetype *replaceSelfWithPotentialArchetype(PotentialArchetype *, swift::Type)
```

Assertion context:

```c++

      if (auto result = findNested(otherBasePA))
        return result;
    }

    assert(nestedPAByName && "Didn't find the associated type we wanted");
    return nestedPAByName;
  }

  assert(depTy->is<GenericTypeParamType>() && "missing Self?");
  return selfPA;
```
Stack trace:

```
0 0x0000000003eb9144 PrintStackTraceSignalHandler(void*) (/path/to/swift/bin/swift+0x3eb9144)
1 0x0000000003eb9486 SignalHandler(int) (/path/to/swift/bin/swift+0x3eb9486)
2 0x00007f81bfff8390 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
3 0x00007f81be51d428 gsignal /build/glibc-bfm8X4/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0
4 0x00007f81be51f02a abort /build/glibc-bfm8X4/glibc-2.23/stdlib/abort.c:91:0
5 0x00007f81be515bd7 __assert_fail_base /build/glibc-bfm8X4/glibc-2.23/assert/assert.c:92:0
6 0x00007f81be515c82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82)
7 0x0000000001680b5c replaceSelfWithPotentialArchetype(swift::GenericSignatureBuilder::PotentialArchetype*, swift::Type) (/path/to/swift/bin/swift+0x1680b5c)
8 0x000000000167edba swift::GenericSignatureBuilder::RequirementSource::getMinimalConformanceSource(swift::GenericSignatureBuilder::PotentialArchetype*, swift::ProtocolDecl*, bool&) const (/path/to/swift/bin/swift+0x167edba)
9 0x000000000167ef35 swift::GenericSignatureBuilder::RequirementSource::getMinimalConformanceSource(swift::GenericSignatureBuilder::PotentialArchetype*, swift::ProtocolDecl*, bool&) const (/path/to/swift/bin/swift+0x167ef35)
10 0x00000000016aa278 bool __gnu_cxx::__ops::_Iter_pred<bool (anonymous namespace)::removeSelfDerived<swift::GenericSignatureBuilder::PotentialArchetype*>(std::vector<swift::GenericSignatureBuilder::Constraint<swift::GenericSignatureBuilder::PotentialArchetype*>, std::allocator<swift::GenericSignatureBuilder::Constraint<swift::GenericSignatureBuilder::PotentialArchetype*> > >&, swift::ProtocolDecl*, bool, bool)::{lambda(swift::GenericSignatureBuilder::Constraint<swift::GenericSignatureBuilder::PotentialArchetype*> const&)#1}>::operator()<__gnu_cxx::__normal_iterator<swift::GenericSignatureBuilder::Constraint<swift::GenericSignatureBuilder::PotentialArchetype*>*, std::vector<swift::GenericSignatureBuilder::Constraint<swift::GenericSignatureBuilder::PotentialArchetype*>, std::allocator<swift::GenericSignatureBuilder::Constraint<swift::GenericSignatureBuilder::PotentialArchetype*> > > > >(__gnu_cxx::__normal_iterator<swift::GenericSignatureBuilder::Constraint<swift::GenericSignatureBuilder::PotentialArchetype*>*, std::vector<swift::GenericSignatureBuilder::Constraint<swift::GenericSignatureBuilder::PotentialArchetype*>, std::allocator<swift::GenericSignatureBuilder::Constraint<swift::GenericSignatureBuilder::PotentialArchetype*> > > >) (/path/to/swift/bin/swift+0x16aa278)
11 0x000000000169aeb3 bool (anonymous namespace)::removeSelfDerived<swift::GenericSignatureBuilder::PotentialArchetype*>(std::vector<swift::GenericSignatureBuilder::Constraint<swift::GenericSignatureBuilder::PotentialArchetype*>, std::allocator<swift::GenericSignatureBuilder::Constraint<swift::GenericSignatureBuilder::PotentialArchetype*> > >&, swift::ProtocolDecl*, bool, bool) (/path/to/swift/bin/swift+0x169aeb3)
12 0x000000000169707f swift::GenericSignatureBuilder::checkSameTypeConstraints(llvm::ArrayRef<swift::GenericTypeParamType*>, swift::GenericSignatureBuilder::PotentialArchetype*) (/path/to/swift/bin/swift+0x169707f)
13 0x00000000016951a5 swift::GenericSignatureBuilder::finalize(swift::SourceLoc, llvm::ArrayRef<swift::GenericTypeParamType*>, bool) (/path/to/swift/bin/swift+0x16951a5)
14 0x000000000169ceba swift::GenericSignatureBuilder::computeGenericSignature(swift::SourceLoc, bool, bool) && (/path/to/swift/bin/swift+0x169ceba)
15 0x000000000169d0e8 swift::GenericSignatureBuilder::computeRequirementSignature(swift::ProtocolDecl*) (/path/to/swift/bin/swift+0x169d0e8)
16 0x0000000001658ed6 swift::ProtocolDecl::computeRequirementSignature() (/path/to/swift/bin/swift+0x1658ed6)
17 0x00000000012d7b48 swift::TypeChecker::validateGenericTypeSignature(swift::GenericTypeDecl*) (/path/to/swift/bin/swift+0x12d7b48)
18 0x00000000012a5ab8 swift::TypeChecker::validateDecl(swift::ValueDecl*) (/path/to/swift/bin/swift+0x12a5ab8)
19 0x00000000012b6ba4 (anonymous namespace)::DeclChecker::visitProtocolDecl(swift::ProtocolDecl*) (/path/to/swift/bin/swift+0x12b6ba4)
20 0x00000000012a3c4f (anonymous namespace)::DeclChecker::visit(swift::Decl*) (/path/to/swift/bin/swift+0x12a3c4f)
21 0x00000000012a3ae3 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) (/path/to/swift/bin/swift+0x12a3ae3)
22 0x00000000013367f5 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int, unsigned int, unsigned int) (/path/to/swift/bin/swift+0x13367f5)
23 0x0000000001056f44 swift::CompilerInstance::parseAndTypeCheckMainFile(swift::PersistentParserState&, swift::DelayedParsingCallbacks*, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>) (/path/to/swift/bin/swift+0x1056f44)
24 0x0000000001056007 swift::CompilerInstance::parseAndCheckTypes(swift::CompilerInstance::ImplicitImports const&) (/path/to/swift/bin/swift+0x1056007)
25 0x000000000105592a swift::CompilerInstance::performSema() (/path/to/swift/bin/swift+0x105592a)
26 0x00000000004bfed2 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) (/path/to/swift/bin/swift+0x4bfed2)
27 0x00000000004bec2b swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) (/path/to/swift/bin/swift+0x4bec2b)
28 0x0000000000476fd4 main (/path/to/swift/bin/swift+0x476fd4)
29 0x00007f81be508830 __libc_start_main /build/glibc-bfm8X4/glibc-2.23/csu/../csu/libc-start.c:325:0
30 0x0000000000474889 _start (/path/to/swift/bin/swift+0x474889)
```
2017-10-12 18:33:44 +02:00
Max Moiseev
d5d7ca6c05 Merge pull request #12367 from apple/sil-verify-all-overlays
[long test] Enable verify_all_overlays test
2017-10-11 10:08:59 -07:00
Huon Wilson
1dee31fe2b [GSB] subst Requirements directly; no need for the extra argument. 2017-10-10 20:17:42 -07:00
Max Moiseev
0ace1ee7fe [long test] Enable verify_all_overlays test
The test was originally disabled but to timeouts that were supposedly caused by the new integer protocols. A few improvements have been implemented in the compiler as well as in the standard library since them, so it might no longer be a problem.
2017-10-10 13:37:41 -07:00
Slava Pestov
e96352661b Fix REQUIRES: line in 26725-llvm-smallvectorimpl-swift-diagnosticargument-operator.swift, it was never being run 2017-10-09 19:53:51 -07:00
Doug Gregor
d3de4f2321 Merge pull request #12321 from DougGregor/assoc-type-overrides
Track "overrides" of associated types
2017-10-09 12:59:21 -07:00
Jordan Rose
192b523a8e Revert "Fix issue with 'Self' metadata when class conforms to protocol with default implementations" (#12344)
It broke the 32-bit iOS simulator, and possibly the 64-bit simulator as well. Reverts 5618553.
2017-10-09 10:02:48 -07:00
practicalswift
80b5256f08 [swiftc (62 vs. 5600)] Add crasher in swift::constraints::ConstraintGraph::lookupNode(...)
Add test case for crash triggered in `swift::constraints::ConstraintGraph::lookupNode(...)`.

Current number of unresolved compiler crashers: 62 (5600 resolved)

/cc @DougGregor - just wanted to let you know that this crasher caused an assertion failure for the assertion `TypeVariables[impl.getGraphIndex()] == typeVar && "Type variable mismatch"` added on 2013-12-09 by you in commit 11794095 :-)

Assertion failure in [`lib/Sema/ConstraintGraph.cpp (line 52)`](9fdf08ac98/lib/Sema/ConstraintGraph.cpp (L52)):

```
Assertion `TypeVariables[impl.getGraphIndex()] == typeVar && "Type variable mismatch"' failed.

When executing: std::pair<ConstraintGraphNode &, unsigned int> swift::constraints::ConstraintGraph::lookupNode(swift::TypeVariableType *)
```

Assertion context:

```c++
  // Check whether we've already created a node for this type variable.
  auto &impl = typeVar->getImpl();
  if (auto nodePtr = impl.getGraphNode()) {
    assert(impl.getGraphIndex() < TypeVariables.size() && "Out-of-bounds index");
    assert(TypeVariables[impl.getGraphIndex()] == typeVar &&
           "Type variable mismatch");
    return { *nodePtr, impl.getGraphIndex() };
  }

  // Allocate the new node.
  auto nodePtr = new ConstraintGraphNode(typeVar);
```
Stack trace:

```
0 0x0000000003ea95e4 PrintStackTraceSignalHandler(void*) (/path/to/swift/bin/swift+0x3ea95e4)
1 0x0000000003ea9926 SignalHandler(int) (/path/to/swift/bin/swift+0x3ea9926)
2 0x00007f2e21ca6390 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
3 0x00007f2e201cb428 gsignal /build/glibc-bfm8X4/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0
4 0x00007f2e201cd02a abort /build/glibc-bfm8X4/glibc-2.23/stdlib/abort.c:91:0
5 0x00007f2e201c3bd7 __assert_fail_base /build/glibc-bfm8X4/glibc-2.23/assert/assert.c:92:0
6 0x00007f2e201c3c82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82)
7 0x00000000012609ed swift::constraints::ConstraintGraph::lookupNode(swift::TypeVariableType*) (/path/to/swift/bin/swift+0x12609ed)
8 0x00000000012624ef swift::constraints::ConstraintGraph::addConstraint(swift::constraints::Constraint*) (/path/to/swift/bin/swift+0x12624ef)
9 0x0000000001230239 swift::constraints::ConstraintSystem::addUnsolvedConstraint(swift::constraints::Constraint*) (/path/to/swift/bin/swift+0x1230239)
10 0x000000000123a2bc swift::constraints::ConstraintSystem::matchTypes(swift::Type, swift::Type, swift::constraints::ConstraintKind, swift::OptionSet<swift::constraints::ConstraintSystem::TypeMatchFlags, unsigned int>, swift::constraints::ConstraintLocatorBuilder) (/path/to/swift/bin/swift+0x123a2bc)
11 0x0000000001246778 swift::constraints::ConstraintSystem::addConstraintImpl(swift::constraints::ConstraintKind, swift::Type, swift::Type, swift::constraints::ConstraintLocatorBuilder, bool) (/path/to/swift/bin/swift+0x1246778)
12 0x000000000123d8ad swift::constraints::ConstraintSystem::addConstraint(swift::constraints::ConstraintKind, swift::Type, swift::Type, swift::constraints::ConstraintLocatorBuilder, bool) (/path/to/swift/bin/swift+0x123d8ad)
13 0x0000000001229025 swift::ASTVisitor<(anonymous namespace)::ConstraintGenerator, swift::Type, void, void, void, void, void>::visit(swift::Expr*) (/path/to/swift/bin/swift+0x1229025)
14 0x000000000122d6be (anonymous namespace)::ConstraintWalker::walkToExprPost(swift::Expr*) (/path/to/swift/bin/swift+0x122d6be)
15 0x00000000016299df swift::ASTVisitor<(anonymous namespace)::Traversal, swift::Expr*, swift::Stmt*, bool, swift::Pattern*, bool, void>::visit(swift::Expr*) (/path/to/swift/bin/swift+0x16299df)
16 0x000000000162655b swift::Expr::walk(swift::ASTWalker&) (/path/to/swift/bin/swift+0x162655b)
17 0x0000000001223d9f swift::constraints::ConstraintSystem::generateConstraints(swift::Expr*) (/path/to/swift/bin/swift+0x1223d9f)
18 0x0000000001251da1 swift::constraints::ConstraintSystem::solve(swift::Expr*&, swift::Type, swift::ExprTypeCheckListener*, llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) (/path/to/swift/bin/swift+0x1251da1)
19 0x0000000001286057 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>) (/path/to/swift/bin/swift+0x1286057)
20 0x000000000128a6da swift::TypeChecker::getPossibleTypesOfExpressionWithoutApplying(swift::Expr*&, swift::DeclContext*, llvm::SmallVectorImpl<swift::Type>&, swift::FreeTypeVariableBinding, swift::ExprTypeCheckListener*) (/path/to/swift/bin/swift+0x128a6da)
21 0x0000000001383d6b (anonymous namespace)::FailureDiagnosis::visitApplyExpr(swift::ApplyExpr*) (/path/to/swift/bin/swift+0x1383d6b)
22 0x00000000013657d2 swift::ASTVisitor<(anonymous namespace)::FailureDiagnosis, bool, void, void, void, void, void>::visit(swift::Expr*) (/path/to/swift/bin/swift+0x13657d2)
23 0x000000000135f162 swift::constraints::ConstraintSystem::diagnoseFailureForExpr(swift::Expr*) (/path/to/swift/bin/swift+0x135f162)
24 0x00000000013651d9 swift::constraints::ConstraintSystem::salvage(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::Expr*) (/path/to/swift/bin/swift+0x13651d9)
25 0x0000000001286098 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>) (/path/to/swift/bin/swift+0x1286098)
26 0x0000000001289e1c swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem*) (/path/to/swift/bin/swift+0x1289e1c)
27 0x0000000001313335 swift::ASTVisitor<(anonymous namespace)::StmtChecker, void, swift::Stmt*, void, void, void, void>::visit(swift::Stmt*) (/path/to/swift/bin/swift+0x1313335)
28 0x0000000001312b46 swift::TypeChecker::typeCheckTopLevelCodeDecl(swift::TopLevelCodeDecl*) (/path/to/swift/bin/swift+0x1312b46)
29 0x00000000013326d0 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int, unsigned int, unsigned int) (/path/to/swift/bin/swift+0x13326d0)
30 0x0000000001055cb4 swift::CompilerInstance::parseAndTypeCheckMainFile(swift::PersistentParserState&, swift::DelayedParsingCallbacks*, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>) (/path/to/swift/bin/swift+0x1055cb4)
31 0x0000000001054d77 swift::CompilerInstance::parseAndCheckTypes(swift::CompilerInstance::ImplicitImports const&) (/path/to/swift/bin/swift+0x1054d77)
32 0x000000000105469a swift::CompilerInstance::performSema() (/path/to/swift/bin/swift+0x105469a)
33 0x00000000004bdc96 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) (/path/to/swift/bin/swift+0x4bdc96)
34 0x00000000004bca59 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) (/path/to/swift/bin/swift+0x4bca59)
35 0x0000000000474d54 main (/path/to/swift/bin/swift+0x474d54)
36 0x00007f2e201b6830 __libc_start_main /build/glibc-bfm8X4/glibc-2.23/csu/../csu/libc-start.c:325:0
37 0x0000000000472609 _start (/path/to/swift/bin/swift+0x472609)
```
2017-10-09 11:36:01 +02:00