Skip to content

[SourceKit] Add test case for crash triggered in swift::SpecializedProtocolConformance::getTypeWitnessSubstAndDecl(…) #598

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 16, 2015
Merged

[SourceKit] Add test case for crash triggered in swift::SpecializedProtocolConformance::getTypeWitnessSubstAndDecl(…) #598

merged 1 commit into from
Dec 16, 2015

Conversation

practicalswift
Copy link
Contributor

Sorry, just found another unique SourceKit crash :-)

Stack trace:

found code completion token A at offset 148
swift-ide-test: /path/to/swift/lib/AST/Type.cpp:2187: TypeSubstitutionMap swift::GenericParamList::getSubstitutionMap(ArrayRef<swift::Substitution>) const: Assertion `Subs.empty() && "did not use all substitutions?!"' failed.
9  swift-ide-test  0x0000000000b86948 swift::SpecializedProtocolConformance::getTypeWitnessSubstAndDecl(swift::AssociatedTypeDecl*, swift::LazyResolver*) const + 248
10 swift-ide-test  0x0000000000b86632 swift::ProtocolConformance::getTypeWitnessSubstAndDecl(swift::AssociatedTypeDecl*, swift::LazyResolver*) const + 18
11 swift-ide-test  0x0000000000b86de6 swift::ProtocolConformance::getTypeWitness(swift::AssociatedTypeDecl*, swift::LazyResolver*) const + 6
14 swift-ide-test  0x0000000000b9630c swift::Type::transform(std::function<swift::Type (swift::Type)> const&) const + 44
15 swift-ide-test  0x0000000000b8f8af swift::Type::subst(swift::ModuleDecl*, llvm::DenseMap<swift::TypeBase*, swift::Type, llvm::DenseMapInfo<swift::TypeBase*>, llvm::detail::DenseMapPair<swift::TypeBase*, swift::Type> >&, swift::OptionSet<swift::SubstFlags, unsigned int>) const + 111
16 swift-ide-test  0x0000000000b6b907 swift::BoundGenericType::getSubstitutions(swift::ModuleDecl*, swift::LazyResolver*, swift::DeclContext*) + 1911
17 swift-ide-test  0x0000000000b8ef93 swift::TypeBase::gatherAllSubstitutions(swift::ModuleDecl*, llvm::SmallVectorImpl<swift::Substitution>&, swift::LazyResolver*, swift::DeclContext*) + 211
18 swift-ide-test  0x0000000000b6c31e swift::ModuleDecl::lookupConformance(swift::Type, swift::ProtocolDecl*, swift::LazyResolver*) + 1246
19 swift-ide-test  0x0000000000964450 swift::TypeChecker::conformsToProtocol(swift::Type, swift::ProtocolDecl*, swift::DeclContext*, swift::OptionSet<swift::ConformanceCheckFlags, unsigned int>, swift::ProtocolConformance**, swift::SourceLoc) + 96
20 swift-ide-test  0x00000000008e1b7b swift::constraints::ConstraintSystem::simplifyConformsToConstraint(swift::Type, swift::ProtocolDecl*, swift::constraints::ConstraintKind, swift::constraints::ConstraintLocatorBuilder, unsigned int) + 123
21 swift-ide-test  0x00000000008e4956 swift::constraints::ConstraintSystem::simplifyConformsToConstraint(swift::Type, swift::Type, swift::constraints::ConstraintKind, swift::constraints::ConstraintLocatorBuilder, unsigned int) + 118
22 swift-ide-test  0x00000000008e901e swift::constraints::ConstraintSystem::simplifyConstraint(swift::constraints::Constraint const&) + 142
23 swift-ide-test  0x00000000008ee2d9 swift::constraints::ConstraintSystem::simplify(bool) + 105
24 swift-ide-test  0x00000000008f16a0 swift::constraints::ConstraintSystem::solveRec(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 48
25 swift-ide-test  0x00000000008f1569 swift::constraints::ConstraintSystem::solve(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 73
26 swift-ide-test  0x00000000008f149b swift::constraints::ConstraintSystem::solveSingle(swift::FreeTypeVariableBinding) + 59
31 swift-ide-test  0x000000000096510b swift::TypeChecker::checkConformance(swift::NormalProtocolConformance*) + 2059
39 swift-ide-test  0x0000000000938837 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 151
40 swift-ide-test  0x0000000000905f8a swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1434
41 swift-ide-test  0x0000000000774222 swift::CompilerInstance::performSema() + 2946
42 swift-ide-test  0x000000000071ccc3 main + 35011
Stack dump:
0.  Program arguments: swift-ide-test -code-completion -code-completion-token=A -source-filename=<INPUT-FILE>
1.  While type-checking 'A' at <INPUT-FILE>:2:1

…otocolConformance::getTypeWitnessSubstAndDecl(swift::AssociatedTypeDecl*, swift::LazyResolver*) const

Stack trace:

```
found code completion token A at offset 148
swift-ide-test: /path/to/swift/lib/AST/Type.cpp:2187: TypeSubstitutionMap swift::GenericParamList::getSubstitutionMap(ArrayRef<swift::Substitution>) const: Assertion `Subs.empty() && "did not use all substitutions?!"' failed.
9  swift-ide-test  0x0000000000b86948 swift::SpecializedProtocolConformance::getTypeWitnessSubstAndDecl(swift::AssociatedTypeDecl*, swift::LazyResolver*) const + 248
10 swift-ide-test  0x0000000000b86632 swift::ProtocolConformance::getTypeWitnessSubstAndDecl(swift::AssociatedTypeDecl*, swift::LazyResolver*) const + 18
11 swift-ide-test  0x0000000000b86de6 swift::ProtocolConformance::getTypeWitness(swift::AssociatedTypeDecl*, swift::LazyResolver*) const + 6
14 swift-ide-test  0x0000000000b9630c swift::Type::transform(std::function<swift::Type (swift::Type)> const&) const + 44
15 swift-ide-test  0x0000000000b8f8af swift::Type::subst(swift::ModuleDecl*, llvm::DenseMap<swift::TypeBase*, swift::Type, llvm::DenseMapInfo<swift::TypeBase*>, llvm::detail::DenseMapPair<swift::TypeBase*, swift::Type> >&, swift::OptionSet<swift::SubstFlags, unsigned int>) const + 111
16 swift-ide-test  0x0000000000b6b907 swift::BoundGenericType::getSubstitutions(swift::ModuleDecl*, swift::LazyResolver*, swift::DeclContext*) + 1911
17 swift-ide-test  0x0000000000b8ef93 swift::TypeBase::gatherAllSubstitutions(swift::ModuleDecl*, llvm::SmallVectorImpl<swift::Substitution>&, swift::LazyResolver*, swift::DeclContext*) + 211
18 swift-ide-test  0x0000000000b6c31e swift::ModuleDecl::lookupConformance(swift::Type, swift::ProtocolDecl*, swift::LazyResolver*) + 1246
19 swift-ide-test  0x0000000000964450 swift::TypeChecker::conformsToProtocol(swift::Type, swift::ProtocolDecl*, swift::DeclContext*, swift::OptionSet<swift::ConformanceCheckFlags, unsigned int>, swift::ProtocolConformance**, swift::SourceLoc) + 96
20 swift-ide-test  0x00000000008e1b7b swift::constraints::ConstraintSystem::simplifyConformsToConstraint(swift::Type, swift::ProtocolDecl*, swift::constraints::ConstraintKind, swift::constraints::ConstraintLocatorBuilder, unsigned int) + 123
21 swift-ide-test  0x00000000008e4956 swift::constraints::ConstraintSystem::simplifyConformsToConstraint(swift::Type, swift::Type, swift::constraints::ConstraintKind, swift::constraints::ConstraintLocatorBuilder, unsigned int) + 118
22 swift-ide-test  0x00000000008e901e swift::constraints::ConstraintSystem::simplifyConstraint(swift::constraints::Constraint const&) + 142
23 swift-ide-test  0x00000000008ee2d9 swift::constraints::ConstraintSystem::simplify(bool) + 105
24 swift-ide-test  0x00000000008f16a0 swift::constraints::ConstraintSystem::solveRec(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 48
25 swift-ide-test  0x00000000008f1569 swift::constraints::ConstraintSystem::solve(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 73
26 swift-ide-test  0x00000000008f149b swift::constraints::ConstraintSystem::solveSingle(swift::FreeTypeVariableBinding) + 59
31 swift-ide-test  0x000000000096510b swift::TypeChecker::checkConformance(swift::NormalProtocolConformance*) + 2059
39 swift-ide-test  0x0000000000938837 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 151
40 swift-ide-test  0x0000000000905f8a swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1434
41 swift-ide-test  0x0000000000774222 swift::CompilerInstance::performSema() + 2946
42 swift-ide-test  0x000000000071ccc3 main + 35011
Stack dump:
0.	Program arguments: swift-ide-test -code-completion -code-completion-token=A -source-filename=<INPUT-FILE>
1.	While type-checking 'A' at <INPUT-FILE>:2:1
```
benlangmuir added a commit that referenced this pull request Dec 16, 2015
…alizedprotocolconformance-gettypewitnesssubstanddecl

[SourceKit] Add test case for crash triggered in swift::SpecializedProtocolConformance::getTypeWitnessSubstAndDecl(…)
@benlangmuir benlangmuir merged commit 2517e58 into swiftlang:master Dec 16, 2015
freak4pc pushed a commit to freak4pc/swift that referenced this pull request Sep 28, 2022
…roject

Add an option to only stress test a single project
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants