mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
22d37eccd818b51fbbefda5b6f13d2bc8f44f757
1566 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
bf2ef1e014 |
[swiftc (36 vs. 5154)] Add crasher in swift::ArchetypeBuilder::addRequirement(...)
Add test case for crash triggered in `swift::ArchetypeBuilder::addRequirement(...)`. Current number of unresolved compiler crashers: 36 (5154 resolved) Assertion failure in [`lib/AST/ArchetypeBuilder.cpp (line 1489)`](https://github.com/apple/swift/blob/master/lib/AST/ArchetypeBuilder.cpp#L1489): ``` Assertion `!invalid && "Re-introducing invalid requirement"' failed. When executing: void swift::ArchetypeBuilder::addRequirement(const swift::Requirement &, swift::RequirementSource) ``` Assertion context: ``` (void)existential; // Add each of the protocols. for (auto proto : conformsTo) { bool invalid = addConformanceRequirement(pa, proto, source); assert(!invalid && "Re-introducing invalid requirement"); (void)invalid; } return; } ``` Stack trace: ``` swift: /path/to/swift/lib/AST/ArchetypeBuilder.cpp:1489: void swift::ArchetypeBuilder::addRequirement(const swift::Requirement &, swift::RequirementSource): Assertion `!invalid && "Re-introducing invalid requirement"' failed. 8 swift 0x00000000010168bd swift::ArchetypeBuilder::addRequirement(swift::Requirement const&, swift::RequirementSource) + 605 9 swift 0x0000000001018553 swift::ArchetypeBuilder::addGenericSignature(swift::GenericSignature*, bool, bool) + 515 10 swift 0x0000000000f0c52f swift::TypeChecker::checkGenericParamList(swift::ArchetypeBuilder*, swift::GenericParamList*, swift::GenericSignature*, bool, swift::GenericTypeResolver*) + 63 11 swift 0x0000000000f0df47 swift::TypeChecker::validateGenericSignature(swift::GenericParamList*, swift::DeclContext*, swift::GenericSignature*, std::function<bool (swift::ArchetypeBuilder&)>, bool&) + 135 12 swift 0x0000000000f0ea9f swift::TypeChecker::validateGenericTypeSignature(swift::GenericTypeDecl*) + 111 13 swift 0x0000000000ecd466 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 1830 14 swift 0x000000000113b66b swift::DeclContext::lookupQualified(swift::Type, swift::DeclName, swift::NLOptions, swift::LazyResolver*, llvm::SmallVectorImpl<swift::ValueDecl*>&) const + 2667 15 swift 0x0000000001139efb swift::UnqualifiedLookup::UnqualifiedLookup(swift::DeclName, swift::DeclContext*, swift::LazyResolver*, bool, swift::SourceLoc, bool, bool) + 2491 16 swift 0x0000000000f10d5b swift::TypeChecker::lookupUnqualified(swift::DeclContext*, swift::DeclName, swift::SourceLoc, swift::OptionSet<swift::NameLookupFlags, unsigned int>) + 187 19 swift 0x0000000000f4322e swift::TypeChecker::resolveIdentifierType(swift::DeclContext*, swift::IdentTypeRepr*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, bool, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 158 21 swift 0x0000000000f44184 swift::TypeChecker::resolveType(swift::TypeRepr*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 164 22 swift 0x0000000000f43120 swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 192 23 swift 0x0000000000f14df9 swift::TypeChecker::typeCheckPattern(swift::Pattern*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*) + 937 25 swift 0x0000000000ecdc4b swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 3851 28 swift 0x0000000000f1be0e swift::TypeChecker::checkConformance(swift::NormalProtocolConformance*) + 1694 29 swift 0x0000000000f1c547 swift::TypeChecker::checkConformancesInContext(swift::DeclContext*, swift::IterableDeclContext*) + 471 32 swift 0x0000000000ed31a6 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150 35 swift 0x0000000000f3d154 swift::TypeChecker::typeCheckClosureBody(swift::ClosureExpr*) + 244 36 swift 0x0000000000f696ac swift::constraints::ConstraintSystem::applySolution(swift::constraints::Solution&, swift::Expr*, swift::Type, bool, bool, bool) + 876 37 swift 0x0000000000ec037a swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem*) + 778 40 swift 0x0000000000f3d154 swift::TypeChecker::typeCheckClosureBody(swift::ClosureExpr*) + 244 41 swift 0x0000000000f696ac swift::constraints::ConstraintSystem::applySolution(swift::constraints::Solution&, swift::Expr*, swift::Type, bool, bool, bool) + 876 42 swift 0x0000000000ec037a swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem*) + 778 44 swift 0x0000000000f3d296 swift::TypeChecker::typeCheckTopLevelCodeDecl(swift::TopLevelCodeDecl*) + 134 45 swift 0x0000000000ef6fed swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1133 46 swift 0x0000000000c77d69 swift::CompilerInstance::performSema() + 3289 48 swift 0x00000000007db0d7 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2887 49 swift 0x00000000007a6fb8 main + 2872 Stack dump: 0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28381-swift-archetypebuilder-addrequirement.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28381-swift-archetypebuilder-addrequirement-cb9111.o 1. While type-checking expression at [validation-test/compiler_crashers/28381-swift-archetypebuilder-addrequirement.swift:10:1 - line:14:13] RangeText="{{ 2. While type-checking expression at [validation-test/compiler_crashers/28381-swift-archetypebuilder-addrequirement.swift:10:2 - line:11:10] RangeText="{ 3. While type-checking 'A' at validation-test/compiler_crashers/28381-swift-archetypebuilder-addrequirement.swift:11:1 4. While resolving type A at [validation-test/compiler_crashers/28381-swift-archetypebuilder-addrequirement.swift:12:7 - line:12:7] RangeText="A" <unknown>:0: error: unable to execute command: Aborted <unknown>:0: error: compile command failed due to signal (use -v to see invocation) ``` |
||
|
|
0bf6376a56 |
[swiftc (35 vs. 5154)] Add crasher in swift::Type::transform(...)
Add test case for crash triggered in `swift::Type::transform(...)`.
Current number of unresolved compiler crashers: 35 (5154 resolved)
Stack trace:
```
5 swift 0x0000000001152d13 swift::Type::transform(llvm::function_ref<swift::Type (swift::Type)>) const + 35
6 swift 0x000000000115399f swift::Type::transform(llvm::function_ref<swift::Type (swift::Type)>) const + 3247
7 swift 0x0000000000f5ebde swift::constraints::ConstraintSystem::openType(swift::Type, swift::constraints::ConstraintLocatorBuilder, llvm::DenseMap<swift::CanType, swift::TypeVariableType*, llvm::DenseMapInfo<swift::CanType>, llvm::detail::DenseMapPair<swift::CanType, swift::TypeVariableType*> >&) + 78
10 swift 0x000000000109170c swift::Expr::walk(swift::ASTWalker&) + 108
11 swift 0x0000000000faa0c8 swift::constraints::ConstraintSystem::generateConstraints(swift::Expr*) + 200
12 swift 0x0000000000eb8e93 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>) + 371
13 swift 0x0000000000ebfc8d swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem*) + 621
14 swift 0x0000000000ec1994 swift::TypeChecker::typeCheckCondition(swift::Expr*&, swift::DeclContext*) + 180
15 swift 0x0000000000ec1aeb swift::TypeChecker::typeCheckStmtCondition(llvm::MutableArrayRef<swift::StmtConditionElement>&, swift::DeclContext*, swift::Diag<>) + 251
19 swift 0x0000000000f3cb04 swift::TypeChecker::typeCheckClosureBody(swift::ClosureExpr*) + 244
20 swift 0x0000000000f690cc swift::constraints::ConstraintSystem::applySolution(swift::constraints::Solution&, swift::Expr*, swift::Type, bool, bool, bool) + 876
21 swift 0x0000000000ebfd2a swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem*) + 778
24 swift 0x0000000000f3b7da swift::TypeChecker::typeCheckFunctionBodyUntil(swift::FuncDecl*, swift::SourceLoc) + 346
25 swift 0x0000000000f3b63e swift::TypeChecker::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) + 46
26 swift 0x0000000000f3c203 swift::TypeChecker::typeCheckAbstractFunctionBody(swift::AbstractFunctionDecl*) + 179
28 swift 0x0000000000ef6a31 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1281
29 swift 0x0000000000c77be9 swift::CompilerInstance::performSema() + 3289
31 swift 0x00000000007daf57 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2887
32 swift 0x00000000007a6e38 main + 2872
Stack dump:
0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28380-swift-type-transform.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28380-swift-type-transform-07a9ce.o
1. While type-checking 'f' at validation-test/compiler_crashers/28380-swift-type-transform.swift:9:1
2. While type-checking expression at [validation-test/compiler_crashers/28380-swift-type-transform.swift:9:10 - line:9:24] RangeText="{if true as[T.h"
3. While type-checking expression at [validation-test/compiler_crashers/28380-swift-type-transform.swift:9:14 - line:9:24] RangeText="true as[T.h"
<unknown>:0: error: unable to execute command: Segmentation fault
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
|
||
|
|
a7d4820425 |
[swiftc (35 vs. 5154)] Add crasher in swift::constraints::ConstraintSystem::diagnoseFailureForExpr(...)
Add test case for crash triggered in `swift::constraints::ConstraintSystem::diagnoseFailureForExpr(...)`.
Current number of unresolved compiler crashers: 35 (5154 resolved)
Assertion failure in `llvm/include/llvm/ADT/ArrayRef.h (line 186)`:
```
Assertion `Index < Length && "Invalid index!"' failed.
When executing: const T &llvm::ArrayRef<swift::Expr *>::operator[](size_t) const [T = swift::Expr *]
```
Assertion context:
```
/// @}
/// @name Operator Overloads
/// @{
const T &operator[](size_t Index) const {
assert(Index < Length && "Invalid index!");
return Data[Index];
}
/// @}
/// @name Expensive Operations
```
Stack trace:
```
swift: /path/to/llvm/include/llvm/ADT/ArrayRef.h:186: const T &llvm::ArrayRef<swift::Expr *>::operator[](size_t) const [T = swift::Expr *]: Assertion `Index < Length && "Invalid index!"' failed.
11 swift 0x0000000000f7be49 swift::constraints::ConstraintSystem::diagnoseFailureForExpr(swift::Expr*) + 105
12 swift 0x0000000000f81c8e swift::constraints::ConstraintSystem::salvage(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::Expr*) + 3998
13 swift 0x0000000000eb1812 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>) + 850
14 swift 0x0000000000eb83dd swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem*) + 621
19 swift 0x0000000000f7be49 swift::constraints::ConstraintSystem::diagnoseFailureForExpr(swift::Expr*) + 105
20 swift 0x0000000000f81c8e swift::constraints::ConstraintSystem::salvage(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::Expr*) + 3998
21 swift 0x0000000000eb1812 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>) + 850
22 swift 0x0000000000eb83dd swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem*) + 621
24 swift 0x0000000000f33bb6 swift::TypeChecker::typeCheckTopLevelCodeDecl(swift::TopLevelCodeDecl*) + 134
25 swift 0x0000000000eeda1d swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1133
26 swift 0x0000000000c737f9 swift::CompilerInstance::performSema() + 3289
28 swift 0x00000000007d9aa7 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2887
29 swift 0x00000000007a5988 main + 2872
Stack dump:
0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28379-swift-constraints-constraintsystem-diagnosefailureforexpr.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28379-swift-constraints-constraintsystem-diagnosefailureforexpr-2c9cbc.o
1. While type-checking expression at [validation-test/compiler_crashers/28379-swift-constraints-constraintsystem-diagnosefailureforexpr.swift:10:1 - line:10:5] RangeText="!()*0"
2. While type-checking expression at [validation-test/compiler_crashers/28379-swift-constraints-constraintsystem-diagnosefailureforexpr.swift:10:1 - line:10:3] RangeText="!()"
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
|
||
|
|
9a32575cbf |
Merge pull request #3738 from slavapestov/remove-protocol-typealias-flag
Remove -enable-protocol-typealiases staging flag |
||
|
|
4a57e647e6 |
Merge pull request #3762 from bitjammer/se-0081-diagnostic-and-crashes
[SE-0081] Warn on deprecated where clause inside angle brackets |
||
|
|
5cce5c4d1d |
[Parser] Refactor parsing of calls and call-like expressions.
Rather than parsing the call arguments (or similar, e.g., subscript)
as a parenthesized expression or tuple, then later reworking that
ParenExpr/TupleExpr if a trailing closure comes along, then digging
through that ParenExpr/TupleExpr to pull out the arguments and
trailing closure... just parse the expression list and trailing
closure together, then directly form the appropriate AST node with
arguments/labels/label locations/trailing closure.
Fixes rdar://problem/19804707, which is an issue where trailing
closures weren't working with unresolved member expressions (e.g.,
".foo {... }"), and is a stepping-stone to SE-0111.
|
||
|
|
7bfaeb57f1 |
[SE-0081] Warn on deprecated where clause inside angle brackets
and provide a fix-it to move it to the new location as referenced in SE-0081. Fix up a few stray places in the standard library that is still using the old syntax. Update any ./test files that aren't expecting the new warning/fix-it in -verify mode. While investigating what I thought was a new crash due to this new diagnostic, I discovered two sources of quite a few compiler crashers related to unterminated generic parameter lists, where the right angle bracket source location was getting unconditionally set to the current token, even though it wasn't actually a '>'. |
||
|
|
1ae8e37058 |
Remove -enable-protocol-typealiases staging flag
It looks like migration fixits are done, and this doesn't expose any new bugs that were not possible before, because you could already define typealiases inside protocol extensions. To prevent some compiler_crasher regressions, add a simple circularity-breaking hack. I'll need to do a sweep to clean these up some day soon. |
||
|
|
d06d4e5ad7 |
[AST][Sema] Fixes the IterativeTypeChecker and better manages circular protocol inheritance
The IterativeTypeChecker now use loops instead of recursion to help keep the stack size low We diagnose circular dependencies for protocols in a more efficient manner and also prevent the possibility of infinite loops |
||
|
|
66cdce98d0 |
[swiftc (73 vs. 5115)] Add crasher in swift::TypeChecker::resolveWitness(...)
Add test case for crash triggered in `swift::TypeChecker::resolveWitness(...)`. Current number of unresolved compiler crashers: 73 (5115 resolved) Assertion failure in [`lib/Sema/CSApply.cpp (line 148)`](https://github.com/apple/swift/blob/master/lib/Sema/CSApply.cpp#L148): ``` Assertion `(conforms || replacement->is<ErrorType>() || firstArchetype->getIsRecursive() || isOpenedAnyObject(replacement) || replacement->is<GenericTypeParamType>()) && "Constraint system missed a conformance?"' failed. When executing: swift::Type swift::constraints::Solution::computeSubstitutions(swift::Type, swift::DeclContext *, swift::Type, swift::constraints::ConstraintLocator *, SmallVectorImpl<swift::Substitution> &) const ``` Assertion context: ``` assert((conforms || replacement->is<ErrorType>() || firstArchetype->getIsRecursive() || isOpenedAnyObject(replacement) || replacement->is<GenericTypeParamType>()) && "Constraint system missed a conformance?"); (void)conforms; assert(conformance || replacement->is<ErrorType>() || replacement->hasDependentProtocolConformances()); ``` Stack trace: ``` swift: /path/to/swift/lib/Sema/CSApply.cpp:148: swift::Type swift::constraints::Solution::computeSubstitutions(swift::Type, swift::DeclContext *, swift::Type, swift::constraints::ConstraintLocator *, SmallVectorImpl<swift::Substitution> &) const: Assertion `(conforms || replacement->is<ErrorType>() || firstArchetype->getIsRecursive() || isOpenedAnyObject(replacement) || replacement->is<GenericTypeParamType>()) && "Constraint system missed a conformance?"' failed. 14 swift 0x0000000000f1428c swift::TypeChecker::resolveWitness(swift::NormalProtocolConformance const*, swift::ValueDecl*) + 668 15 swift 0x000000000113166b swift::NormalProtocolConformance::getWitness(swift::ValueDecl*, swift::LazyResolver*) const + 171 16 swift 0x0000000000f13c20 swift::TypeChecker::findWitnessedObjCRequirements(swift::ValueDecl const*, bool) + 368 32 swift 0x0000000000ec9406 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150 35 swift 0x0000000000f3182a swift::TypeChecker::typeCheckFunctionBodyUntil(swift::FuncDecl*, swift::SourceLoc) + 346 36 swift 0x0000000000f3168e swift::TypeChecker::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) + 46 37 swift 0x0000000000f32253 swift::TypeChecker::typeCheckAbstractFunctionBody(swift::AbstractFunctionDecl*) + 179 39 swift 0x0000000000eecb01 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1281 40 swift 0x0000000000c73279 swift::CompilerInstance::performSema() + 3289 42 swift 0x00000000007d94b7 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2887 43 swift 0x00000000007a54b8 main + 2872 Stack dump: 0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28378-swift-typechecker-resolvewitness.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28378-swift-typechecker-resolvewitness-1fc026.o 1. While type-checking '<' at validation-test/compiler_crashers/28378-swift-typechecker-resolvewitness.swift:10:1 2. While type-checking 'C' at validation-test/compiler_crashers/28378-swift-typechecker-resolvewitness.swift:10:13 <unknown>:0: error: unable to execute command: Aborted <unknown>:0: error: compile command failed due to signal (use -v to see invocation) ``` |
||
|
|
89c42cc7c1 |
[swiftc (72 vs. 5115)] Add crasher in swift::Expr::walk(...)
Add test case for crash triggered in `swift::Expr::walk(...)`. Current number of unresolved compiler crashers: 72 (5115 resolved) Assertion failure in [`lib/Sema/CSApply.cpp (line 683)`](https://github.com/apple/swift/blob/master/lib/Sema/CSApply.cpp#L683): ``` Assertion `baseTy->isAnyExistentialType() && "Type must be existential"' failed. When executing: swift::Expr *(anonymous namespace)::ExprRewriter::openExistentialReference(swift::Expr *, swift::ArchetypeType *, swift::ValueDecl *) ``` Assertion context: ``` if (auto metaTy = baseTy->getAs<AnyMetatypeType>()) { isMetatype = true; baseTy = metaTy->getInstanceType(); } assert(baseTy->isAnyExistentialType() && "Type must be existential"); // If the base was an lvalue but it will only be treated as an // rvalue, turn the base into an rvalue now. This results in // better SILGen. if (isLValue && ``` Stack trace: ``` swift: /path/to/swift/lib/Sema/CSApply.cpp:683: swift::Expr *(anonymous namespace)::ExprRewriter::openExistentialReference(swift::Expr *, swift::ArchetypeType *, swift::ValueDecl *): Assertion `baseTy->isAnyExistentialType() && "Type must be existential"' failed. 13 swift 0x0000000001082adc swift::Expr::walk(swift::ASTWalker&) + 108 14 swift 0x0000000000f5e782 swift::constraints::ConstraintSystem::applySolution(swift::constraints::Solution&, swift::Expr*, swift::Type, bool, bool, bool) + 514 15 swift 0x0000000000eb74ea swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem*) + 778 16 swift 0x0000000000eb8600 swift::TypeChecker::typeCheckBinding(swift::Pattern*&, swift::Expr*&, swift::DeclContext*) + 352 17 swift 0x0000000000eb9325 swift::TypeChecker::typeCheckStmtCondition(llvm::MutableArrayRef<swift::StmtConditionElement>&, swift::DeclContext*, swift::Diag<>) + 373 21 swift 0x0000000000f31c7d swift::TypeChecker::typeCheckConstructorBodyUntil(swift::ConstructorDecl*, swift::SourceLoc) + 845 22 swift 0x0000000000f31682 swift::TypeChecker::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) + 34 23 swift 0x0000000000f32253 swift::TypeChecker::typeCheckAbstractFunctionBody(swift::AbstractFunctionDecl*) + 179 25 swift 0x0000000000eecb01 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1281 26 swift 0x0000000000c73279 swift::CompilerInstance::performSema() + 3289 28 swift 0x00000000007d94b7 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2887 29 swift 0x00000000007a54b8 main + 2872 Stack dump: 0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28377-swift-expr-walk.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28377-swift-expr-walk-38fbfa.o 1. While type-checking 'init' at validation-test/compiler_crashers/28377-swift-expr-walk.swift:10:10 2. While type-checking expression at [validation-test/compiler_crashers/28377-swift-expr-walk.swift:10:53 - line:10:57] RangeText="A().a" <unknown>:0: error: unable to execute command: Aborted <unknown>:0: error: compile command failed due to signal (use -v to see invocation) ``` |
||
|
|
eae6a75d92 |
[swiftc (71 vs. 5115)] Add crasher in swift::constraints::ConstraintSystem::diagnoseFailureForExpr(...)
Add test case for crash triggered in `swift::constraints::ConstraintSystem::diagnoseFailureForExpr(...)`.
Current number of unresolved compiler crashers: 71 (5115 resolved)
Assertion failure in `llvm/include/llvm/Support/Casting.h (line 237)`:
```
Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed.
When executing: typename cast_retty<X, Y *>::ret_type llvm::cast(Y *) [X = swift::AnyMetatypeType, Y = swift::TypeBase]
```
Assertion context:
```
typename simplify_type<Y>::SimpleType>::doit(Val);
}
template <class X, class Y>
inline typename cast_retty<X, Y *>::ret_type cast(Y *Val) {
assert(isa<X>(Val) && "cast<Ty>() argument of incompatible type!");
return cast_convert_val<X, Y*,
typename simplify_type<Y*>::SimpleType>::doit(Val);
}
// cast_or_null<X> - Functionally identical to cast, except that a null value is
```
Stack trace:
```
swift: /path/to/llvm/include/llvm/Support/Casting.h:237: typename cast_retty<X, Y *>::ret_type llvm::cast(Y *) [X = swift::AnyMetatypeType, Y = swift::TypeBase]: Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed.
9 swift 0x0000000000f7d2fa swift::constraints::ConstraintSystem::diagnoseFailureForExpr(swift::Expr*) + 8698
10 swift 0x0000000000f8085e swift::constraints::ConstraintSystem::salvage(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::Expr*) + 3998
11 swift 0x0000000000eb0882 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>) + 850
12 swift 0x0000000000eb744d swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem*) + 621
13 swift 0x0000000000eb9154 swift::TypeChecker::typeCheckCondition(swift::Expr*&, swift::DeclContext*) + 180
14 swift 0x0000000000eb92ab swift::TypeChecker::typeCheckStmtCondition(llvm::MutableArrayRef<swift::StmtConditionElement>&, swift::DeclContext*, swift::Diag<>) + 251
18 swift 0x0000000000f3182a swift::TypeChecker::typeCheckFunctionBodyUntil(swift::FuncDecl*, swift::SourceLoc) + 346
19 swift 0x0000000000f3168e swift::TypeChecker::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) + 46
20 swift 0x0000000000f32253 swift::TypeChecker::typeCheckAbstractFunctionBody(swift::AbstractFunctionDecl*) + 179
22 swift 0x0000000000eecb01 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1281
23 swift 0x0000000000c73279 swift::CompilerInstance::performSema() + 3289
25 swift 0x00000000007d94b7 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2887
26 swift 0x00000000007a54b8 main + 2872
Stack dump:
0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28376-swift-constraints-constraintsystem-diagnosefailureforexpr.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28376-swift-constraints-constraintsystem-diagnosefailureforexpr-9a6535.o
1. While type-checking declaration 0x5cf0350 at validation-test/compiler_crashers/28376-swift-constraints-constraintsystem-diagnosefailureforexpr.swift:11:5
2. While type-checking expression at [validation-test/compiler_crashers/28376-swift-constraints-constraintsystem-diagnosefailureforexpr.swift:11:9 - line:11:9] RangeText="c"
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
|
||
|
|
681c6ac059 |
Merge pull request #3693 from practicalswift/swiftc-28375-swift-typechecker-lookupmembertype
[swiftc (71 vs. 5114)] Add crasher in swift::TypeChecker::lookupMemberType(...) |
||
|
|
c98a855dbb |
Rework access checking in terms of "access scopes", and default to 'internal'
Merge pull request #3506 from jrose-apple/private-and-fileprivate More progress on SE-0025. |
||
|
|
a3c2f8be5b |
[swiftc (71 vs. 5114)] Add crasher in swift::TypeChecker::lookupMemberType(...)
Add test case for crash triggered in `swift::TypeChecker::lookupMemberType(...)`. Current number of unresolved compiler crashers: 71 (5114 resolved) Assertion failure in [`lib/Sema/TypeCheckNameLookup.cpp (line 328)`](https://github.com/apple/swift/blob/master/lib/Sema/TypeCheckNameLookup.cpp#L328): ``` Assertion `!type->isTypeParameter()' failed. When executing: swift::LookupTypeResult swift::TypeChecker::lookupMemberType(swift::DeclContext *, swift::Type, swift::Identifier, NameLookupOptions) ``` Assertion context: ``` // Look through the metatype. if (auto metaT = type->getAs<AnyMetatypeType>()) type = metaT->getInstanceType(); // Callers must cope with dependent types directly. assert(!type->isTypeParameter()); // Look for members with the given name. SmallVector<ValueDecl *, 4> decls; NLOptions subOptions = NL_QualifiedDefault | NL_OnlyTypes; ``` Stack trace: ``` swift: /path/to/swift/lib/Sema/TypeCheckNameLookup.cpp:328: swift::LookupTypeResult swift::TypeChecker::lookupMemberType(swift::DeclContext *, swift::Type, swift::Identifier, NameLookupOptions): Assertion `!type->isTypeParameter()' failed. 8 swift 0x0000000000f06e74 swift::TypeChecker::lookupMemberType(swift::DeclContext*, swift::Type, swift::Identifier, swift::OptionSet<swift::NameLookupFlags, unsigned int>) + 1572 10 swift 0x0000000000f3800e swift::TypeChecker::resolveIdentifierType(swift::DeclContext*, swift::IdentTypeRepr*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, bool, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 158 12 swift 0x0000000000f38f64 swift::TypeChecker::resolveType(swift::TypeRepr*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 164 13 swift 0x0000000000f37f00 swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 192 15 swift 0x0000000000f01b9e swift::TypeChecker::validateGenericFuncSignature(swift::AbstractFunctionDecl*) + 94 18 swift 0x0000000000ec41c3 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 947 23 swift 0x00000000011057b5 swift::lookupVisibleDecls(swift::VisibleDeclConsumer&, swift::DeclContext const*, swift::LazyResolver*, bool, swift::SourceLoc) + 1189 24 swift 0x0000000000f07102 swift::TypeChecker::performTypoCorrection(swift::DeclContext*, swift::DeclRefKind, swift::Type, swift::DeclName, swift::SourceLoc, swift::OptionSet<swift::NameLookupFlags, unsigned int>, swift::LookupResult&, unsigned int) + 290 25 swift 0x0000000000eafee9 swift::TypeChecker::resolveDeclRefExpr(swift::UnresolvedDeclRefExpr*, swift::DeclContext*) + 3865 27 swift 0x000000000108188b swift::Expr::walk(swift::ASTWalker&) + 27 28 swift 0x0000000000eb0770 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>) + 224 29 swift 0x0000000000eb75ad swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem*) + 621 30 swift 0x0000000000eb8760 swift::TypeChecker::typeCheckBinding(swift::Pattern*&, swift::Expr*&, swift::DeclContext*) + 352 31 swift 0x0000000000eb897b swift::TypeChecker::typeCheckPatternBinding(swift::PatternBindingDecl*, unsigned int) + 267 35 swift 0x0000000000ec95b6 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150 38 swift 0x0000000000f31f44 swift::TypeChecker::typeCheckClosureBody(swift::ClosureExpr*) + 244 39 swift 0x0000000000f5da0c swift::constraints::ConstraintSystem::applySolution(swift::constraints::Solution&, swift::Expr*, swift::Type, bool, bool, bool) + 876 40 swift 0x0000000000eb764a swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem*) + 778 42 swift 0x0000000000f32086 swift::TypeChecker::typeCheckTopLevelCodeDecl(swift::TopLevelCodeDecl*) + 134 43 swift 0x0000000000eebe4d swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1133 44 swift 0x0000000000c735c9 swift::CompilerInstance::performSema() + 3289 46 swift 0x00000000007d9277 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2887 47 swift 0x00000000007a5278 main + 2872 Stack dump: 0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28375-swift-typechecker-lookupmembertype.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28375-swift-typechecker-lookupmembertype-f72c36.o 1. While type-checking expression at [validation-test/compiler_crashers/28375-swift-typechecker-lookupmembertype.swift:10:1 - line:11:15] RangeText="{struct S<T{var:e=d func g:e.a 2. While type-checking 'S' at validation-test/compiler_crashers/28375-swift-typechecker-lookupmembertype.swift:10:2 3. While type-checking expression at [validation-test/compiler_crashers/28375-swift-typechecker-lookupmembertype.swift:10:19 - line:10:19] RangeText="d" 4. While type-checking 'g' at validation-test/compiler_crashers/28375-swift-typechecker-lookupmembertype.swift:10:21 5. While resolving type e.a at [validation-test/compiler_crashers/28375-swift-typechecker-lookupmembertype.swift:10:28 - line:10:30] RangeText="e.a" <unknown>:0: error: unable to execute command: Aborted <unknown>:0: error: compile command failed due to signal (use -v to see invocation) ``` |
||
|
|
8b52544365 |
[swiftc (70 vs. 5114)] Add crasher in swift::TypeChecker::resolveWitness(...)
Add test case for crash triggered in `swift::TypeChecker::resolveWitness(...)`. Current number of unresolved compiler crashers: 70 (5114 resolved) Assertion failure in [`lib/Sema/TypeCheckProtocol.cpp (line 1813)`](https://github.com/apple/swift/blob/master/lib/Sema/TypeCheckProtocol.cpp#L1813): ``` Assertion `(archetype != nullptr || isError) && "Should have built archetypes already"' failed. When executing: swift::Substitution getArchetypeSubstitution(swift::TypeChecker &, swift::DeclContext *, swift::ArchetypeType *, swift::Type) ``` Assertion context: ``` assert(!resultReplacement->isTypeParameter() && "Can't be dependent"); SmallVector<ProtocolConformanceRef, 4> conformances; bool isError = replacement->is<ErrorType>(); assert((archetype != nullptr || isError) && "Should have built archetypes already"); // FIXME: Turn the nullptr check into an assertion if (archetype != nullptr) { for (auto proto : archetype->getConformsTo()) { ProtocolConformance *conformance = nullptr; ``` Stack trace: ``` swift: /path/to/swift/lib/Sema/TypeCheckProtocol.cpp:1813: swift::Substitution getArchetypeSubstitution(swift::TypeChecker &, swift::DeclContext *, swift::ArchetypeType *, swift::Type): Assertion `(archetype != nullptr || isError) && "Should have built archetypes already"' failed. 11 swift 0x0000000000f13609 swift::TypeChecker::resolveWitness(swift::NormalProtocolConformance const*, swift::ValueDecl*) + 569 12 swift 0x000000000113001b swift::NormalProtocolConformance::getWitness(swift::ValueDecl*, swift::LazyResolver*) const + 171 14 swift 0x0000000000f05d24 swift::TypeChecker::lookupUnqualified(swift::DeclContext*, swift::DeclName, swift::SourceLoc, swift::OptionSet<swift::NameLookupFlags, unsigned int>) + 404 15 swift 0x0000000000eaf03c swift::TypeChecker::resolveDeclRefExpr(swift::UnresolvedDeclRefExpr*, swift::DeclContext*) + 108 17 swift 0x000000000108188b swift::Expr::walk(swift::ASTWalker&) + 27 18 swift 0x0000000000eb0770 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>) + 224 19 swift 0x0000000000eb75ad swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem*) + 621 20 swift 0x0000000000eb8760 swift::TypeChecker::typeCheckBinding(swift::Pattern*&, swift::Expr*&, swift::DeclContext*) + 352 21 swift 0x0000000000eb897b swift::TypeChecker::typeCheckPatternBinding(swift::PatternBindingDecl*, unsigned int) + 267 23 swift 0x0000000000ec4d1d swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 3853 29 swift 0x0000000000ec95b6 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150 30 swift 0x0000000000eebde2 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1026 31 swift 0x0000000000c735c9 swift::CompilerInstance::performSema() + 3289 33 swift 0x00000000007d9277 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2887 34 swift 0x00000000007a5278 main + 2872 Stack dump: 0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28374-swift-typechecker-resolvewitness.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28374-swift-typechecker-resolvewitness-9c17ae.o 1. While type-checking 'a' at validation-test/compiler_crashers/28374-swift-typechecker-resolvewitness.swift:10:1 2. While type-checking expression at [validation-test/compiler_crashers/28374-swift-typechecker-resolvewitness.swift:15:7 - line:15:7] RangeText="B" <unknown>:0: error: unable to execute command: Aborted <unknown>:0: error: compile command failed due to signal (use -v to see invocation) ``` |
||
|
|
0c5156da43 |
[swiftc (69 vs. 5114)] Add crasher in swift::PrintOptions::setArchetypeSelfTransform(...)
Add test case for crash triggered in `swift::PrintOptions::setArchetypeSelfTransform(...)`. Current number of unresolved compiler crashers: 69 (5114 resolved) Assertion failure in [`lib/AST/ASTPrinter.cpp (line 68)`](https://github.com/apple/swift/blob/master/lib/AST/ASTPrinter.cpp#L68): ``` Assertion `ParamDecls.size() == Args.size()' failed. When executing: std::unique_ptr<llvm::DenseMap<StringRef, Type> > swift::collectNameTypeMap(swift::Type) ``` Assertion context: ``` if (!D || !D->getGenericParams()) continue; SmallVector<Type, 3> Scrach; auto Args = BaseTy->getAllGenericArgs(Scrach); const auto ParamDecls = D->getGenericParams()->getParams(); assert(ParamDecls.size() == Args.size()); // Map type parameter names with their instantiating arguments. for (unsigned I = 0, N = ParamDecls.size(); I < N; I++) { (*IdMap)[ParamDecls[I]->getName().str()] = Args[I]; } ``` Stack trace: ``` swift: /path/to/swift/lib/AST/ASTPrinter.cpp:68: std::unique_ptr<llvm::DenseMap<StringRef, Type> > swift::collectNameTypeMap(swift::Type): Assertion `ParamDecls.size() == Args.size()' failed. 9 swift 0x000000000104a240 swift::PrintOptions::setArchetypeSelfTransform(swift::Type, swift::DeclContext*) + 144 13 swift 0x0000000000f10f97 swift::TypeChecker::checkConformance(swift::NormalProtocolConformance*) + 2423 15 swift 0x0000000000eebee1 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1281 16 swift 0x0000000000c735c9 swift::CompilerInstance::performSema() + 3289 18 swift 0x00000000007d9277 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2887 19 swift 0x00000000007a5278 main + 2872 Stack dump: 0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28373-swift-printoptions-setarchetypeselftransform.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28373-swift-printoptions-setarchetypeselftransform-d50673.o <unknown>:0: error: unable to execute command: Aborted <unknown>:0: error: compile command failed due to signal (use -v to see invocation) ``` |
||
|
|
3d7047e3bf |
Merge pull request #3669 from practicalswift/swiftc-28372-swift-printoptions-setarchetypeanddynamicselftransform
[swiftc (72 vs. 5110)] Add crasher in swift::PrintOptions::setArchetypeAndDynamicSelfTransform(...) |
||
|
|
2de82e5b8f |
[swiftc (72 vs. 5110)] Add crasher in swift::PrintOptions::setArchetypeAndDynamicSelfTransform(...)
Add test case for crash triggered in `swift::PrintOptions::setArchetypeAndDynamicSelfTransform(...)`. Current number of unresolved compiler crashers: 72 (5110 resolved) Assertion failure in [`lib/AST/ASTPrinter.cpp (line 68)`](https://github.com/apple/swift/blob/master/lib/AST/ASTPrinter.cpp#L68): ``` Assertion `ParamDecls.size() == Args.size()' failed. When executing: std::unique_ptr<llvm::DenseMap<StringRef, Type> > swift::collectNameTypeMap(swift::Type) ``` Assertion context: ``` if (!D || !D->getGenericParams()) continue; SmallVector<Type, 3> Scrach; auto Args = BaseTy->getAllGenericArgs(Scrach); const auto ParamDecls = D->getGenericParams()->getParams(); assert(ParamDecls.size() == Args.size()); // Map type parameter names with their instantiating arguments. for (unsigned I = 0, N = ParamDecls.size(); I < N; I++) { (*IdMap)[ParamDecls[I]->getName().str()] = Args[I]; } ``` Stack trace: ``` swift: /path/to/swift/lib/AST/ASTPrinter.cpp:68: std::unique_ptr<llvm::DenseMap<StringRef, Type> > swift::collectNameTypeMap(swift::Type): Assertion `ParamDecls.size() == Args.size()' failed. 9 swift 0x000000000104b5d2 swift::PrintOptions::setArchetypeAndDynamicSelfTransform(swift::Type, swift::DeclContext*) + 130 13 swift 0x0000000000f11a57 swift::TypeChecker::checkConformance(swift::NormalProtocolConformance*) + 2423 14 swift 0x0000000000f11ec7 swift::TypeChecker::checkConformancesInContext(swift::DeclContext*, swift::IterableDeclContext*) + 471 19 swift 0x0000000000ec9ab6 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150 22 swift 0x0000000000f32a64 swift::TypeChecker::typeCheckClosureBody(swift::ClosureExpr*) + 244 23 swift 0x0000000000f5e7ac swift::constraints::ConstraintSystem::applySolution(swift::constraints::Solution&, swift::Expr*, swift::Type, bool, bool, bool) + 876 24 swift 0x0000000000eb7b41 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 769 26 swift 0x0000000000f32ba6 swift::TypeChecker::typeCheckTopLevelCodeDecl(swift::TopLevelCodeDecl*) + 134 27 swift 0x0000000000eec48d swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1133 28 swift 0x0000000000c73849 swift::CompilerInstance::performSema() + 3289 30 swift 0x00000000007d95c7 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2887 31 swift 0x00000000007a55c8 main + 2872 Stack dump: 0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28372-swift-printoptions-setarchetypeanddynamicselftransform.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28372-swift-printoptions-setarchetypeanddynamicselftransform-7809a8.o 1. While type-checking expression at [validation-test/compiler_crashers/28372-swift-printoptions-setarchetypeanddynamicselftransform.swift:10:1 - line:12:11] RangeText="{protocol a{ 2. While type-checking 'a' at validation-test/compiler_crashers/28372-swift-printoptions-setarchetypeanddynamicselftransform.swift:10:2 <unknown>:0: error: unable to execute command: Aborted <unknown>:0: error: compile command failed due to signal (use -v to see invocation) ``` |
||
|
|
758cf64283 |
Rework access checking in terms of "access scopes".
(in preparation for the private/fileprivate split)
An "access scope" is the outermost DeclContext where a particular
declaration may be referenced: for a 'fileprivate' declaration it's
the enclosing file, and for an 'internal' declaration it's the module.
'public' corresponds to a scope of "everything", represented by a null
DeclContext.
This model extends naturally to the (not-yet-implemented) SE-0025
notion of 'private', where the access scope is a declaration's
immediately enclosing DeclContext.
Complicating this model is the revised rules that allow, e.g., a public
declaration to be declared within an internal type. The access scope
for this declaration is still just the module, not "everything".
This commit reworks formal access control checking in terms of this
model, including tightening up some of the handling for '@testable'.
This implements the rule that you must be able to access a declaration's
type everywhere you can reference the declaration.
This was not intended to change compiler behavior, but in practice it
has made cross-file dependency tracking a bit more conservative
(unnecessarily), caught a mistake in diagnosing access violations,
and fixed a fuzzer-based crasher (see test changes).
Progress on SE-0025 ('private' and 'fileprivate')
|
||
|
|
c56f96d237 |
[Type checker] Synthesize member operator '==' for Equatable enums.
Rather than synthesizing a global operator '==' for Equatable enums, synthesize a member operator, which is more idiomatic and much cleaner. To make sure that these synthesized operators can actually be found, start considering operator requirements in protocols more generally in the type checker, so that, e.g., "myEnum == myEnum" will type-check against Equatable.== and, on successful type-check, will call the (newly-synthesized) witness for '=='. This both makes it easier to make sure we find the operators in, e.g., complex multi-file and lazy-type checking scenarios, and is a step toward the type-checking improvements described in SE-0091. |
||
|
|
a766e6f2d7 | Merge pull request #2843 from ahoppen/SR-1236-errors | ||
|
|
a820296cfc |
[swiftc (72 vs. 5109)] Add crasher in swift::GenericParamList::getSubstitutionMap(...)
Add test case for crash triggered in `swift::GenericParamList::getSubstitutionMap(...)`.
Current number of unresolved compiler crashers: 72 (5109 resolved)
Assertion failure in `llvm/include/llvm/ADT/ArrayRef.h (line 139)`:
```
Assertion `!empty()' failed.
When executing: const T &llvm::ArrayRef<swift::Substitution>::front() const [T = swift::Substitution]
```
Assertion context:
```
/// size - Get the array size.
size_t size() const { return Length; }
/// front - Get the first element.
const T &front() const {
assert(!empty());
return Data[0];
}
/// back - Get the last element.
const T &back() const {
```
Stack trace:
```
swift: /path/to/llvm/include/llvm/ADT/ArrayRef.h:139: const T &llvm::ArrayRef<swift::Substitution>::front() const [T = swift::Substitution]: Assertion `!empty()' failed.
8 swift 0x0000000001136748 swift::GenericParamList::getSubstitutionMap(llvm::ArrayRef<swift::Substitution>) const + 1080
9 swift 0x0000000001127b57 swift::SpecializedProtocolConformance::getTypeWitnessSubstAndDecl(swift::AssociatedTypeDecl*, swift::LazyResolver*) const + 215
10 swift 0x0000000001127862 swift::ProtocolConformance::getTypeWitnessSubstAndDecl(swift::AssociatedTypeDecl*, swift::LazyResolver*) const + 18
11 swift 0x0000000001128046 swift::ProtocolConformance::getTypeWitness(swift::AssociatedTypeDecl*, swift::LazyResolver*) const + 6
12 swift 0x0000000000f32531 swift::TypeChecker::resolveTypeInContext(swift::TypeDecl*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, bool, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 2401
16 swift 0x0000000000f3362e swift::TypeChecker::resolveIdentifierType(swift::DeclContext*, swift::IdentTypeRepr*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, bool, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 158
18 swift 0x0000000000f34584 swift::TypeChecker::resolveType(swift::TypeRepr*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 164
19 swift 0x0000000000f33520 swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 192
21 swift 0x0000000000efd7be swift::TypeChecker::validateGenericFuncSignature(swift::AbstractFunctionDecl*) + 94
28 swift 0x0000000000ec55e6 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150
31 swift 0x0000000000f2d5e4 swift::TypeChecker::typeCheckClosureBody(swift::ClosureExpr*) + 244
32 swift 0x0000000000f593ac swift::constraints::ConstraintSystem::applySolution(swift::constraints::Solution&, swift::Expr*, swift::Type, bool, bool, bool) + 876
33 swift 0x0000000000eb3c81 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 769
35 swift 0x0000000000f2d726 swift::TypeChecker::typeCheckTopLevelCodeDecl(swift::TopLevelCodeDecl*) + 134
36 swift 0x0000000000ee77cd swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1133
37 swift 0x0000000000c71a09 swift::CompilerInstance::performSema() + 3289
39 swift 0x00000000007d91c9 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2857
40 swift 0x00000000007a51e8 main + 2872
Stack dump:
0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28371-swift-genericparamlist-getsubstitutionmap.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28371-swift-genericparamlist-getsubstitutionmap-a3baf5.o
1. While type-checking expression at [validation-test/compiler_crashers/28371-swift-genericparamlist-getsubstitutionmap.swift:10:1 - line:10:58] RangeText="{protocol a{protocol b>class B<g:b>:a{func d:e}typealias e"
2. While type-checking 'a' at validation-test/compiler_crashers/28371-swift-genericparamlist-getsubstitutionmap.swift:10:2
3. While resolving type e at [validation-test/compiler_crashers/28371-swift-genericparamlist-getsubstitutionmap.swift:10:46 - line:10:46] RangeText="e"
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
|
||
|
|
095a68b195 |
[Sema] Disallow accessing enum elements as instance members
This implements SE-0036. |
||
|
|
82af6ffc80 |
[swiftc (71 vs. 5109)] Add crasher in swift::decomposeParamType(...)
Add test case for crash triggered in `swift::decomposeParamType(...)`.
Current number of unresolved compiler crashers: 71 (5109 resolved)
Assertion failure in `llvm/include/llvm/ADT/ArrayRef.h (line 186)`:
```
Assertion `Index < Length && "Invalid index!"' failed.
When executing: const T &llvm::ArrayRef<swift::ParamDecl *>::operator[](size_t) const [T = swift::ParamDecl *]
```
Assertion context:
```
/// @}
/// @name Operator Overloads
/// @{
const T &operator[](size_t Index) const {
assert(Index < Length && "Invalid index!");
return Data[Index];
}
/// @}
/// @name Expensive Operations
```
Stack trace:
```
swift: /path/to/llvm/include/llvm/ADT/ArrayRef.h:186: const T &llvm::ArrayRef<swift::ParamDecl *>::operator[](size_t) const [T = swift::ParamDecl *]: Assertion `Index < Length && "Invalid index!"' failed.
8 swift 0x0000000001131544 swift::decomposeParamType(swift::Type, swift::ValueDecl const*, unsigned int) + 708
12 swift 0x0000000000f75433 swift::constraints::ConstraintSystem::diagnoseFailureForExpr(swift::Expr*) + 99
13 swift 0x0000000000f7aabe swift::constraints::ConstraintSystem::salvage(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::Expr*) + 3998
14 swift 0x0000000000ead422 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>) + 850
15 swift 0x0000000000eb3be2 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 610
18 swift 0x0000000000f2c25a swift::TypeChecker::typeCheckFunctionBodyUntil(swift::FuncDecl*, swift::SourceLoc) + 346
19 swift 0x0000000000f2c0be swift::TypeChecker::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) + 46
20 swift 0x0000000000f2cc83 swift::TypeChecker::typeCheckAbstractFunctionBody(swift::AbstractFunctionDecl*) + 179
22 swift 0x0000000000ee7861 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1281
23 swift 0x0000000000c71a09 swift::CompilerInstance::performSema() + 3289
25 swift 0x00000000007d91c9 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2857
26 swift 0x00000000007a51e8 main + 2872
Stack dump:
0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28370-swift-decomposeparamtype.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28370-swift-decomposeparamtype-654b39.o
1. While type-checking 'c' at validation-test/compiler_crashers/28370-swift-decomposeparamtype.swift:11:1
2. While type-checking expression at [validation-test/compiler_crashers/28370-swift-decomposeparamtype.swift:11:10 - line:11:11] RangeText="c("
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
|
||
|
|
d10ea6ef75 |
Merge pull request #3588 from practicalswift/28369-swift-decl-walk.swift
[swiftc] Add non-fuzzing crash case submitted by @kiliankoe |
||
|
|
2cc72da9a0 | Further reduction thanks to @jtbandes | ||
|
|
80f0852504 |
[SE-0091] Allow 'static' operators to be declared within types and extensions thereof.
Allow 'static' (or, in classes, final 'class') operators to be declared within types and extensions thereof. Within protocols, require operators to be marked 'static'. Use a warning with a Fix-It to stage this in, so we don't break the world's code. Protocol conformance checking already seems to work, so add some tests for that. Update a pile of tests and the standard library to include the required 'static' keywords. There is an amusing name-mangling change here. Global operators were getting marked as 'static' (for silly reasons), so their mangled names had the 'Z' modifier for static methods, even though this doesn't make sense. Now, operators within types and extensions need to be 'static' as written. |
||
|
|
a1539f5331 |
[swiftc] Add non-fuzzing crash case submitted by @kiliankoe
Credits: https://twitter.com/kiliankoe/status/752090953977036800 |
||
|
|
fd8faa579d |
[swiftc (70 vs. 5108)] Add crasher in swift::Expr::propagateLValueAccessKind(...)
Add test case for crash triggered in `swift::Expr::propagateLValueAccessKind(...)`. Current number of unresolved compiler crashers: 70 (5108 resolved) Stack trace: ``` 6 swift 0x00000000032c80ad llvm::llvm_unreachable_internal(char const*, char const*, unsigned int) + 461 8 swift 0x00000000010f4c67 swift::Expr::propagateLValueAccessKind(swift::AccessKind, bool) + 23 12 swift 0x000000000107c7d5 swift::Expr::walk(swift::ASTWalker&) + 69 13 swift 0x0000000000f5bed2 swift::constraints::ConstraintSystem::applySolution(swift::constraints::Solution&, swift::Expr*, swift::Type, bool, bool, bool) + 514 14 swift 0x0000000000eb6971 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 769 17 swift 0x0000000000f7b572 swift::constraints::ConstraintSystem::diagnoseFailureForExpr(swift::Expr*) + 13586 18 swift 0x0000000000f7d74e swift::constraints::ConstraintSystem::salvage(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::Expr*) + 3998 19 swift 0x0000000000eb0112 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>) + 850 20 swift 0x0000000000eb68d2 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 610 21 swift 0x0000000000eb7a87 swift::TypeChecker::typeCheckBinding(swift::Pattern*&, swift::Expr*&, swift::DeclContext*) + 343 22 swift 0x0000000000eb8785 swift::TypeChecker::typeCheckStmtCondition(llvm::MutableArrayRef<swift::StmtConditionElement>&, swift::DeclContext*, swift::Diag<>) + 373 25 swift 0x0000000000f303b6 swift::TypeChecker::typeCheckTopLevelCodeDecl(swift::TopLevelCodeDecl*) + 134 26 swift 0x0000000000eea4bd swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1133 27 swift 0x0000000000c6f629 swift::CompilerInstance::performSema() + 3289 29 swift 0x00000000007d8f39 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2857 30 swift 0x00000000007a4f58 main + 2872 Stack dump: 0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28368-swift-expr-propagatelvalueaccesskind.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28368-swift-expr-propagatelvalueaccesskind-c5a6ea.o 1. While type-checking expression at [validation-test/compiler_crashers/28368-swift-expr-propagatelvalueaccesskind.swift:9:13 - line:9:19] RangeText=".h.a=[]" 2. While type-checking expression at [validation-test/compiler_crashers/28368-swift-expr-propagatelvalueaccesskind.swift:9:13 - line:9:19] RangeText=".h.a=[]" <unknown>:0: error: unable to execute command: Aborted <unknown>:0: error: compile command failed due to signal (use -v to see invocation) ``` |
||
|
|
0a3666e72b |
[swiftc (69 vs. 5108)] Add crasher in swift::DeclContext::isGenericContext(...)
Add test case for crash triggered in `swift::DeclContext::isGenericContext(...)`. Current number of unresolved compiler crashers: 69 (5108 resolved) Stack trace: ``` 4 swift 0x00000000010e5f27 swift::DeclContext::isGenericContext() const + 23 5 swift 0x00000000010dcea9 swift::ClassDecl::checkObjCAncestry() const + 185 6 swift 0x0000000000ebc685 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 421 7 swift 0x000000000111c5cb swift::DeclContext::lookupQualified(swift::Type, swift::DeclName, swift::NLOptions, swift::LazyResolver*, llvm::SmallVectorImpl<swift::ValueDecl*>&) const + 2667 8 swift 0x000000000111acaf swift::UnqualifiedLookup::UnqualifiedLookup(swift::DeclName, swift::DeclContext*, swift::LazyResolver*, bool, swift::SourceLoc, bool, bool) + 2495 9 swift 0x0000000000efe1cb swift::TypeChecker::lookupUnqualified(swift::DeclContext*, swift::DeclName, swift::SourceLoc, swift::OptionSet<swift::NameLookupFlags, unsigned int>) + 187 12 swift 0x0000000000f2fd6e swift::TypeChecker::resolveIdentifierType(swift::DeclContext*, swift::IdentTypeRepr*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, bool, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 158 14 swift 0x0000000000f30cc4 swift::TypeChecker::resolveType(swift::TypeRepr*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 164 15 swift 0x0000000000f2fc60 swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 192 16 swift 0x0000000000ebb05a swift::TypeChecker::checkInheritanceClause(swift::Decl*, swift::GenericTypeResolver*) + 5194 17 swift 0x0000000000ebc658 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 376 22 swift 0x0000000000ec1c86 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150 25 swift 0x0000000000f2899a swift::TypeChecker::typeCheckFunctionBodyUntil(swift::FuncDecl*, swift::SourceLoc) + 346 26 swift 0x0000000000f287fe swift::TypeChecker::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) + 46 27 swift 0x0000000000f293c3 swift::TypeChecker::typeCheckAbstractFunctionBody(swift::AbstractFunctionDecl*) + 179 29 swift 0x0000000000ee3f41 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1281 30 swift 0x0000000000c6f749 swift::CompilerInstance::performSema() + 3289 32 swift 0x00000000007d8f39 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2857 33 swift 0x00000000007a4f58 main + 2872 Stack dump: 0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28367-swift-declcontext-isgenericcontext.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28367-swift-declcontext-isgenericcontext-30331b.o 1. While type-checking getter for a at validation-test/compiler_crashers/28367-swift-declcontext-isgenericcontext.swift:9:6 2. While type-checking 'A' at validation-test/compiler_crashers/28367-swift-declcontext-isgenericcontext.swift:9:9 3. While resolving type d at [validation-test/compiler_crashers/28367-swift-declcontext-isgenericcontext.swift:9:28 - line:9:28] RangeText="d" <unknown>:0: error: unable to execute command: Segmentation fault <unknown>:0: error: compile command failed due to signal (use -v to see invocation) ``` |
||
|
|
7b8a834c30 |
[swiftc (68 vs. 5108)] Add crasher in swift::ArchetypeBuilder::finalize(...)
Add test case for crash triggered in `swift::ArchetypeBuilder::finalize(...)`. Current number of unresolved compiler crashers: 68 (5108 resolved) Assertion failure in [`lib/AST/ArchetypeBuilder.cpp (line 1686)`](https://github.com/apple/swift/blob/master/lib/AST/ArchetypeBuilder.cpp#L1686): ``` Assertion `dist > 0 && "nested type should have matched associated type"' failed. When executing: swift::Identifier typoCorrectNestedType(ArchetypeBuilder::PotentialArchetype *) ``` Assertion context: ``` continue; unsigned dist = name.edit_distance(assocType->getName().str(), /*allowReplacements=*/true, maxScore); assert(dist > 0 && "nested type should have matched associated type"); if (bestEditDistance == 0 || dist == bestEditDistance) { bestEditDistance = dist; maxScore = bestEditDistance; bestMatches.push_back(assocType->getName()); } else if (dist < bestEditDistance) { ``` Stack trace: ``` swift: /path/to/swift/lib/AST/ArchetypeBuilder.cpp:1686: swift::Identifier typoCorrectNestedType(ArchetypeBuilder::PotentialArchetype *): Assertion `dist > 0 && "nested type should have matched associated type"' failed. 8 swift 0x0000000000ff6e37 swift::ArchetypeBuilder::finalize(swift::SourceLoc) + 2231 9 swift 0x0000000000ef1ee7 swift::TypeChecker::validateGenericSignature(swift::GenericParamList*, swift::DeclContext*, swift::GenericSignature*, std::function<bool (swift::ArchetypeBuilder&)>, bool&) + 183 10 swift 0x0000000000ef2a1f swift::TypeChecker::validateGenericTypeSignature(swift::GenericTypeDecl*) + 111 11 swift 0x0000000000eb32fb swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 363 16 swift 0x0000000000eb8936 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150 17 swift 0x0000000000edaaf2 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1026 18 swift 0x0000000000c66849 swift::CompilerInstance::performSema() + 3289 20 swift 0x00000000007d8bb9 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2857 21 swift 0x00000000007a4bd8 main + 2872 Stack dump: 0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28366-swift-archetypebuilder-finalize.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28366-swift-archetypebuilder-finalize-f3dc29.o 1. While type-checking 'A' at validation-test/compiler_crashers/28366-swift-archetypebuilder-finalize.swift:11:2 <unknown>:0: error: unable to execute command: Aborted <unknown>:0: error: compile command failed due to signal (use -v to see invocation) ``` |
||
|
|
1a52f9cc75 |
[swiftc (67 vs. 5108)] Add crasher in swift::constraints::ConstraintGraphNode::getMemberType(…)
Add test case for crash triggered in `swift::constraints::ConstraintGraphNode::getMemberType(…)`.
Current number of unresolved compiler crashers: 67 (5108 resolved)
Stack trace:
```
6 swift 0x0000000000fe3696 swift::constraints::ConstraintGraphNode::getMemberType(swift::Identifier, std::function<swift::TypeVariableType* ()>) + 182
7 swift 0x0000000000fe425a swift::constraints::ConstraintGraph::getMemberType(swift::TypeVariableType*, swift::Identifier, std::function<swift::TypeVariableType* ()>) + 154
9 swift 0x000000000112b4e4 swift::Type::transform(llvm::function_ref<swift::Type (swift::Type)>) const + 36
10 swift 0x0000000000f438eb swift::constraints::ConstraintSystem::openGeneric(swift::DeclContext*, swift::DeclContext*, llvm::ArrayRef<swift::GenericTypeParamType*>, llvm::ArrayRef<swift::Requirement>, bool, swift::constraints::ConstraintLocatorBuilder, llvm::DenseMap<swift::CanType, swift::TypeVariableType*, llvm::DenseMapInfo<swift::CanType>, llvm::detail::DenseMapPair<swift::CanType, swift::TypeVariableType*> >&) + 1611
12 swift 0x000000000112b4e4 swift::Type::transform(llvm::function_ref<swift::Type (swift::Type)>) const + 36
13 swift 0x0000000000f41d9e swift::constraints::ConstraintSystem::openType(swift::Type, swift::constraints::ConstraintLocatorBuilder, llvm::DenseMap<swift::CanType, swift::TypeVariableType*, llvm::DenseMapInfo<swift::CanType>, llvm::detail::DenseMapPair<swift::CanType, swift::TypeVariableType*> >&) + 78
18 swift 0x000000000106e4be swift::Expr::walk(swift::ASTWalker&) + 46
19 swift 0x0000000000f8ba78 swift::constraints::ConstraintSystem::generateConstraints(swift::Expr*) + 200
20 swift 0x0000000000e9fb53 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>) + 371
21 swift 0x0000000000ea6492 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 610
22 swift 0x0000000000ea7647 swift::TypeChecker::typeCheckBinding(swift::Pattern*&, swift::Expr*&, swift::DeclContext*) + 343
23 swift 0x0000000000ea785b swift::TypeChecker::typeCheckPatternBinding(swift::PatternBindingDecl*, unsigned int) + 267
25 swift 0x0000000000eb363d swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 3853
27 swift 0x0000000000eb7ed6 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150
28 swift 0x0000000000eda092 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1026
29 swift 0x0000000000c65ea9 swift::CompilerInstance::performSema() + 3289
31 swift 0x00000000007d8b49 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2857
32 swift 0x00000000007a4b68 main + 2872
Stack dump:
0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28365-swift-constraints-constraintgraphnode-getmembertype.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28365-swift-constraints-constraintgraphnode-getmembertype-b3e759.o
1. While type-checking 'd' at validation-test/compiler_crashers/28365-swift-constraints-constraintgraphnode-getmembertype.swift:9:12
2. While type-checking expression at [validation-test/compiler_crashers/28365-swift-constraints-constraintgraphnode-getmembertype.swift:9:25 - line:9:27] RangeText="B{}"
<unknown>:0: error: unable to execute command: Segmentation fault
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
|
||
|
|
6898f60e20 |
Add 💥 (😢 → 66, 😀 → 5108) in swift::TypeChecker::addImplicitConstructors(…)
Add test case for crash triggered in `swift::TypeChecker::addImplicitConstructors(…)`. Assertion failure in [`lib/Sema/TypeCheckDecl.cpp (line 7354)`](https://github.com/apple/swift/blob/master/lib/Sema/TypeCheckDecl.cpp#L7354): ``` Assertion `!classDecl->hasSuperclass() || classDecl->getSuperclass()->getAnyNominal()->isInvalid() || classDecl->getSuperclass()->getAnyNominal() ->addedImplicitInitializers()' failed. When executing: void swift::TypeChecker::addImplicitConstructors(swift::NominalTypeDecl *) ``` <details> <summary>Assertion context:</summary> ``` && !structDecl->hasUnreferenceableStorage()) { // For a struct with memberwise initialized properties, we add a // memberwise init. if (FoundMemberwiseInitializedProperty) { // Create the implicit memberwise constructor. auto ctor = createImplicitConstructor( *this, decl, ImplicitConstructorKind::Memberwise); decl->addMember(ctor); } // If we found a stored property, add a default constructor. if (!SuppressDefaultInitializer) defineDefaultConstructor(decl); } return; } // For a class with a superclass, automatically define overrides // for all of the superclass's designated initializers. // FIXME: Currently skipping generic classes. auto classDecl = cast<ClassDecl>(decl); assert(!classDecl->hasSuperclass() || classDecl->getSuperclass()->getAnyNominal()->isInvalid() || classDecl->getSuperclass()->getAnyNominal() ->addedImplicitInitializers()); if (classDecl->hasSuperclass()) { bool canInheritInitializers = !FoundDesignatedInit; // We can't define these overrides if we have any uninitialized // stored properties. ``` </details> <details> <summary>Stack trace:</summary> ``` swift: /path/to/swift/lib/Sema/TypeCheckDecl.cpp:7354: void swift::TypeChecker::addImplicitConstructors(swift::NominalTypeDecl *): Assertion `!classDecl->hasSuperclass() || classDecl->getSuperclass()->getAnyNominal()->isInvalid() || classDecl->getSuperclass()->getAnyNominal() ->addedImplicitInitializers()' failed. 8 swift 0x0000000000ebd54a swift::TypeChecker::addImplicitConstructors(swift::NominalTypeDecl*) + 4506 9 swift 0x0000000000eb044e swift::TypeChecker::checkInheritanceClause(swift::Decl*, swift::GenericTypeResolver*) + 5854 10 swift 0x0000000000eb1778 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 376 11 swift 0x0000000001110bdb swift::DeclContext::lookupQualified(swift::Type, swift::DeclName, swift::NLOptions, swift::LazyResolver*, llvm::SmallVectorImpl<swift::ValueDecl*>&) const + 2667 12 swift 0x000000000110f2bf swift::UnqualifiedLookup::UnqualifiedLookup(swift::DeclName, swift::DeclContext*, swift::LazyResolver*, bool, swift::SourceLoc, bool, bool) + 2495 13 swift 0x0000000000ef32db swift::TypeChecker::lookupUnqualified(swift::DeclContext*, swift::DeclName, swift::SourceLoc, swift::OptionSet<swift::NameLookupFlags, unsigned int>) + 187 16 swift 0x0000000000f24b8e swift::TypeChecker::resolveIdentifierType(swift::DeclContext*, swift::IdentTypeRepr*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, bool, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 158 18 swift 0x0000000000f25ae4 swift::TypeChecker::resolveType(swift::TypeRepr*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 164 19 swift 0x0000000000f24a80 swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 192 20 swift 0x0000000000eb017a swift::TypeChecker::checkInheritanceClause(swift::Decl*, swift::GenericTypeResolver*) + 5130 21 swift 0x0000000000eb1778 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 376 22 swift 0x0000000001110bdb swift::DeclContext::lookupQualified(swift::Type, swift::DeclName, swift::NLOptions, swift::LazyResolver*, llvm::SmallVectorImpl<swift::ValueDecl*>&) const + 2667 23 swift 0x000000000110f2bf swift::UnqualifiedLookup::UnqualifiedLookup(swift::DeclName, swift::DeclContext*, swift::LazyResolver*, bool, swift::SourceLoc, bool, bool) + 2495 24 swift 0x0000000000ef32db swift::TypeChecker::lookupUnqualified(swift::DeclContext*, swift::DeclName, swift::SourceLoc, swift::OptionSet<swift::NameLookupFlags, unsigned int>) + 187 27 swift 0x0000000000f24b8e swift::TypeChecker::resolveIdentifierType(swift::DeclContext*, swift::IdentTypeRepr*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, bool, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 158 29 swift 0x0000000000f25ae4 swift::TypeChecker::resolveType(swift::TypeRepr*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 164 30 swift 0x0000000000f24a80 swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 192 32 swift 0x0000000000eef09e swift::TypeChecker::validateGenericFuncSignature(swift::AbstractFunctionDecl*) + 94 37 swift 0x0000000000eb6da6 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150 40 swift 0x0000000000f1eb64 swift::TypeChecker::typeCheckClosureBody(swift::ClosureExpr*) + 244 41 swift 0x0000000000f4aeac swift::constraints::ConstraintSystem::applySolution(swift::constraints::Solution&, swift::Expr*, swift::Type, bool, bool, bool) + 876 42 swift 0x0000000000ea5431 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 769 44 swift 0x0000000000f1eca6 swift::TypeChecker::typeCheckTopLevelCodeDecl(swift::TopLevelCodeDecl*) + 134 45 swift 0x0000000000ed8fcd swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1133 46 swift 0x0000000000c65a49 swift::CompilerInstance::performSema() + 3289 48 swift 0x00000000007d89b9 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2857 49 swift 0x00000000007a49d8 main + 2872 Stack dump: 0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28364-swift-typechecker-addimplicitconstructors.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28364-swift-typechecker-addimplicitconstructors-2a3ab6.o 1. While type-checking expression at [validation-test/compiler_crashers/28364-swift-typechecker-addimplicitconstructors.swift:10:1 - line:15:12] RangeText="{ 2. While type-checking 'd' at validation-test/compiler_crashers/28364-swift-typechecker-addimplicitconstructors.swift:11:1 3. While resolving type B<T> at [validation-test/compiler_crashers/28364-swift-typechecker-addimplicitconstructors.swift:12:8 - line:12:11] RangeText="B<T>" 4. While resolving type b at [validation-test/compiler_crashers/28364-swift-typechecker-addimplicitconstructors.swift:15:12 - line:15:12] RangeText="b" <unknown>:0: error: unable to execute command: Aborted <unknown>:0: error: compile command failed due to signal (use -v to see invocation) ``` </details> |
||
|
|
1aacf06971 |
Add 💥 (😢 → 65, 😀 → 5108) in swift::Expr::walk(…)
Add test case for crash triggered in `swift::Expr::walk(…)`.
Assertion failure in `llvm/include/llvm/Support/Casting.h (line 237)`:
```
Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed.
When executing: typename cast_retty<X, Y *>::ret_type llvm::cast(Y *) [X = swift::EnumType, Y = swift::TypeBase]
```
<details>
<summary>Assertion context:</summary>
```
//
template <class X, class Y>
inline typename std::enable_if<!is_simple_type<Y>::value,
typename cast_retty<X, const Y>::ret_type>::type
cast(const Y &Val) {
assert(isa<X>(Val) && "cast<Ty>() argument of incompatible type!");
return cast_convert_val<
X, const Y, typename simplify_type<const Y>::SimpleType>::doit(Val);
}
template <class X, class Y>
inline typename cast_retty<X, Y>::ret_type cast(Y &Val) {
assert(isa<X>(Val) && "cast<Ty>() argument of incompatible type!");
return cast_convert_val<X, Y,
typename simplify_type<Y>::SimpleType>::doit(Val);
}
template <class X, class Y>
inline typename cast_retty<X, Y *>::ret_type cast(Y *Val) {
assert(isa<X>(Val) && "cast<Ty>() argument of incompatible type!");
return cast_convert_val<X, Y*,
typename simplify_type<Y*>::SimpleType>::doit(Val);
}
// cast_or_null<X> - Functionally identical to cast, except that a null value is
// accepted.
//
template <class X, class Y>
LLVM_ATTRIBUTE_UNUSED_RESULT inline typename std::enable_if<
!is_simple_type<Y>::value, typename cast_retty<X, const Y>::ret_type>::type
```
</details>
<details>
<summary>Stack trace:</summary>
```
swift: /path/to/llvm/include/llvm/Support/Casting.h:237: typename cast_retty<X, Y *>::ret_type llvm::cast(Y *) [X = swift::EnumType, Y = swift::TypeBase]: Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed.
11 swift 0x000000000106cca5 swift::Expr::walk(swift::ASTWalker&) + 69
12 swift 0x0000000000f4ad42 swift::constraints::ConstraintSystem::applySolution(swift::constraints::Solution&, swift::Expr*, swift::Type, bool, bool, bool) + 514
13 swift 0x0000000000ea5431 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 769
14 swift 0x0000000000ea6547 swift::TypeChecker::typeCheckBinding(swift::Pattern*&, swift::Expr*&, swift::DeclContext*) + 343
15 swift 0x0000000000ea675b swift::TypeChecker::typeCheckPatternBinding(swift::PatternBindingDecl*, unsigned int) + 267
17 swift 0x0000000000eb250d swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 3853
21 swift 0x0000000000eb6da6 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150
22 swift 0x0000000000ed8f62 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1026
23 swift 0x0000000000c65a49 swift::CompilerInstance::performSema() + 3289
25 swift 0x00000000007d89b9 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2857
26 swift 0x00000000007a49d8 main + 2872
Stack dump:
0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28363-swift-expr-walk.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28363-swift-expr-walk-b823a6.o
1. While type-checking 'A' at validation-test/compiler_crashers/28363-swift-expr-walk.swift:11:1
2. While type-checking expression at [validation-test/compiler_crashers/28363-swift-expr-walk.swift:14:7 - line:14:7] RangeText="c"
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
</details>
|
||
|
|
0c1f140500 |
Add 💥 (😢 → 64, 😀 → 5107) in swift::constraints::ConstraintGraphNode::getAdjacency(…)
Add test case for crash triggered in `swift::constraints::ConstraintGraphNode::getAdjacency(…)`. Assertion failure in [`lib/Sema/ConstraintGraph.cpp (line 129)`](https://github.com/apple/swift/blob/master/lib/Sema/ConstraintGraph.cpp#L129): ``` Assertion `typeVar != TypeVar && "Cannot be adjacent to oneself"' failed. When executing: ConstraintGraphNode::Adjacency &swift::constraints::ConstraintGraphNode::getAdjacency(swift::TypeVariableType *) ``` <details> <summary>Assertion context:</summary> ``` // If this is the last constraint, just pop it off the list and we're done. unsigned lastIndex = Constraints.size()-1; if (index == lastIndex) { Constraints.pop_back(); return; } // This constraint is somewhere in the middle; swap it with the last // constraint, so we can remove the constraint from the vector in O(1) // time rather than O(n) time. auto lastConstraint = Constraints[lastIndex]; Constraints[index] = lastConstraint; ConstraintIndex[lastConstraint] = index; Constraints.pop_back(); } ConstraintGraphNode::Adjacency & ConstraintGraphNode::getAdjacency(TypeVariableType *typeVar) { assert(typeVar != TypeVar && "Cannot be adjacent to oneself"); // Look for existing adjacency information. auto pos = AdjacencyInfo.find(typeVar); if (pos != AdjacencyInfo.end()) return pos->second; // If we weren't already adjacent to this type variable, add it to the // list of adjacencies. pos = AdjacencyInfo.insert( ``` </details> <details> <summary>Stack trace:</summary> ``` swift: /path/to/swift/lib/Sema/ConstraintGraph.cpp:129: ConstraintGraphNode::Adjacency &swift::constraints::ConstraintGraphNode::getAdjacency(swift::TypeVariableType *): Assertion `typeVar != TypeVar && "Cannot be adjacent to oneself"' failed. 8 swift 0x0000000000fe1be8 swift::constraints::ConstraintGraphNode::getAdjacency(swift::TypeVariableType*) + 296 9 swift 0x0000000000fe15e2 swift::constraints::ConstraintGraph::bindTypeVariable(swift::TypeVariableType*, swift::Type) + 242 10 swift 0x0000000000f3f4de swift::constraints::ConstraintSystem::assignFixedType(swift::TypeVariableType*, swift::Type, bool) + 366 11 swift 0x0000000000fa2fdc swift::constraints::ConstraintSystem::matchTypes(swift::Type, swift::Type, swift::constraints::TypeMatchKind, unsigned int, swift::constraints::ConstraintLocatorBuilder) + 3404 12 swift 0x0000000000fa702d swift::constraints::ConstraintSystem::matchDeepEqualityTypes(swift::Type, swift::Type, swift::constraints::ConstraintLocatorBuilder) + 877 13 swift 0x0000000000fa7a43 swift::constraints::ConstraintSystem::simplifyRestrictedConstraint(swift::constraints::ConversionRestrictionKind, swift::Type, swift::Type, swift::constraints::TypeMatchKind, unsigned int, swift::constraints::ConstraintLocatorBuilder) + 1091 14 swift 0x0000000000fa4c92 swift::constraints::ConstraintSystem::matchTypes(swift::Type, swift::Type, swift::constraints::TypeMatchKind, unsigned int, swift::constraints::ConstraintLocatorBuilder) + 10754 15 swift 0x0000000000fa6b40 swift::constraints::ConstraintSystem::matchFunctionTypes(swift::FunctionType*, swift::FunctionType*, swift::constraints::TypeMatchKind, unsigned int, swift::constraints::ConstraintLocatorBuilder) + 672 16 swift 0x0000000000fa5d81 swift::constraints::ConstraintSystem::matchTypes(swift::Type, swift::Type, swift::constraints::TypeMatchKind, unsigned int, swift::constraints::ConstraintLocatorBuilder) + 15089 17 swift 0x0000000000fae6f2 swift::constraints::ConstraintSystem::simplifyConstraint(swift::constraints::Constraint const&) + 626 18 swift 0x0000000000fb1a79 swift::constraints::ConstraintSystem::simplify(bool) + 105 19 swift 0x0000000000fb4e80 swift::constraints::ConstraintSystem::solveRec(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 48 20 swift 0x0000000000fb8c83 swift::constraints::ConstraintSystem::solveSimplified(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 9171 21 swift 0x0000000000fb4f95 swift::constraints::ConstraintSystem::solveRec(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 325 22 swift 0x0000000000fb8c83 swift::constraints::ConstraintSystem::solveSimplified(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 9171 23 swift 0x0000000000fb4f95 swift::constraints::ConstraintSystem::solveRec(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 325 24 swift 0x0000000000fb7600 swift::constraints::ConstraintSystem::solveSimplified(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 3408 25 swift 0x0000000000fb4f95 swift::constraints::ConstraintSystem::solveRec(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 325 26 swift 0x0000000000fb8c83 swift::constraints::ConstraintSystem::solveSimplified(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 9171 27 swift 0x0000000000fb4f95 swift::constraints::ConstraintSystem::solveRec(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 325 28 swift 0x0000000000fb8c83 swift::constraints::ConstraintSystem::solveSimplified(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 9171 29 swift 0x0000000000fb4f95 swift::constraints::ConstraintSystem::solveRec(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 325 30 swift 0x0000000000fb7600 swift::constraints::ConstraintSystem::solveSimplified(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 3408 31 swift 0x0000000000fb4f95 swift::constraints::ConstraintSystem::solveRec(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 325 32 swift 0x0000000000fb8c83 swift::constraints::ConstraintSystem::solveSimplified(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 9171 33 swift 0x0000000000fb4f95 swift::constraints::ConstraintSystem::solveRec(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 325 34 swift 0x0000000000fb8c83 swift::constraints::ConstraintSystem::solveSimplified(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 9171 35 swift 0x0000000000fb4f95 swift::constraints::ConstraintSystem::solveRec(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 325 36 swift 0x0000000000fb8c83 swift::constraints::ConstraintSystem::solveSimplified(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 9171 37 swift 0x0000000000fb4f95 swift::constraints::ConstraintSystem::solveRec(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 325 38 swift 0x0000000000fb8c83 swift::constraints::ConstraintSystem::solveSimplified(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 9171 39 swift 0x0000000000fb4f95 swift::constraints::ConstraintSystem::solveRec(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 325 40 swift 0x0000000000fb4d49 swift::constraints::ConstraintSystem::solve(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 73 41 swift 0x0000000000e9ec00 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>) + 800 42 swift 0x0000000000ea5392 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 610 44 swift 0x0000000000f1eca6 swift::TypeChecker::typeCheckTopLevelCodeDecl(swift::TopLevelCodeDecl*) + 134 45 swift 0x0000000000ed8fcd swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1133 46 swift 0x0000000000c65a49 swift::CompilerInstance::performSema() + 3289 48 swift 0x00000000007d89b9 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2857 49 swift 0x00000000007a49d8 main + 2872 Stack dump: 0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28362-swift-constraints-constraintgraphnode-getadjacency.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28362-swift-constraints-constraintgraphnode-getadjacency-2beaa7.o 1. While type-checking expression at [validation-test/compiler_crashers/28362-swift-constraints-constraintgraphnode-getadjacency.swift:10:1 - line:10:10] RangeText="[1,{[1,{[]" <unknown>:0: error: unable to execute command: Aborted <unknown>:0: error: compile command failed due to signal (use -v to see invocation) ``` </details> |
||
|
|
76844eebef |
Add 💥 (😢 → 63, 😀 → 5107) in swift::ArchetypeBuilder::mapTypeIntoContext(…)
Add test case for crash triggered in `swift::ArchetypeBuilder::mapTypeIntoContext(…)`. Assertion failure in [`lib/AST/ArchetypeBuilder.cpp (line 2037)`](https://github.com/apple/swift/blob/master/lib/AST/ArchetypeBuilder.cpp#L2037): ``` Assertion `genericParams && "dependent type in non-generic context"' failed. When executing: static swift::Type swift::ArchetypeBuilder::mapTypeIntoContext(Module *, swift::GenericParamList *, swift::Type, swift::LazyResolver *) ``` <details> <summary>Assertion context:</summary> ``` out << "\n"; } Type ArchetypeBuilder::mapTypeIntoContext(const DeclContext *dc, Type type, LazyResolver *resolver) { auto genericParams = dc->getGenericParamsOfContext(); return mapTypeIntoContext(dc->getParentModule(), genericParams, type, resolver); } Type ArchetypeBuilder::mapTypeIntoContext(Module *M, GenericParamList *genericParams, Type type, LazyResolver *resolver) { auto canType = type->getCanonicalType(); assert(!canType->hasArchetype() && "already have a contextual type"); if (!canType->hasTypeParameter()) return type; assert(genericParams && "dependent type in non-generic context"); unsigned genericParamsDepth = genericParams->getDepth(); type = type.transform([&](Type type) -> Type { // Map a generic parameter type to its archetype. if (auto gpType = type->getAs<GenericTypeParamType>()) { auto index = gpType->getIndex(); unsigned depth = gpType->getDepth(); // Skip down to the generic parameter list that houses the corresponding // generic parameter. ``` </details> <details> <summary>Stack trace:</summary> ``` swift: /path/to/swift/lib/AST/ArchetypeBuilder.cpp:2037: static swift::Type swift::ArchetypeBuilder::mapTypeIntoContext(Module *, swift::GenericParamList *, swift::Type, swift::LazyResolver *): Assertion `genericParams && "dependent type in non-generic context"' failed. 8 swift 0x0000000000ff2e93 swift::ArchetypeBuilder::mapTypeIntoContext(swift::ModuleDecl*, swift::GenericParamList*, swift::Type, swift::LazyResolver*) + 243 12 swift 0x0000000000eb3b36 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150 15 swift 0x0000000000f1b9e4 swift::TypeChecker::typeCheckClosureBody(swift::ClosureExpr*) + 244 16 swift 0x0000000000f47d2c swift::constraints::ConstraintSystem::applySolution(swift::constraints::Solution&, swift::Expr*, swift::Type, bool, bool, bool) + 876 17 swift 0x0000000000ea21c1 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 769 18 swift 0x0000000000ea32d7 swift::TypeChecker::typeCheckBinding(swift::Pattern*&, swift::Expr*&, swift::DeclContext*) + 343 19 swift 0x0000000000ea34eb swift::TypeChecker::typeCheckPatternBinding(swift::PatternBindingDecl*, unsigned int) + 267 24 swift 0x0000000000eb3b36 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150 25 swift 0x0000000000ed5cf2 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1026 26 swift 0x0000000000c62529 swift::CompilerInstance::performSema() + 3289 28 swift 0x00000000007d8649 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2857 29 swift 0x00000000007a4668 main + 2872 Stack dump: 0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28361-swift-archetypebuilder-maptypeintocontext.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28361-swift-archetypebuilder-maptypeintocontext-8b9576.o 1. While type-checking 'a' at validation-test/compiler_crashers/28361-swift-archetypebuilder-maptypeintocontext.swift:11:1 2. While type-checking expression at [validation-test/compiler_crashers/28361-swift-archetypebuilder-maptypeintocontext.swift:11:15 - line:13:11] RangeText="{associatedtype e 3. While type-checking 'S' at validation-test/compiler_crashers/28361-swift-archetypebuilder-maptypeintocontext.swift:13:1 <unknown>:0: error: unable to execute command: Aborted <unknown>:0: error: compile command failed due to signal (use -v to see invocation) ``` </details> |
||
|
|
97f0b5c7c6 |
Add 💥 (😢 → 62, 😀 → 5107) in swift::ArchetypeBuilder::mapTypeOutOfContext(…)
Add test case for crash triggered in `swift::ArchetypeBuilder::mapTypeOutOfContext(…)`. Assertion failure in [`lib/AST/ArchetypeBuilder.cpp (line 2096)`](https://github.com/apple/swift/blob/master/lib/AST/ArchetypeBuilder.cpp#L2096): ``` Assertion `genericParams && "dependent type in non-generic context"' failed. When executing: static swift::Type swift::ArchetypeBuilder::mapTypeOutOfContext(swift::ModuleDecl *, swift::GenericParamList *, swift::Type) ``` <details> <summary>Assertion context:</summary> ``` assert(!type->hasTypeParameter() && "not fully substituted"); return type; } Type ArchetypeBuilder::mapTypeOutOfContext(const DeclContext *dc, Type type) { GenericParamList *genericParams = dc->getGenericParamsOfContext(); return mapTypeOutOfContext(dc->getParentModule(), genericParams, type); } Type ArchetypeBuilder::mapTypeOutOfContext(ModuleDecl *M, GenericParamList *genericParams, Type type) { auto canType = type->getCanonicalType(); assert(!canType->hasTypeParameter() && "already have an interface type"); if (!canType->hasArchetype()) return type; assert(genericParams && "dependent type in non-generic context"); // Capture the archetype -> interface type mapping. TypeSubstitutionMap subs; for (auto params = genericParams; params != nullptr; params = params->getOuterParameters()) { for (auto param : *params) { subs[param->getArchetype()] = param->getDeclaredType(); } } ``` </details> <details> <summary>Stack trace:</summary> ``` swift: /path/to/swift/lib/AST/ArchetypeBuilder.cpp:2096: static swift::Type swift::ArchetypeBuilder::mapTypeOutOfContext(swift::ModuleDecl *, swift::GenericParamList *, swift::Type): Assertion `genericParams && "dependent type in non-generic context"' failed. 8 swift 0x0000000000ff26b4 swift::ArchetypeBuilder::mapTypeOutOfContext(swift::ModuleDecl*, swift::GenericParamList*, swift::Type) + 324 11 swift 0x0000000000efd15e swift::TypeChecker::resolveTypeWitness(swift::NormalProtocolConformance const*, swift::AssociatedTypeDecl*) + 254 12 swift 0x0000000001116c16 swift::NormalProtocolConformance::getTypeWitnessSubstAndDecl(swift::AssociatedTypeDecl*, swift::LazyResolver*) const + 150 13 swift 0x0000000001116b58 swift::ProtocolConformance::getTypeWitnessSubstAndDecl(swift::AssociatedTypeDecl*, swift::LazyResolver*) const + 40 14 swift 0x0000000001117326 swift::ProtocolConformance::getTypeWitness(swift::AssociatedTypeDecl*, swift::LazyResolver*) const + 6 17 swift 0x0000000001125fc4 swift::Type::transform(llvm::function_ref<swift::Type (swift::Type)>) const + 36 18 swift 0x000000000111f4d4 swift::Type::subst(swift::ModuleDecl*, llvm::DenseMap<swift::TypeBase*, swift::Type, llvm::DenseMapInfo<swift::TypeBase*>, llvm::detail::DenseMapPair<swift::TypeBase*, swift::Type> >&, swift::OptionSet<swift::SubstFlags, unsigned int>) const + 68 19 swift 0x0000000000f448cf swift::constraints::Solution::computeSubstitutions(swift::Type, swift::DeclContext*, swift::Type, swift::constraints::ConstraintLocator*, llvm::SmallVectorImpl<swift::Substitution>&) const + 943 24 swift 0x0000000001069455 swift::Expr::walk(swift::ASTWalker&) + 69 25 swift 0x0000000000f474f2 swift::constraints::ConstraintSystem::applySolution(swift::constraints::Solution&, swift::Expr*, swift::Type, bool, bool, bool) + 514 26 swift 0x0000000000ea2121 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 769 28 swift 0x0000000000f63f3f swift::constraints::ConstraintSystem::diagnoseFailureForExpr(swift::Expr*) + 207 29 swift 0x0000000000f6985e swift::constraints::ConstraintSystem::salvage(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::Expr*) + 3998 30 swift 0x0000000000e9b922 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>) + 850 31 swift 0x0000000000ea2082 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 610 34 swift 0x0000000000f63ed9 swift::constraints::ConstraintSystem::diagnoseFailureForExpr(swift::Expr*) + 105 35 swift 0x0000000000f6985e swift::constraints::ConstraintSystem::salvage(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::Expr*) + 3998 36 swift 0x0000000000e9b922 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>) + 850 37 swift 0x0000000000ea2082 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 610 38 swift 0x0000000000ea3237 swift::TypeChecker::typeCheckBinding(swift::Pattern*&, swift::Expr*&, swift::DeclContext*) + 343 39 swift 0x0000000000ea344b swift::TypeChecker::typeCheckPatternBinding(swift::PatternBindingDecl*, unsigned int) + 267 46 swift 0x0000000000eb3a96 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150 47 swift 0x0000000000ed5c22 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1026 48 swift 0x0000000000c624c9 swift::CompilerInstance::performSema() + 3289 50 swift 0x00000000007d85e9 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2857 51 swift 0x00000000007a4608 main + 2872 Stack dump: 0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28360-swift-archetypebuilder-maptypeoutofcontext.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28360-swift-archetypebuilder-maptypeoutofcontext-089464.o 1. While type-checking 'A' at validation-test/compiler_crashers/28360-swift-archetypebuilder-maptypeoutofcontext.swift:10:1 2. While type-checking expression at [validation-test/compiler_crashers/28360-swift-archetypebuilder-maptypeoutofcontext.swift:10:52 - line:10:59] RangeText="A.a as a" 3. While type-checking expression at [validation-test/compiler_crashers/28360-swift-archetypebuilder-maptypeoutofcontext.swift:10:52 - line:10:54] RangeText="A.a" 4. While type-checking expression at [validation-test/compiler_crashers/28360-swift-archetypebuilder-maptypeoutofcontext.swift:10:52 - line:10:54] RangeText="A.a" <unknown>:0: error: unable to execute command: Aborted <unknown>:0: error: compile command failed due to signal (use -v to see invocation) ``` </details> |
||
|
|
73a715d958 |
Add 💥 (😢 → 61, 😀 → 5107) in swift::constraints::ConstraintSystem::addTypeVariableConstraintsToWorkList(…)
Add test case for crash triggered in `swift::constraints::ConstraintSystem::addTypeVariableConstraintsToWorkList(…)`.
<details>
<summary>Stack trace:</summary>
```
4 swift 0x0000000000f3b8e1 swift::constraints::ConstraintSystem::addTypeVariableConstraintsToWorkList(swift::TypeVariableType*) + 113
5 swift 0x0000000000f3bae9 swift::constraints::ConstraintSystem::assignFixedType(swift::TypeVariableType*, swift::Type, bool) + 377
6 swift 0x0000000000fabea8 swift::constraints::ConstraintSystem::finalize(swift::FreeTypeVariableBinding) + 792
7 swift 0x0000000000fb5933 swift::constraints::ConstraintSystem::solveSimplified(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 11843
8 swift 0x0000000000fb11d5 swift::constraints::ConstraintSystem::solveRec(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 325
9 swift 0x0000000000fb4ec3 swift::constraints::ConstraintSystem::solveSimplified(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 9171
10 swift 0x0000000000fb11d5 swift::constraints::ConstraintSystem::solveRec(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 325
11 swift 0x0000000000fb4ec3 swift::constraints::ConstraintSystem::solveSimplified(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 9171
12 swift 0x0000000000fb1d29 swift::constraints::ConstraintSystem::solveRec(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 3225
13 swift 0x0000000000fb3840 swift::constraints::ConstraintSystem::solveSimplified(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 3408
14 swift 0x0000000000fb11d5 swift::constraints::ConstraintSystem::solveRec(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 325
15 swift 0x0000000000fb0f89 swift::constraints::ConstraintSystem::solve(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 73
16 swift 0x0000000000e9b6d0 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>) + 800
17 swift 0x0000000000ea1e62 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 610
20 swift 0x0000000000f63cb9 swift::constraints::ConstraintSystem::diagnoseFailureForExpr(swift::Expr*) + 105
21 swift 0x0000000000f6963e swift::constraints::ConstraintSystem::salvage(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::Expr*) + 3998
22 swift 0x0000000000e9b702 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>) + 850
23 swift 0x0000000000ea1e62 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 610
26 swift 0x0000000000f19dea swift::TypeChecker::typeCheckFunctionBodyUntil(swift::FuncDecl*, swift::SourceLoc) + 346
27 swift 0x0000000000f19c4e swift::TypeChecker::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) + 46
28 swift 0x0000000000f1a813 swift::TypeChecker::typeCheckAbstractFunctionBody(swift::AbstractFunctionDecl*) + 179
30 swift 0x0000000000ed5b01 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1281
31 swift 0x0000000000c62229 swift::CompilerInstance::performSema() + 3289
33 swift 0x00000000007d85a9 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2857
34 swift 0x00000000007a45c8 main + 2872
Stack dump:
0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28359-swift-constraints-constraintsystem-addtypevariableconstraintstoworklist.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28359-swift-constraints-constraintsystem-addtypevariableconstraintstoworklist-e0b297.o
1. While type-checking 'b' at validation-test/compiler_crashers/28359-swift-constraints-constraintsystem-addtypevariableconstraintstoworklist.swift:9:28
2. While type-checking expression at [validation-test/compiler_crashers/28359-swift-constraints-constraintsystem-addtypevariableconstraintstoworklist.swift:9:35 - line:9:40] RangeText="{{a(a{"
3. While type-checking expression at [validation-test/compiler_crashers/28359-swift-constraints-constraintsystem-addtypevariableconstraintstoworklist.swift:9:36 - line:9:40] RangeText="{a(a{"
<unknown>:0: error: unable to execute command: Segmentation fault
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
</details>
|
||
|
|
9b27a531da |
Add 💥 (😢 → 60, 😀 → 5107) in swift::TypeChecker::validateDecl(…)
Add test case for crash triggered in `swift::TypeChecker::validateDecl(…)`. Assertion failure in [`lib/AST/ArchetypeBuilder.cpp (line 2109)`](https://github.com/apple/swift/blob/master/lib/AST/ArchetypeBuilder.cpp#L2109): ``` Assertion `!type->hasArchetype() && "not fully substituted"' failed. When executing: static swift::Type swift::ArchetypeBuilder::mapTypeOutOfContext(swift::ModuleDecl *, swift::GenericParamList *, swift::Type) ``` <details> <summary>Assertion context:</summary> ``` Type type) { auto canType = type->getCanonicalType(); assert(!canType->hasTypeParameter() && "already have an interface type"); if (!canType->hasArchetype()) return type; assert(genericParams && "dependent type in non-generic context"); // Capture the archetype -> interface type mapping. TypeSubstitutionMap subs; for (auto params = genericParams; params != nullptr; params = params->getOuterParameters()) { for (auto param : *params) { subs[param->getArchetype()] = param->getDeclaredType(); } } type = type.subst(M, subs, SubstFlags::AllowLoweredTypes); assert(!type->hasArchetype() && "not fully substituted"); return type; } bool ArchetypeBuilder::addGenericSignature(GenericSignature *sig, bool adoptArchetypes, bool treatRequirementsAsExplicit) { if (!sig) return false; RequirementSource::Kind sourceKind = treatRequirementsAsExplicit ? RequirementSource::Explicit ``` </details> <details> <summary>Stack trace:</summary> ``` swift: /path/to/swift/lib/AST/ArchetypeBuilder.cpp:2109: static swift::Type swift::ArchetypeBuilder::mapTypeOutOfContext(swift::ModuleDecl *, swift::GenericParamList *, swift::Type): Assertion `!type->hasArchetype() && "not fully substituted"' failed. 11 swift 0x0000000000eaefdd swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 3853 12 swift 0x0000000000f3377d swift::createImplicitConstructor(swift::TypeChecker&, swift::NominalTypeDecl*, swift::ImplicitConstructorKind) + 413 13 swift 0x0000000000eb9480 swift::TypeChecker::addImplicitConstructors(swift::NominalTypeDecl*) + 1536 16 swift 0x0000000000eb3876 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150 19 swift 0x0000000000f1b164 swift::TypeChecker::typeCheckClosureBody(swift::ClosureExpr*) + 244 20 swift 0x0000000000f4743c swift::constraints::ConstraintSystem::applySolution(swift::constraints::Solution&, swift::Expr*, swift::Type, bool, bool, bool) + 876 21 swift 0x0000000000ea1f01 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 769 23 swift 0x0000000000f1b2a6 swift::TypeChecker::typeCheckTopLevelCodeDecl(swift::TopLevelCodeDecl*) + 134 24 swift 0x0000000000ed5a6d swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1133 25 swift 0x0000000000c62229 swift::CompilerInstance::performSema() + 3289 27 swift 0x00000000007d85a9 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2857 28 swift 0x00000000007a45c8 main + 2872 Stack dump: 0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28358-swift-typechecker-validatedecl.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28358-swift-typechecker-validatedecl-0ed663.o 1. While type-checking expression at [validation-test/compiler_crashers/28358-swift-typechecker-validatedecl.swift:10:1 - line:10:36] RangeText="{struct B<h{typealias B<T>:T>var d=B" 2. While type-checking 'B' at validation-test/compiler_crashers/28358-swift-typechecker-validatedecl.swift:10:2 <unknown>:0: error: unable to execute command: Aborted <unknown>:0: error: compile command failed due to signal (use -v to see invocation) ``` </details> |
||
|
|
d0ed7d3e80 |
Add 💥 (😢 → 59, 😀 → 5107) in swift::IterativeTypeChecker::processTypeCheckSuperclass(…)
Add test case for crash triggered in `swift::IterativeTypeChecker::processTypeCheckSuperclass(…)`. Assertion failure in [`lib/AST/Decl.cpp (line 4765)`](https://github.com/apple/swift/blob/master/lib/AST/Decl.cpp#L4765): ``` Assertion `(!superclass || !superclass->hasArchetype()) && "superclass must be interface type"' failed. When executing: void swift::ClassDecl::setSuperclass(swift::Type) ``` <details> <summary>Assertion context:</summary> ``` // Make sure the clang node has swift_newtype attribute if (!structDecl->getClangNode()) return {}; auto clangNode = structDecl->getClangNode(); if (!clangNode.getAsDecl() || !clangNode.castAsDecl()->getAttr<clang::SwiftNewtypeAttr>()) return {}; // Underlying type is the type of rawValue for (auto member : structDecl->getMembers()) if (auto varDecl = dyn_cast<VarDecl>(member)) if (varDecl->getName().str() == "rawValue") return varDecl->getType(); return {}; } ClassDecl *ClassDecl::getSuperclassDecl() const { if (auto superclass = getSuperclass()) return superclass->getClassOrBoundGenericClass(); return nullptr; } void ClassDecl::setSuperclass(Type superclass) { assert((!superclass || !superclass->hasArchetype()) && "superclass must be interface type"); LazySemanticInfo.Superclass.setPointerAndInt(superclass, true); } ``` </details> <details> <summary>Stack trace:</summary> ``` swift: /path/to/swift/lib/AST/Decl.cpp:4765: void swift::ClassDecl::setSuperclass(swift::Type): Assertion `(!superclass || !superclass->hasArchetype()) && "superclass must be interface type"' failed. 9 swift 0x0000000000fe724d swift::IterativeTypeChecker::processTypeCheckSuperclass(swift::ClassDecl*, llvm::function_ref<bool (swift::TypeCheckRequest)>) + 269 10 swift 0x0000000000fbf0dd swift::IterativeTypeChecker::satisfy(swift::TypeCheckRequest) + 493 11 swift 0x0000000000eaaca0 swift::TypeChecker::resolveSuperclass(swift::ClassDecl*) + 64 12 swift 0x0000000001131899 swift::ConformanceLookupTable::updateLookupTable(swift::NominalTypeDecl*, swift::ConformanceLookupTable::ConformanceStage, swift::LazyResolver*) + 217 13 swift 0x0000000001131df2 swift::ConformanceLookupTable::updateLookupTable(swift::NominalTypeDecl*, swift::ConformanceLookupTable::ConformanceStage, swift::LazyResolver*) + 1586 14 swift 0x0000000001135a3e swift::ConformanceLookupTable::getAllProtocols(swift::NominalTypeDecl*, swift::LazyResolver*, llvm::SmallVectorImpl<swift::ProtocolDecl*>&) + 30 15 swift 0x000000000111756f swift::NominalTypeDecl::getAllProtocols() const + 95 16 swift 0x000000000110bf10 swift::DeclContext::lookupQualified(swift::Type, swift::DeclName, swift::NLOptions, swift::LazyResolver*, llvm::SmallVectorImpl<swift::ValueDecl*>&) const + 3104 17 swift 0x0000000000eeffaa swift::TypeChecker::lookupMemberType(swift::DeclContext*, swift::Type, swift::Identifier, swift::OptionSet<swift::NameLookupFlags, unsigned int>) + 298 19 swift 0x0000000000f2079e swift::TypeChecker::resolveIdentifierType(swift::DeclContext*, swift::IdentTypeRepr*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, bool, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 158 21 swift 0x0000000000f216f4 swift::TypeChecker::resolveType(swift::TypeRepr*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 164 22 swift 0x0000000000f20690 swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 192 24 swift 0x0000000000eeb21e swift::TypeChecker::validateGenericFuncSignature(swift::AbstractFunctionDecl*) + 94 27 swift 0x0000000000eada93 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 947 29 swift 0x0000000000eae424 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 3396 30 swift 0x000000000110bd5b swift::DeclContext::lookupQualified(swift::Type, swift::DeclName, swift::NLOptions, swift::LazyResolver*, llvm::SmallVectorImpl<swift::ValueDecl*>&) const + 2667 31 swift 0x000000000110a5fb swift::UnqualifiedLookup::UnqualifiedLookup(swift::DeclName, swift::DeclContext*, swift::LazyResolver*, bool, swift::SourceLoc, bool, bool) + 2491 32 swift 0x0000000000eef27b swift::TypeChecker::lookupUnqualified(swift::DeclContext*, swift::DeclName, swift::SourceLoc, swift::OptionSet<swift::NameLookupFlags, unsigned int>) + 187 35 swift 0x0000000000f2079e swift::TypeChecker::resolveIdentifierType(swift::DeclContext*, swift::IdentTypeRepr*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, bool, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 158 37 swift 0x0000000000f216f4 swift::TypeChecker::resolveType(swift::TypeRepr*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 164 38 swift 0x0000000000f20690 swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 192 39 swift 0x0000000000eac25a swift::TypeChecker::checkInheritanceClause(swift::Decl*, swift::GenericTypeResolver*) + 5130 40 swift 0x0000000000ead858 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 376 41 swift 0x000000000110bd5b swift::DeclContext::lookupQualified(swift::Type, swift::DeclName, swift::NLOptions, swift::LazyResolver*, llvm::SmallVectorImpl<swift::ValueDecl*>&) const + 2667 42 swift 0x000000000110a5fb swift::UnqualifiedLookup::UnqualifiedLookup(swift::DeclName, swift::DeclContext*, swift::LazyResolver*, bool, swift::SourceLoc, bool, bool) + 2491 43 swift 0x0000000000eef27b swift::TypeChecker::lookupUnqualified(swift::DeclContext*, swift::DeclName, swift::SourceLoc, swift::OptionSet<swift::NameLookupFlags, unsigned int>) + 187 47 swift 0x0000000000f2079e swift::TypeChecker::resolveIdentifierType(swift::DeclContext*, swift::IdentTypeRepr*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, bool, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 158 49 swift 0x0000000000f216f4 swift::TypeChecker::resolveType(swift::TypeRepr*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 164 50 swift 0x0000000000f20690 swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 192 52 swift 0x0000000000eeb21e swift::TypeChecker::validateGenericFuncSignature(swift::AbstractFunctionDecl*) + 94 59 swift 0x0000000000eb2e86 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150 60 swift 0x0000000000ed5012 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1026 61 swift 0x0000000000c61999 swift::CompilerInstance::performSema() + 3289 63 swift 0x00000000007d8599 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2857 64 swift 0x00000000007a45b8 main + 2872 Stack dump: 0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28357-swift-iterativetypechecker-processtypechecksuperclass.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28357-swift-iterativetypechecker-processtypechecksuperclass-de5782.o 1. While type-checking 'B' at validation-test/compiler_crashers/28357-swift-iterativetypechecker-processtypechecksuperclass.swift:10:1 2. While resolving type A.h at [validation-test/compiler_crashers/28357-swift-iterativetypechecker-processtypechecksuperclass.swift:10:26 - line:10:28] RangeText="A.h" 3. While resolving type d at [validation-test/compiler_crashers/28357-swift-iterativetypechecker-processtypechecksuperclass.swift:10:39 - line:10:39] RangeText="d" 4. While type-checking 'd' at validation-test/compiler_crashers/28357-swift-iterativetypechecker-processtypechecksuperclass.swift:10:41 5. While type-checking 'd' at validation-test/compiler_crashers/28357-swift-iterativetypechecker-processtypechecksuperclass.swift:10:19 6. While resolving type A.h at [validation-test/compiler_crashers/28357-swift-iterativetypechecker-processtypechecksuperclass.swift:10:26 - line:10:28] RangeText="A.h" <unknown>:0: error: unable to execute command: Aborted <unknown>:0: error: compile command failed due to signal (use -v to see invocation) ``` </details> |
||
|
|
8d90eac104 |
Add 💥 (😢 → 58, 😀 → 5107) in swift::GenericSignature::getSubstitutionMap(…)
Add test case for crash triggered in `swift::GenericSignature::getSubstitutionMap(…)`. Assertion failure in [`lib/AST/GenericSignature.cpp (line 413)`](https://github.com/apple/swift/blob/master/lib/AST/GenericSignature.cpp#L413): ``` Assertion `args.empty() && "did not use all substitutions?!"' failed. When executing: TypeSubstitutionMap swift::GenericSignature::getSubstitutionMap(ArrayRef<swift::Substitution>) const ``` <details> <summary>Assertion context:</summary> ``` // An empty parameter list gives an empty map. if (getGenericParams().empty()) { assert(args.empty() && "substitutions but no generic params?!"); return subs; } // Seed the type map with pre-existing substitutions. for (auto depTy : getAllDependentTypes()) { auto replacement = args.front().getReplacement(); args = args.slice(1); if (auto subTy = depTy->getAs<SubstitutableType>()) { subs[subTy->getCanonicalType().getPointer()] = replacement; } else if (auto dTy = depTy->getAs<DependentMemberType>()) { subs[dTy->getCanonicalType().getPointer()] = replacement; } } assert(args.empty() && "did not use all substitutions?!"); ``` </details> <details> <summary>Stack trace:</summary> ``` swift: /path/to/swift/lib/AST/GenericSignature.cpp:413: TypeSubstitutionMap swift::GenericSignature::getSubstitutionMap(ArrayRef<swift::Substitution>) const: Assertion `args.empty() && "did not use all substitutions?!"' failed. 8 swift 0x00000000010e5a13 swift::GenericSignature::getSubstitutionMap(llvm::ArrayRef<swift::Substitution>) const + 659 9 swift 0x000000000111fe47 swift::TypeBase::getSuperclass(swift::LazyResolver*) + 215 10 swift 0x00000000011337d2 swift::ConformanceLookupTable::getConformance(swift::NominalTypeDecl*, swift::LazyResolver*, swift::ConformanceLookupTable::ConformanceEntry*) + 290 12 swift 0x0000000001133ef4 swift::ConformanceLookupTable::lookupConformances(swift::NominalTypeDecl*, swift::DeclContext*, swift::LazyResolver*, swift::ConformanceLookupKind, llvm::SmallVectorImpl<swift::ProtocolDecl*>*, llvm::SmallVectorImpl<swift::ProtocolConformance*>*, llvm::SmallVectorImpl<swift::ConformanceDiagnostic>*) + 692 13 swift 0x0000000001116274 swift::DeclContext::getLocalConformances(swift::ConformanceLookupKind, llvm::SmallVectorImpl<swift::ConformanceDiagnostic>*, bool) const + 212 14 swift 0x0000000000efa8fa swift::TypeChecker::findWitnessedObjCRequirements(swift::ValueDecl const*, bool) + 122 26 swift 0x0000000000eb1686 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150 29 swift 0x0000000000f17bca swift::TypeChecker::typeCheckFunctionBodyUntil(swift::FuncDecl*, swift::SourceLoc) + 346 30 swift 0x0000000000f17a2e swift::TypeChecker::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) + 46 31 swift 0x0000000000f185f3 swift::TypeChecker::typeCheckAbstractFunctionBody(swift::AbstractFunctionDecl*) + 179 33 swift 0x0000000000ed38e1 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1281 34 swift 0x0000000000c60b89 swift::CompilerInstance::performSema() + 3289 36 swift 0x00000000007d8429 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2857 37 swift 0x00000000007a4458 main + 2872 Stack dump: 0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28355-swift-genericsignature-getsubstitutionmap.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28355-swift-genericsignature-getsubstitutionmap-792793.o 1. While type-checking 'a' at validation-test/compiler_crashers/28355-swift-genericsignature-getsubstitutionmap.swift:10:1 2. While type-checking 'A' at validation-test/compiler_crashers/28355-swift-genericsignature-getsubstitutionmap.swift:10:8 <unknown>:0: error: unable to execute command: Aborted <unknown>:0: error: compile command failed due to signal (use -v to see invocation) ``` </details> |
||
|
|
7858c691cf |
Add 💥 (😢 → 57, 😀 → 5107) in swift::ConformanceLookupTable::lookupConformances(…)
Add test case for crash triggered in `swift::ConformanceLookupTable::lookupConformances(…)`.
Assertion failure in `llvm/include/llvm/ADT/Optional.h (line 120)`:
```
Assertion `hasVal' failed.
When executing: T *llvm::Optional<swift::ProtocolConformanceRef>::getPointer() [T = swift::ProtocolConformanceRef]
```
<details>
<summary>Assertion context:</summary>
```
if (!O)
reset();
else
*this = *O;
return *this;
}
void reset() {
if (hasVal) {
(**this).~T();
hasVal = false;
}
}
~Optional() {
reset();
}
const T* getPointer() const { assert(hasVal); return reinterpret_cast<const T*>(storage.buffer); }
T* getPointer() { assert(hasVal); return reinterpret_cast<T*>(storage.buffer); }
```
</details>
<details>
<summary>Stack trace:</summary>
```
swift: /path/to/llvm/include/llvm/ADT/Optional.h:120: T *llvm::Optional<swift::ProtocolConformanceRef>::getPointer() [T = swift::ProtocolConformanceRef]: Assertion `hasVal' failed.
10 swift 0x0000000001133ef4 swift::ConformanceLookupTable::lookupConformances(swift::NominalTypeDecl*, swift::DeclContext*, swift::LazyResolver*, swift::ConformanceLookupKind, llvm::SmallVectorImpl<swift::ProtocolDecl*>*, llvm::SmallVectorImpl<swift::ProtocolConformance*>*, llvm::SmallVectorImpl<swift::ConformanceDiagnostic>*) + 692
11 swift 0x0000000001116274 swift::DeclContext::getLocalConformances(swift::ConformanceLookupKind, llvm::SmallVectorImpl<swift::ConformanceDiagnostic>*, bool) const + 212
12 swift 0x0000000000efa8fa swift::TypeChecker::findWitnessedObjCRequirements(swift::ValueDecl const*, bool) + 122
14 swift 0x0000000000eaeedb swift::markAsObjC(swift::TypeChecker&, swift::ValueDecl*, llvm::Optional<swift::ObjCReason>, llvm::Optional<swift::ForeignErrorConvention>) + 987
17 swift 0x0000000000eb1686 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150
18 swift 0x0000000000f32dbe swift::TypeChecker::addImplicitDestructor(swift::ClassDecl*) + 126
21 swift 0x0000000000eb1686 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150
24 swift 0x0000000000f17bca swift::TypeChecker::typeCheckFunctionBodyUntil(swift::FuncDecl*, swift::SourceLoc) + 346
25 swift 0x0000000000f17a2e swift::TypeChecker::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) + 46
26 swift 0x0000000000f185f3 swift::TypeChecker::typeCheckAbstractFunctionBody(swift::AbstractFunctionDecl*) + 179
28 swift 0x0000000000ed38e1 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1281
29 swift 0x0000000000c60b89 swift::CompilerInstance::performSema() + 3289
31 swift 0x00000000007d8429 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2857
32 swift 0x00000000007a4458 main + 2872
Stack dump:
0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28354-swift-conformancelookuptable-lookupconformances.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28354-swift-conformancelookuptable-lookupconformances-9d940c.o
1. While type-checking 'B' at validation-test/compiler_crashers/28354-swift-conformancelookuptable-lookupconformances.swift:10:1
2. While type-checking 'A' at validation-test/compiler_crashers/28354-swift-conformancelookuptable-lookupconformances.swift:10:30
3. While type-checking 'deinit' at validation-test/compiler_crashers/28354-swift-conformancelookuptable-lookupconformances.swift:10:36
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
</details>
|
||
|
|
d48e920448 |
Add 💥 (😢 → 56, 😀 → 5107) in swift::removeOverriddenDecls(…)
Add test case for crash triggered in `swift::removeOverriddenDecls(…)`. Assertion failure in [`lib/AST/NameLookup.cpp (line 76)`](https://github.com/apple/swift/blob/master/lib/AST/NameLookup.cpp#L76): ``` Assertion `decl != overrides && "Circular class inheritance?"' failed. When executing: bool swift::removeOverriddenDecls(SmallVectorImpl<swift::ValueDecl *> &) ``` <details> <summary>Assertion context:</summary> ``` bool swift::removeOverriddenDecls(SmallVectorImpl<ValueDecl*> &decls) { if (decls.empty()) return false; ASTContext &ctx = decls.front()->getASTContext(); llvm::SmallPtrSet<ValueDecl*, 8> overridden; for (auto decl : decls) { while (auto overrides = decl->getOverriddenDecl()) { overridden.insert(overrides); // Because initializers from Objective-C base classes have greater // visibility than initializers written in Swift classes, we can // have a "break" in the set of declarations we found, where // C.init overrides B.init overrides A.init, but only C.init and // A.init are in the chain. Make sure we still remove A.init from the // set in this case. if (decl->getFullName().getBaseName() == ctx.Id_init) { /// FIXME: Avoid the possibility of an infinite loop by fixing the root /// cause instead (incomplete circularity detection). assert(decl != overrides && "Circular class inheritance?"); ``` </details> <details> <summary>Stack trace:</summary> ``` swift: /path/to/swift/lib/AST/NameLookup.cpp:76: bool swift::removeOverriddenDecls(SmallVectorImpl<swift::ValueDecl *> &): Assertion `decl != overrides && "Circular class inheritance?"' failed. 8 swift 0x0000000001106dd8 swift::removeOverriddenDecls(llvm::SmallVectorImpl<swift::ValueDecl*>&) + 1432 11 swift 0x0000000000eee438 swift::TypeChecker::lookupMember(swift::DeclContext*, swift::Type, swift::DeclName, swift::OptionSet<swift::NameLookupFlags, unsigned int>) + 408 12 swift 0x0000000000eeed9d swift::TypeChecker::lookupConstructors(swift::DeclContext*, swift::Type, swift::OptionSet<swift::NameLookupFlags, unsigned int>) + 45 13 swift 0x0000000000eb71d6 swift::TypeChecker::addImplicitConstructors(swift::NominalTypeDecl*) + 1350 14 swift 0x0000000000eaad2e swift::TypeChecker::checkInheritanceClause(swift::Decl*, swift::GenericTypeResolver*) + 5854 15 swift 0x0000000000eac058 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 376 19 swift 0x0000000000f1ef6e swift::TypeChecker::resolveIdentifierType(swift::DeclContext*, swift::IdentTypeRepr*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, bool, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 158 21 swift 0x0000000000f1fec4 swift::TypeChecker::resolveType(swift::TypeRepr*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 164 22 swift 0x0000000000f1ee60 swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 192 23 swift 0x0000000000fe586f swift::IterativeTypeChecker::processResolveInheritedClauseEntry(std::pair<llvm::PointerUnion<swift::TypeDecl*, swift::ExtensionDecl*>, unsigned int>, llvm::function_ref<bool (swift::TypeCheckRequest)>) + 159 24 swift 0x0000000000fbd8ad swift::IterativeTypeChecker::satisfy(swift::TypeCheckRequest) + 493 25 swift 0x0000000000ea9609 swift::TypeChecker::resolveInheritanceClause(llvm::PointerUnion<swift::TypeDecl*, swift::ExtensionDecl*>) + 137 26 swift 0x0000000000eac37f swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 1183 31 swift 0x0000000000eb1686 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150 34 swift 0x0000000000f17bca swift::TypeChecker::typeCheckFunctionBodyUntil(swift::FuncDecl*, swift::SourceLoc) + 346 35 swift 0x0000000000f17a2e swift::TypeChecker::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) + 46 36 swift 0x0000000000f185f3 swift::TypeChecker::typeCheckAbstractFunctionBody(swift::AbstractFunctionDecl*) + 179 38 swift 0x0000000000ed38e1 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1281 39 swift 0x0000000000c60b89 swift::CompilerInstance::performSema() + 3289 41 swift 0x00000000007d8429 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2857 42 swift 0x00000000007a4458 main + 2872 Stack dump: 0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28353-swift-removeoverriddendecls.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28353-swift-removeoverriddendecls-e20d37.o 1. While type-checking getter for E at validation-test/compiler_crashers/28353-swift-removeoverriddendecls.swift:10:6 2. While type-checking 'C' at validation-test/compiler_crashers/28353-swift-removeoverriddendecls.swift:10:7 3. While resolving type A at [validation-test/compiler_crashers/28353-swift-removeoverriddendecls.swift:14:15 - line:14:15] RangeText="A" <unknown>:0: error: unable to execute command: Aborted <unknown>:0: error: compile command failed due to signal (use -v to see invocation) ``` </details> |
||
|
|
4901ce5a13 |
Add 💥 (😢 → 55, 😀 → 5107) in swift::TypeChecker::configureInterfaceType(…)
Add test case for crash triggered in `swift::TypeChecker::configureInterfaceType(…)`. Assertion failure in [`lib/AST/Parameter.cpp (line 154)`](https://github.com/apple/swift/blob/master/lib/AST/Parameter.cpp#L154): ``` Assertion `!type->hasArchetype()' failed. When executing: swift::Type swift::ParameterList::getInterfaceType(swift::DeclContext *) const ``` <details> <summary>Assertion context:</summary> ``` /// containing contextual types. Type ParameterList::getInterfaceType(DeclContext *DC) const { auto &C = DC->getASTContext(); if (size() == 0) return TupleType::getEmpty(C); SmallVector<TupleTypeElt, 8> argumentInfo; for (auto P : *this) { assert(P->hasType()); Type type; if (P->hasInterfaceType()) type = P->getInterfaceType(); else if (!P->getTypeLoc().hasLocation()) type = ArchetypeBuilder::mapTypeOutOfContext(DC, P->getType()); else type = P->getType(); assert(!type->hasArchetype()); ``` </details> <details> <summary>Stack trace:</summary> ``` swift: /path/to/swift/lib/AST/Parameter.cpp:154: swift::Type swift::ParameterList::getInterfaceType(swift::DeclContext *) const: Assertion `!type->hasArchetype()' failed. 9 swift 0x0000000000eea501 swift::TypeChecker::configureInterfaceType(swift::AbstractFunctionDecl*) + 625 10 swift 0x0000000000ee9d31 swift::TypeChecker::validateGenericFuncSignature(swift::AbstractFunctionDecl*) + 929 13 swift 0x0000000000eb1686 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150 14 swift 0x0000000000f3191b swift::createImplicitConstructor(swift::TypeChecker&, swift::NominalTypeDecl*, swift::ImplicitConstructorKind) + 1371 15 swift 0x0000000000eb7290 swift::TypeChecker::addImplicitConstructors(swift::NominalTypeDecl*) + 1536 18 swift 0x0000000000eb1686 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150 21 swift 0x0000000000f17bca swift::TypeChecker::typeCheckFunctionBodyUntil(swift::FuncDecl*, swift::SourceLoc) + 346 22 swift 0x0000000000f17a2e swift::TypeChecker::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) + 46 23 swift 0x0000000000f185f3 swift::TypeChecker::typeCheckAbstractFunctionBody(swift::AbstractFunctionDecl*) + 179 25 swift 0x0000000000ed38e1 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1281 26 swift 0x0000000000c60b89 swift::CompilerInstance::performSema() + 3289 28 swift 0x00000000007d8429 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2857 29 swift 0x00000000007a4458 main + 2872 Stack dump: 0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28352-swift-typechecker-configureinterfacetype.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28352-swift-typechecker-configureinterfacetype-226407.o 1. While type-checking 'a' at validation-test/compiler_crashers/28352-swift-typechecker-configureinterfacetype.swift:10:28 2. While type-checking 'A' at validation-test/compiler_crashers/28352-swift-typechecker-configureinterfacetype.swift:10:35 3. While type-checking 'init' at validation-test/compiler_crashers/28352-swift-typechecker-configureinterfacetype.swift:10:42 <unknown>:0: error: unable to execute command: Aborted <unknown>:0: error: compile command failed due to signal (use -v to see invocation) ``` </details> |
||
|
|
c5d8f126be |
Add 💥 (😢 → 54, 😀 → 5107) in swift::FunctionType::get(…)
Add test case for crash triggered in `swift::FunctionType::get(…)`. <details> <summary>Stack trace:</summary> ``` 4 swift 0x000000000100595b swift::FunctionType::get(swift::Type, swift::Type, swift::AnyFunctionType::ExtInfo const&) + 27 5 swift 0x0000000000f3d4a5 swift::constraints::ConstraintSystem::getTypeOfMemberReference(swift::Type, swift::ValueDecl*, bool, bool, swift::constraints::ConstraintLocatorBuilder, swift::DeclRefExpr const*, llvm::DenseMap<swift::CanType, swift::TypeVariableType*, llvm::DenseMapInfo<swift::CanType>, llvm::detail::DenseMapPair<swift::CanType, swift::TypeVariableType*> >*) + 2309 10 swift 0x0000000000efb560 swift::TypeChecker::inferDefaultWitnesses(swift::ProtocolDecl*) + 288 11 swift 0x0000000000ed3ee8 swift::finishTypeChecking(swift::SourceFile&) + 536 12 swift 0x0000000000c60d3a swift::CompilerInstance::performSema() + 3722 14 swift 0x00000000007d8429 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2857 15 swift 0x00000000007a4458 main + 2872 Stack dump: 0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28351-swift-functiontype-get.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28351-swift-functiontype-get-b083da.o <unknown>:0: error: unable to execute command: Segmentation fault <unknown>:0: error: compile command failed due to signal (use -v to see invocation) ``` </details> |
||
|
|
faade7c9ee |
Add 💥 (😢 → 53, 😀 → 5107) in swift::TypeChecker::performTypoCorrection(…)
Add test case for crash triggered in `swift::TypeChecker::performTypoCorrection(…)`. Assertion failure in [`lib/AST/LookupVisibleDecls.cpp (line 566)`](https://github.com/apple/swift/blob/master/lib/AST/LookupVisibleDecls.cpp#L566): ``` Assertion `BaseTy.getPointer() != CurClass->getSuperclass().getPointer() && "type is its own superclass"' failed. When executing: void lookupVisibleMemberDeclsImpl(swift::Type, swift::VisibleDeclConsumer &, const swift::DeclContext *, (anonymous namespace)::LookupState, swift::DeclVisibilityKind, swift::LazyResolver *, VisitedSet &) ``` <details> <summary>Assertion context:</summary> ``` Visited); return; } do { NominalTypeDecl *CurNominal = BaseTy->getAnyNominal(); if (!CurNominal) break; // Look in for members of a nominal type. lookupTypeMembers(BaseTy, BaseTy, Consumer, CurrDC, LS, Reason, TypeResolver); lookupDeclsFromProtocolsBeingConformedTo(BaseTy, Consumer, LS, CurrDC, Reason, TypeResolver, Visited); // If we have a class type, look into its superclass. ClassDecl *CurClass = dyn_cast<ClassDecl>(CurNominal); if (CurClass && CurClass->hasSuperclass()) { assert(BaseTy.getPointer() != CurClass->getSuperclass().getPointer() && "type is its own superclass"); ``` </details> <details> <summary>Stack trace:</summary> ``` swift: /path/to/swift/lib/AST/LookupVisibleDecls.cpp:566: void lookupVisibleMemberDeclsImpl(swift::Type, swift::VisibleDeclConsumer &, const swift::DeclContext *, (anonymous namespace)::LookupState, swift::DeclVisibilityKind, swift::LazyResolver *, VisitedSet &): Assertion `BaseTy.getPointer() != CurClass->getSuperclass().getPointer() && "type is its own superclass"' failed. 10 swift 0x0000000000eeeeeb swift::TypeChecker::performTypoCorrection(swift::DeclContext*, swift::DeclRefKind, swift::Type, swift::DeclName, swift::SourceLoc, swift::OptionSet<swift::NameLookupFlags, unsigned int>, swift::LookupResult&, unsigned int) + 267 12 swift 0x0000000000f63c52 swift::constraints::ConstraintSystem::diagnoseFailureForExpr(swift::Expr*) + 8738 13 swift 0x0000000000f6741e swift::constraints::ConstraintSystem::salvage(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::Expr*) + 3998 14 swift 0x0000000000e99512 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>) + 850 15 swift 0x0000000000e9fc72 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 610 16 swift 0x0000000000ea0e27 swift::TypeChecker::typeCheckBinding(swift::Pattern*&, swift::Expr*&, swift::DeclContext*) + 343 17 swift 0x0000000000ea103b swift::TypeChecker::typeCheckPatternBinding(swift::PatternBindingDecl*, unsigned int) + 267 19 swift 0x0000000000eacded swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 3853 20 swift 0x0000000000f3155d swift::createImplicitConstructor(swift::TypeChecker&, swift::NominalTypeDecl*, swift::ImplicitConstructorKind) + 413 21 swift 0x0000000000eb7290 swift::TypeChecker::addImplicitConstructors(swift::NominalTypeDecl*) + 1536 24 swift 0x0000000000eb1686 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150 25 swift 0x0000000000ed37e2 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1026 26 swift 0x0000000000c60b89 swift::CompilerInstance::performSema() + 3289 28 swift 0x00000000007d8429 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2857 29 swift 0x00000000007a4458 main + 2872 Stack dump: 0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28350-swift-typechecker-performtypocorrection.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28350-swift-typechecker-performtypocorrection-9b1949.o 1. While type-checking 'c' at validation-test/compiler_crashers/28350-swift-typechecker-performtypocorrection.swift:10:1 2. While type-checking expression at [validation-test/compiler_crashers/28350-swift-typechecker-performtypocorrection.swift:10:27 - line:10:29] RangeText="A.s" <unknown>:0: error: unable to execute command: Aborted <unknown>:0: error: compile command failed due to signal (use -v to see invocation) ``` </details> |
||
|
|
1d796abed1 |
Add 💥 (😢 → 52, 😀 → 5107) in swift::TypeBase::gatherAllSubstitutions(…)
Add test case for crash triggered in `swift::TypeBase::gatherAllSubstitutions(…)`. <details> <summary>Stack trace:</summary> ``` 6 swift 0x00000000032b06dd llvm::llvm_unreachable_internal(char const*, char const*, unsigned int) + 461 7 swift 0x00000000010fa10e swift::TypeBase::gatherAllSubstitutions(swift::ModuleDecl*, swift::LazyResolver*, swift::DeclContext*) + 4398 8 swift 0x000000000111fe31 swift::TypeBase::getSuperclass(swift::LazyResolver*) + 193 9 swift 0x0000000000fa0c20 swift::constraints::ConstraintSystem::matchSuperclassTypes(swift::Type, swift::Type, swift::constraints::TypeMatchKind, unsigned int, swift::constraints::ConstraintLocatorBuilder) + 64 10 swift 0x0000000000fa1aeb swift::constraints::ConstraintSystem::simplifyRestrictedConstraint(swift::constraints::ConversionRestrictionKind, swift::Type, swift::Type, swift::constraints::TypeMatchKind, unsigned int, swift::constraints::ConstraintLocatorBuilder) + 1227 11 swift 0x0000000000f9ecd2 swift::constraints::ConstraintSystem::matchTypes(swift::Type, swift::Type, swift::constraints::TypeMatchKind, unsigned int, swift::constraints::ConstraintLocatorBuilder) + 10674 12 swift 0x0000000000fa8712 swift::constraints::ConstraintSystem::simplifyConstraint(swift::constraints::Constraint const&) + 626 13 swift 0x0000000000f3aa77 swift::constraints::ConstraintSystem::addConstraint(swift::constraints::Constraint*, bool, bool) + 23 14 swift 0x0000000000f3d74c swift::constraints::ConstraintSystem::getTypeOfMemberReference(swift::Type, swift::ValueDecl*, bool, bool, swift::constraints::ConstraintLocatorBuilder, swift::DeclRefExpr const*, llvm::DenseMap<swift::CanType, swift::TypeVariableType*, llvm::DenseMapInfo<swift::CanType>, llvm::detail::DenseMapPair<swift::CanType, swift::TypeVariableType*> >*) + 2988 15 swift 0x0000000000f3e134 swift::constraints::ConstraintSystem::resolveOverload(swift::constraints::ConstraintLocator*, swift::Type, swift::constraints::OverloadChoice) + 516 16 swift 0x0000000000fa8829 swift::constraints::ConstraintSystem::simplifyConstraint(swift::constraints::Constraint const&) + 905 17 swift 0x0000000000f3aa77 swift::constraints::ConstraintSystem::addConstraint(swift::constraints::Constraint*, bool, bool) + 23 18 swift 0x0000000000f3dec7 swift::constraints::ConstraintSystem::addOverloadSet(swift::Type, llvm::ArrayRef<swift::constraints::OverloadChoice>, swift::constraints::ConstraintLocator*, swift::constraints::OverloadChoice*) + 327 19 swift 0x0000000000fa73d3 swift::constraints::ConstraintSystem::simplifyMemberConstraint(swift::constraints::Constraint const&) + 563 20 swift 0x0000000000fa84e4 swift::constraints::ConstraintSystem::simplifyConstraint(swift::constraints::Constraint const&) + 68 21 swift 0x0000000000f3aa77 swift::constraints::ConstraintSystem::addConstraint(swift::constraints::Constraint*, bool, bool) + 23 24 swift 0x0000000001066795 swift::Expr::walk(swift::ASTWalker&) + 69 25 swift 0x0000000000f84738 swift::constraints::ConstraintSystem::generateConstraints(swift::Expr*) + 200 26 swift 0x0000000000e99333 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>) + 371 27 swift 0x0000000000e9fc72 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 610 30 swift 0x0000000000f17bca swift::TypeChecker::typeCheckFunctionBodyUntil(swift::FuncDecl*, swift::SourceLoc) + 346 31 swift 0x0000000000f17a2e swift::TypeChecker::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) + 46 32 swift 0x0000000000f185f3 swift::TypeChecker::typeCheckAbstractFunctionBody(swift::AbstractFunctionDecl*) + 179 34 swift 0x0000000000ed38e1 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1281 35 swift 0x0000000000c60b89 swift::CompilerInstance::performSema() + 3289 37 swift 0x00000000007d8429 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2857 38 swift 0x00000000007a4458 main + 2872 Stack dump: 0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28349-swift-typebase-gatherallsubstitutions.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28349-swift-typebase-gatherallsubstitutions-4b98db.o 1. While type-checking getter for a at validation-test/compiler_crashers/28349-swift-typebase-gatherallsubstitutions.swift:9:42 2. While type-checking expression at [validation-test/compiler_crashers/28349-swift-typebase-gatherallsubstitutions.swift:9:43 - line:9:43] RangeText="b" <unknown>:0: error: unable to execute command: Aborted <unknown>:0: error: compile command failed due to signal (use -v to see invocation) ``` </details> |
||
|
|
ff646010f6 |
Merge pull request #3383 from practicalswift/swiftc-28348-swift-typechecker-validatedecl
Add 💥 (😢 → 50, 😀 → 5107) in swift::TypeChecker::validateDecl(…) |
||
|
|
4bc4f51a07 |
Merge pull request #3367 from practicalswift/swiftc-28347-swift-typechecker-checkinheritanceclause
Add 💥 (😢 → 58, 😀 → 5099) in swift::TypeChecker::checkInheritanceClause(…) |