mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
f15cad360901b4cad3955b8da53d24a882e0e46f
3633 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
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)
```
|
||
|
|
c39da37525 |
Merge pull request #3474 from CodaFi/postminimalist-abstract-expressionism
[SE-0115] Rename *LiteralConvertible protocols to ExpressibleBy*… |
||
|
|
f97e5dcb0e |
[SE-0115][1/2] Rename *LiteralConvertible protocols to ExpressibleBy*Literal. This
change includes both the necessary protocol updates and the deprecation warnings suitable for migration. A future patch will remove the renamings and make this a hard error. |
||
|
|
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>
|
||
|
|
823c24b355 |
[SE-0112] Rename ErrorProtocol to Error.
This is bullet (5) of the proposed solution in SE-0112, and the last major piece to be implemented. |
||
|
|
e9688dc41b |
Merge pull request #3466 from ruscur/powerpc64-fixes
powerpc64{le} build and test fixes
|
||
|
|
b63bddd648 |
Merge pull request #3464 from practicalswift/swiftc-28362-swift-constraints-constraintgraphnode-getadjacency
Add 💥 (😢 → 64, 😀 → 5107) in swift::constraints::ConstraintGraphNode::getAdjacency(…) |
||
|
|
b0e20e1eda | [stdlib] Add string view index comparability test | ||
|
|
09367a5323 |
Merge pull request #3462 from practicalswift/move-crasher-to-correct-dir
Case #08008 belongs to "compiler_crashers" (and not "compiler_crashers_2") :-) |
||
|
|
9af6321235 |
Fix PersistentVector test for powerpc64{le}
This test has a check for 32/64bit, include powerpc64{le} in this check.
Signed-off-by: Russell Currey <ruscur@russell.cc>
|
||
|
|
a16a063ac6 |
Use TIOCSTI instead of TIOCGWINSZ in Glibc test
validation-test/stlib/Glibc.swift was failing on powerpc64le due to the missing TIOCGWINSZ symbol. Since (from what I can tell) this is just a random tty ioctl, replace it with a different ioctl that should be more commonly defined. Signed-off-by: Russell Currey <ruscur@russell.cc> |
||
|
|
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> |
||
|
|
4f89520c93 | Case #08008 belongs to "compiler_crashers" (and not "compiler_crashers_2") :-) | ||
|
|
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> |
||
|
|
824bccc871 | stdlib: change Collection._copyToNativeArrayBuffer() to be defined in terms of public types | ||
|
|
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> |
||
|
|
9b9bcddad1 |
Merge pull request #3412 from practicalswift/swiftc-28357-swift-iterativetypechecker-processtypechecksuperclass
Add 💥 (😢 → 59, 😀 → 5107) in swift::IterativeTypeChecker::processTypeCheckSuperclass(…) |
||
|
|
bcb5a363d1 |
Merge pull request #3287 from PatrickPijnappel/utf-refactor
[stdlib] Significant UTF8/16 decode speed-ups for iterator nil-guarantee |
||
|
|
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> |
||
|
|
ce94bd9cca |
Merge pull request #3268 from natecook1000/nc-scalarindex-nocore
[stdlib] Remove _StringCore from UnicodeScalarIndex |
||
|
|
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(…) |
||
|
|
c5a08605b1 |
Merge pull request #3365 from benlangmuir/unresolved-member-stmt-condition
[CodeCompletion] Improve StmtCondition recovery for code-completion |
||
|
|
4bc4f51a07 |
Merge pull request #3367 from practicalswift/swiftc-28347-swift-typechecker-checkinheritanceclause
Add 💥 (😢 → 58, 😀 → 5099) in swift::TypeChecker::checkInheritanceClause(…) |
||
|
|
af7cb57d95 |
Add 💥 (😢 → 50, 😀 → 5107) in swift::TypeChecker::validateDecl(…)
Add test case for crash triggered in `swift::TypeChecker::validateDecl(…)`.
Assertion failure:
```
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.
```
<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 0x0000000000eac9cd swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 3853
12 swift 0x0000000000f3117d swift::createImplicitConstructor(swift::TypeChecker&, swift::NominalTypeDecl*, swift::ImplicitConstructorKind) + 413
13 swift 0x0000000000eb6e70 swift::TypeChecker::addImplicitConstructors(swift::NominalTypeDecl*) + 1536
18 swift 0x0000000000eb1266 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150
21 swift 0x0000000000f18b24 swift::TypeChecker::typeCheckClosureBody(swift::ClosureExpr*) + 244
22 swift 0x0000000000f44e3c swift::constraints::ConstraintSystem::applySolution(swift::constraints::Solution&, swift::Expr*, swift::Type, bool, bool, bool) + 876
23 swift 0x0000000000e9f8f1 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 769
26 swift 0x0000000000f177aa swift::TypeChecker::typeCheckFunctionBodyUntil(swift::FuncDecl*, swift::SourceLoc) + 346
27 swift 0x0000000000f1760e swift::TypeChecker::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) + 46
28 swift 0x0000000000f181d3 swift::TypeChecker::typeCheckAbstractFunctionBody(swift::AbstractFunctionDecl*) + 179
30 swift 0x0000000000ed34c1 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1281
31 swift 0x0000000000c60769 swift::CompilerInstance::performSema() + 3289
33 swift 0x00000000007d8429 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2857
34 swift 0x00000000007a4458 main + 2872
Stack dump:
0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28348-swift-typechecker-validatedecl.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28348-swift-typechecker-validatedecl-2bcb22.o
1. While type-checking declaration 0x6a96ac0 at validation-test/compiler_crashers/28348-swift-typechecker-validatedecl.swift:10:5
2. While type-checking expression at [validation-test/compiler_crashers/28348-swift-typechecker-validatedecl.swift:10:6 - line:12:16] RangeText="{enum S<T{{
3. While type-checking 'S' at validation-test/compiler_crashers/28348-swift-typechecker-validatedecl.swift:10:7
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
</details>
|
||
|
|
3cb429bc5c | Merge pull request #3377 from gregomni/28291 | ||
|
|
5bb61795b6 |
Mark decls that are illegal due to generic inside non-generic decl or non-generic inside generic decl with setInvalid(), and avoid assertions
trying to set the superclass on classes in such situations by setting the superclass of an invalid decl to the error type. This fixes a bunch of compiler crashes, and also changes some errors in other tests where the main error is the invalid declaration and now the downstream errors can be a bit different because the decl has been invalidated. |
||
|
|
131e0f8a70 | [stdlib] validationt test for StrideTo/StrideThrough sequences (#3363) | ||
|
|
6db81f0ab9 |
Add 💥 (😢 → 58, 😀 → 5099) in swift::TypeChecker::checkInheritanceClause(…)
Add test case for crash triggered in `swift::TypeChecker::checkInheritanceClause(…)`. Assertion failure: ``` 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. ``` <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. 9 swift 0x0000000000eabaef swift::TypeChecker::checkInheritanceClause(swift::Decl*, swift::GenericTypeResolver*) + 5279 13 swift 0x0000000000eb2686 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150 14 swift 0x0000000000ed486a swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1162 15 swift 0x0000000000c616a9 swift::CompilerInstance::performSema() + 3289 17 swift 0x00000000007d8419 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2857 18 swift 0x00000000007a4448 main + 2872 Stack dump: 0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28347-swift-typechecker-checkinheritanceclause.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28347-swift-typechecker-checkinheritanceclause-4fd285.o 1. While type-checking 'c' at validation-test/compiler_crashers/28347-swift-typechecker-checkinheritanceclause.swift:10:1 <unknown>:0: error: unable to execute command: Aborted <unknown>:0: error: compile command failed due to signal (use -v to see invocation) ``` </details> |
||
|
|
75619c02c4 |
[CodeCompletion] Improve StmtCondition recovery for code-completion
In the condition expressions of if, while and guard statements we were throwing away the AST if there was a parse error in the condition, or the brace statement was missing. This led to poor code-completion for unresolved members (enums, options sets) because we couldn't find the parent expression to type-check. There are a few minor diagnostic changes because we now do more type-checking of these conditions, particularly if they end up containing an unused closure. SR-2001 |
||
|
|
16b686989c | Merge pull request #3359 from practicalswift/swiftc-28346-swift-typebase-getdesugaredtype | ||
|
|
23b646eed2 | Update master to build with Xcode 8 beta 2, OS X 10.12, iOS 10, tvOS 10, and watchOS 3 SDKs | ||
|
|
e3ec26a0e4 |
Add 💥 (😢 → 57, 😀 → 5099) in swift::TypeBase::getDesugaredType(…)
Add test case for crash triggered in `swift::TypeBase::getDesugaredType(…)`. <details> <summary>Stack trace:</summary> ``` 4 swift 0x0000000001120000 swift::TypeBase::getDesugaredType() + 32 6 swift 0x0000000000eb7f0b swift::TypeChecker::addImplicitConstructors(swift::NominalTypeDecl*) + 635 7 swift 0x0000000000eabd2e swift::TypeChecker::checkInheritanceClause(swift::Decl*, swift::GenericTypeResolver*) + 5854 8 swift 0x0000000000ead058 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 376 9 swift 0x000000000110b61b swift::DeclContext::lookupQualified(swift::Type, swift::DeclName, swift::NLOptions, swift::LazyResolver*, llvm::SmallVectorImpl<swift::ValueDecl*>&) const + 2667 10 swift 0x0000000001109ebb swift::UnqualifiedLookup::UnqualifiedLookup(swift::DeclName, swift::DeclContext*, swift::LazyResolver*, bool, swift::SourceLoc, bool, bool) + 2491 11 swift 0x0000000000eeea4b swift::TypeChecker::lookupUnqualified(swift::DeclContext*, swift::DeclName, swift::SourceLoc, swift::OptionSet<swift::NameLookupFlags, unsigned int>) + 187 14 swift 0x0000000000f1ff6e swift::TypeChecker::resolveIdentifierType(swift::DeclContext*, swift::IdentTypeRepr*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, bool, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 158 16 swift 0x0000000000f20ec4 swift::TypeChecker::resolveType(swift::TypeRepr*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 164 17 swift 0x0000000000f1fe60 swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 192 18 swift 0x0000000000eaba5a swift::TypeChecker::checkInheritanceClause(swift::Decl*, swift::GenericTypeResolver*) + 5130 19 swift 0x0000000000ead058 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 376 20 swift 0x000000000110b61b swift::DeclContext::lookupQualified(swift::Type, swift::DeclName, swift::NLOptions, swift::LazyResolver*, llvm::SmallVectorImpl<swift::ValueDecl*>&) const + 2667 21 swift 0x0000000001109ebb swift::UnqualifiedLookup::UnqualifiedLookup(swift::DeclName, swift::DeclContext*, swift::LazyResolver*, bool, swift::SourceLoc, bool, bool) + 2491 22 swift 0x0000000000eeea4b swift::TypeChecker::lookupUnqualified(swift::DeclContext*, swift::DeclName, swift::SourceLoc, swift::OptionSet<swift::NameLookupFlags, unsigned int>) + 187 25 swift 0x0000000000f1ff6e swift::TypeChecker::resolveIdentifierType(swift::DeclContext*, swift::IdentTypeRepr*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, bool, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 158 27 swift 0x0000000000f20ec4 swift::TypeChecker::resolveType(swift::TypeRepr*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 164 28 swift 0x0000000000f1fe60 swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 192 29 swift 0x0000000000eaba5a swift::TypeChecker::checkInheritanceClause(swift::Decl*, swift::GenericTypeResolver*) + 5130 30 swift 0x0000000000eea415 swift::TypeChecker::checkGenericParamList(swift::ArchetypeBuilder*, swift::GenericParamList*, swift::GenericSignature*, bool, swift::GenericTypeResolver*) + 389 31 swift 0x0000000000eebc77 swift::TypeChecker::validateGenericSignature(swift::GenericParamList*, swift::DeclContext*, swift::GenericSignature*, std::function<bool (swift::ArchetypeBuilder&)>, bool&) + 135 32 swift 0x0000000000eec7df swift::TypeChecker::validateGenericTypeSignature(swift::GenericTypeDecl*) + 111 33 swift 0x0000000000ead04b swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 363 38 swift 0x0000000000eb2686 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150 39 swift 0x0000000000ed47e2 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1026 40 swift 0x0000000000c616a9 swift::CompilerInstance::performSema() + 3289 42 swift 0x00000000007d8419 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2857 43 swift 0x00000000007a4448 main + 2872 Stack dump: 0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28346-swift-typebase-getdesugaredtype.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28346-swift-typebase-getdesugaredtype-cd880b.o 1. While type-checking 'A' at validation-test/compiler_crashers/28346-swift-typebase-getdesugaredtype.swift:9:1 2. While resolving type A at [validation-test/compiler_crashers/28346-swift-typebase-getdesugaredtype.swift:9:21 - line:9:21] RangeText="A" 3. While resolving type B at [validation-test/compiler_crashers/28346-swift-typebase-getdesugaredtype.swift:11:9 - line:11:9] 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) ``` </details> |
||
|
|
1946f9574c |
Merge pull request #3345 from practicalswift/swiftc-28345-swift-iterativetypechecker-processtypechecksuperclass
[swiftc] Add 💥 case (😢 → 56, 😀 → 5099) triggered in swift::IterativeTypeChecker::processTypeCheckSuperclass(…) |
||
|
|
fd7f55d5a2 | stdlib: replace 'forAllPermutations()' with a non-recursive implementation | ||
|
|
7b1a8dcf7f |
Merge pull request #3344 from uraimo/glibc-test2
Glibc validation test now performed also on FreeBSD, fixed |
||
|
|
9b421c77ac | Testing fallout for fixing SR-1903 | ||
|
|
7006cf963e |
[swiftc] Add 💥 case (😢 → 56, 😀 → 5099) triggered in swift::IterativeTypeChecker::processTypeCheckSuperclass(…)
Add crash case with stack trace: ``` swift: /path/to/swift/lib/AST/Decl.cpp:4773: void swift::ClassDecl::setSuperclass(swift::Type): Assertion `(!superclass || !superclass->hasArchetype()) && "superclass must be interface type"' failed. 9 swift 0x0000000000fe609b swift::IterativeTypeChecker::processTypeCheckSuperclass(swift::ClassDecl*, llvm::function_ref<bool (swift::TypeCheckRequest)>) + 235 10 swift 0x0000000000fbdf4d swift::IterativeTypeChecker::satisfy(swift::TypeCheckRequest) + 493 11 swift 0x0000000000ea9cc0 swift::TypeChecker::resolveSuperclass(swift::ClassDecl*) + 64 12 swift 0x00000000011307b9 swift::ConformanceLookupTable::updateLookupTable(swift::NominalTypeDecl*, swift::ConformanceLookupTable::ConformanceStage, swift::LazyResolver*) + 217 13 swift 0x0000000001134042 swift::ConformanceLookupTable::lookupConformance(swift::ModuleDecl*, swift::NominalTypeDecl*, swift::ProtocolDecl*, swift::LazyResolver*, llvm::SmallVectorImpl<swift::ProtocolConformance*>&) + 50 14 swift 0x00000000010facbf swift::ModuleDecl::lookupConformance(swift::Type, swift::ProtocolDecl*, swift::LazyResolver*) + 1103 15 swift 0x0000000000ef80aa swift::TypeChecker::conformsToProtocol(swift::Type, swift::ProtocolDecl*, swift::DeclContext*, swift::OptionSet<swift::ConformanceCheckFlags, unsigned int>, swift::ProtocolConformance**, swift::SourceLoc) + 106 16 swift 0x0000000000f1e14d swift::TypeChecker::resolveTypeInContext(swift::TypeDecl*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, bool, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 1309 20 swift 0x0000000000f1f68e swift::TypeChecker::resolveIdentifierType(swift::DeclContext*, swift::IdentTypeRepr*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, bool, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 158 22 swift 0x0000000000f205e4 swift::TypeChecker::resolveType(swift::TypeRepr*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 164 23 swift 0x0000000000f1f580 swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 192 24 swift 0x0000000000ee9e82 swift::TypeChecker::checkGenericParamList(swift::ArchetypeBuilder*, swift::GenericParamList*, swift::GenericSignature*, bool, swift::GenericTypeResolver*) + 722 25 swift 0x0000000000eeb577 swift::TypeChecker::validateGenericSignature(swift::GenericParamList*, swift::DeclContext*, swift::GenericSignature*, std::function<bool (swift::ArchetypeBuilder&)>, bool&) + 135 26 swift 0x0000000000eec0df swift::TypeChecker::validateGenericTypeSignature(swift::GenericTypeDecl*) + 111 27 swift 0x0000000000eac86b swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 363 35 swift 0x0000000000eb1ef6 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150 36 swift 0x0000000000ed4102 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1026 37 swift 0x0000000000c61489 swift::CompilerInstance::performSema() + 3289 39 swift 0x00000000007d82c9 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2857 40 swift 0x00000000007a4308 main + 2872 Stack dump: 0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28345-swift-iterativetypechecker-processtypechecksuperclass.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28345-swift-iterativetypechecker-processtypechecksuperclass-a5f844.o 1. While type-checking 'A' at validation-test/compiler_crashers/28345-swift-iterativetypechecker-processtypechecksuperclass.swift:10:1 2. While resolving type B at [validation-test/compiler_crashers/28345-swift-iterativetypechecker-processtypechecksuperclass.swift:10:57 - line:10:57] RangeText="B" <unknown>:0: error: unable to execute command: Aborted <unknown>:0: error: compile command failed due to signal (use -v to see invocation) ``` |
||
|
|
7cc29eb019 | Glibc validation test now performed also on FreeBSD, fixed | ||
|
|
98829a29f7 |
Revert "Glibc validation test now performed also on FreeBSD"
This broke the test on OS X bots.
This reverts commit
|
||
|
|
c145ac2424 | Glibc validation test now performed also on FreeBSD |