-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[SourceKit] Add test case for crash triggered in swift::TypeBase::getMemberSubstitutions(…) #488
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
benlangmuir
merged 1 commit into
swiftlang:master
from
practicalswift:sourcekit-004-swift-typebase-getmembersubstitutions
Dec 16, 2015
Merged
[SourceKit] Add test case for crash triggered in swift::TypeBase::getMemberSubstitutions(…) #488
benlangmuir
merged 1 commit into
swiftlang:master
from
practicalswift:sourcekit-004-swift-typebase-getmembersubstitutions
Dec 16, 2015
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This one didn't crash for me with latest swift (I tried 27fad7d) in a release+asserts build. Has this since been fixed, or could there be a problem with the test? |
@benlangmuir You are correct! Nice. I've added two commits: moving it to the fixed directory and changed the |
Please squash into a single commit and I'll merge 👍 |
…MemberSubstitutions(swift::DeclContext*) Stack trace: ``` found code completion token A at offset 143 swift-ide-test: /path/to/swift/lib/AST/Type.cpp:2492: TypeSubstitutionMap swift::TypeBase::getMemberSubstitutions(swift::DeclContext *): Assertion `baseTy && "Couldn't find appropriate context"' failed. 8 swift-ide-test 0x0000000000b957c0 swift::TypeBase::getMemberSubstitutions(swift::DeclContext*) + 432 9 swift-ide-test 0x0000000000b95abd swift::TypeBase::getTypeOfMember(swift::ModuleDecl*, swift::Type, swift::DeclContext*) + 61 10 swift-ide-test 0x000000000098363b swift::TypeChecker::resolveTypeInContext(swift::TypeDecl*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, bool, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 1435 14 swift-ide-test 0x0000000000983f0e 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-ide-test 0x0000000000984e54 swift::TypeChecker::resolveType(swift::TypeRepr*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 164 19 swift-ide-test 0x0000000000ae41e5 swift::Expr::walk(swift::ASTWalker&) + 69 20 swift-ide-test 0x00000000008ccec8 swift::constraints::ConstraintSystem::generateConstraints(swift::Expr*) + 200 21 swift-ide-test 0x0000000000916120 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>) + 256 22 swift-ide-test 0x000000000091c6c9 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 569 23 swift-ide-test 0x000000000091d7e0 swift::TypeChecker::typeCheckBinding(swift::Pattern*&, swift::Expr*&, swift::DeclContext*) + 112 24 swift-ide-test 0x000000000091d989 swift::TypeChecker::typeCheckPatternBinding(swift::PatternBindingDecl*, unsigned int) + 265 31 swift-ide-test 0x0000000000936237 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 151 34 swift-ide-test 0x000000000097f68a swift::TypeChecker::typeCheckClosureBody(swift::ClosureExpr*) + 218 35 swift-ide-test 0x00000000009b77ec swift::constraints::ConstraintSystem::applySolution(swift::constraints::Solution&, swift::Expr*, swift::Type, bool, bool, bool) + 812 36 swift-ide-test 0x000000000091c73b swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 683 38 swift-ide-test 0x000000000097f7d6 swift::TypeChecker::typeCheckTopLevelCodeDecl(swift::TopLevelCodeDecl*) + 134 39 swift-ide-test 0x00000000009039cd swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1405 40 swift-ide-test 0x0000000000773be2 swift::CompilerInstance::performSema() + 2946 41 swift-ide-test 0x000000000071c7c3 main + 35027 Stack dump: 0. Program arguments: swift-ide-test -code-completion -code-completion-token=A -source-filename=<INPUT-FILE> 1. While type-checking expression at [<INPUT-FILE>:2:1 - line:2:39] RangeText="{class d<T where g:e{class B{var b=B p" 2. While type-checking 'd' at <INPUT-FILE>:2:2 3. While type-checking expression at [<INPUT-FILE>:2:36 - line:2:36] RangeText="B" 4. While resolving type B at [<INPUT-FILE>:2:36 - line:2:36] RangeText="B" ``` Mark as fixed. Move to fixed directory.
@benlangmuir Done! :-) |
benlangmuir
added a commit
that referenced
this pull request
Dec 16, 2015
…ase-getmembersubstitutions [SourceKit] Add test case for crash triggered in swift::TypeBase::getMemberSubstitutions(…)
Thanks! |
freak4pc
pushed a commit
to freak4pc/swift
that referenced
this pull request
Sep 28, 2022
…tures Revert "Xfail swift-futures"
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Stack trace: