-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Commit 1d796ab
committed
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>1 parent ff64601 commit 1d796abCopy full SHA for 1d796ab
File tree
Expand file treeCollapse file tree
1 file changed
+9
-0
lines changedFilter options
- validation-test/compiler_crashers
Expand file treeCollapse file tree
1 file changed
+9
-0
lines changedβvalidation-test/compiler_crashers/28349-swift-typebase-gatherallsubstitutions.swift
Copy file name to clipboard+9Lines changed: 9 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + |
0 commit comments