-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Closed
Labels
code completionArea → source tooling: code completionArea → source tooling: code completioncrashBug: A crash, i.e., an abnormal termination of softwareBug: A crash, i.e., an abnormal termination of software
Description
The following new test case hits a nullpt crash:
// RUN: %swift-ide-test -code-completion -source-filename /tmp/a.swift -code-completion-token=COMPLETE
protocol MyError: Error {}
func oops() {
do {
} catch let error as any MyError {
switch error.httpStatus {
case .#^COMPLETE^#
default: throw error
}
}
}Stack trace
0 swift-ide-test 0x103a9feac (anonymous namespace)::ConstraintGenerator::visitImplicitConversionExpr(swift::ImplicitConversionExpr*) + 0
1 swift-ide-test 0x103a91b8c (anonymous namespace)::ConstraintWalker::walkToExprPost(swift::Expr*) + 204
2 swift-ide-test 0x102b5b290 <deduplicated_symbol> + 224
3 swift-ide-test 0x102b5a118 (anonymous namespace)::Traversal::visit(swift::Expr*) + 964
4 swift-ide-test 0x102b59438 swift::Expr::walk(swift::ASTWalker&) + 88
5 swift-ide-test 0x103a8e654 swift::constraints::ConstraintSystem::generateConstraints(swift::Expr*, swift::DeclContext*) + 288
6 swift-ide-test 0x103a8d004 swift::constraints::ConstraintSystem::generateConstraints(swift::constraints::SyntacticElementTarget&, swift::FreeTypeVariableBinding) + 1140
7 swift-ide-test 0x103ae7044 swift::constraints::ConstraintSystem::solveImpl(swift::constraints::SyntacticElementTarget&, swift::FreeTypeVariableBinding) + 384
8 swift-ide-test 0x103ae6994 swift::constraints::ConstraintSystem::solve(swift::constraints::SyntacticElementTarget&, swift::FreeTypeVariableBinding) + 144
9 swift-ide-test 0x103c676e8 swift::TypeChecker::typeCheckTarget(swift::constraints::SyntacticElementTarget&, swift::optionset::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::DiagnosticTransaction*) + 368
10 swift-ide-test 0x103c6754c swift::TypeChecker::typeCheckExpression(swift::constraints::SyntacticElementTarget&, swift::optionset::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::DiagnosticTransaction*) + 188
11 swift-ide-test 0x103c6744c swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::constraints::ContextualTypeInfo, swift::optionset::OptionSet<swift::TypeCheckExprFlags, unsigned int>) + 96
12 swift-ide-test 0x103d124dc swift::ASTVisitor<(anonymous namespace)::StmtChecker, void, swift::Stmt*, void, void, void, void>::visit(swift::Stmt*) + 1200
13 swift-ide-test 0x103d11ff8 bool (anonymous namespace)::StmtChecker::typeCheckStmt<swift::Stmt>(swift::Stmt*&) + 136
14 swift-ide-test 0x103d0f4a4 (anonymous namespace)::StmtChecker::typeCheckASTNode(swift::ASTNode&) + 152
15 swift-ide-test 0x103d12148 swift::ASTVisitor<(anonymous namespace)::StmtChecker, void, swift::Stmt*, void, void, void, void>::visit(swift::Stmt*) + 284
16 swift-ide-test 0x103d10b6c bool (anonymous namespace)::StmtChecker::typeCheckStmt<swift::BraceStmt>(swift::BraceStmt*&) + 136
17 swift-ide-test 0x103d1358c void (anonymous namespace)::StmtChecker::checkSiblingCaseStmts<swift::CaseStmt* const*>(swift::CaseStmt* const*, swift::CaseStmt* const*, swift::CaseParentKind, bool&, swift::Type) + 560
18 swift-ide-test 0x103d127ac swift::ASTVisitor<(anonymous namespace)::StmtChecker, void, swift::Stmt*, void, void, void, void>::visit(swift::Stmt*) + 1920
19 swift-ide-test 0x103d11ff8 bool (anonymous namespace)::StmtChecker::typeCheckStmt<swift::Stmt>(swift::Stmt*&) + 136
20 swift-ide-test 0x103d0f4a4 (anonymous namespace)::StmtChecker::typeCheckASTNode(swift::ASTNode&) + 152
21 swift-ide-test 0x103d0fb68 swift::TypeCheckASTNodeAtLocRequest::evaluate(swift::Evaluator&, swift::TypeCheckASTNodeAtLocContext, swift::SourceLoc) const + 848
22 swift-ide-test 0x103d57184 swift::TypeCheckASTNodeAtLocRequest::OutputType swift::Evaluator::getResultUncached<swift::TypeCheckASTNodeAtLocRequest, swift::TypeCheckASTNodeAtLocRequest::OutputType swift::evaluateOrDefault<swift::TypeCheckASTNodeAtLocRequest>(swift::Evaluator&, swift::TypeCheckASTNodeAtLocRequest, swift::TypeCheckASTNodeAtLocRequest::OutputType)::'lambda'()>(swift::TypeCheckASTNodeAtLocRequest const&, swift::TypeCheckASTNodeAtLocRequest::OutputType swift::evaluateOrDefault<swift::TypeCheckASTNodeAtLocRequest>(swift::Evaluator&, swift::TypeCheckASTNodeAtLocRequest, swift::TypeCheckASTNodeAtLocRequest::OutputType)::'lambda'()) + 200
23 swift-ide-test 0x103d47d14 swift::typeCheckASTNodeAtLoc(swift::TypeCheckASTNodeAtLocContext, swift::SourceLoc) + 76
24 swift-ide-test 0x102ee19c0 (anonymous namespace)::CodeCompletionCallbacksImpl::readyForTypeChecking(swift::SourceFile*) + 1804
25 swift-ide-test 0x103f5956c swift::Parser::performIDEInspectionSecondPassImpl(swift::IDEInspectionDelayedDeclState&) + 428
26 swift-ide-test 0x103f592c8 swift::IDEInspectionSecondPassRequest::evaluate(swift::Evaluator&, swift::SourceFile*, swift::IDEInspectionCallbacksFactory*) const + 220
27 swift-ide-test 0x103f5ee80 swift::IDEInspectionSecondPassRequest::OutputType swift::Evaluator::getResultUncached<swift::IDEInspectionSecondPassRequest, swift::IDEInspectionSecondPassRequest::OutputType swift::evaluateOrDefault<swift::IDEInspectionSecondPassRequest>(swift::Evaluator&, swift::IDEInspectionSecondPassRequest, swift::IDEInspectionSecondPassRequest::OutputType)::'lambda'()>(swift::IDEInspectionSecondPassRequest const&, swift::IDEInspectionSecondPassRequest::OutputType swift::evaluateOrDefault<swift::IDEInspectionSecondPassRequest>(swift::Evaluator&, swift::IDEInspectionSecondPassRequest, swift::IDEInspectionSecondPassRequest::OutputType)::'lambda'()) + 224
28 swift-ide-test 0x103f591dc swift::performIDEInspectionSecondPass(swift::SourceFile&, swift::IDEInspectionCallbacksFactory&) + 52
29 swift-ide-test 0x102f64264 void llvm::function_ref<void (swift::ide::IDEInspectionInstanceResult const&, llvm::function_ref<void (swift::ide::CancellableResult<swift::ide::CodeCompleteResult>)>)>::callback_fn<swift::ide::IDEInspectionInstance::codeComplete(swift::CompilerInvocation&, llvm::ArrayRef<char const*>, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, llvm::MemoryBuffer*, unsigned int, swift::DiagnosticConsumer*, swift::ide::CodeCompletionContext&, std::__1::shared_ptr<std::__1::atomic<bool>>, llvm::function_ref<void (swift::ide::CancellableResult<swift::ide::CodeCompleteResult>)>)::$_0::operator()(swift::ide::CancellableResult<swift::ide::IDEInspectionInstanceResult>) const::'lambda'(auto&, auto)>(long, swift::ide::IDEInspectionInstanceResult const&, llvm::function_ref<void (swift::ide::CancellableResult<swift::ide::CodeCompleteResult>)>) + 896
30 swift-ide-test 0x102f63834 void swift::ide::CancellableResult<swift::ide::IDEInspectionInstanceResult>::mapAsync<swift::ide::CodeCompleteResult>(llvm::function_ref<void (swift::ide::IDEInspectionInstanceResult const&, llvm::function_ref<void (swift::ide::CancellableResult<swift::ide::CodeCompleteResult>)>)>, llvm::function_ref<void (swift::ide::CancellableResult<swift::ide::CodeCompleteResult>)>) + 84
31 swift-ide-test 0x102f63774 void llvm::function_ref<void (swift::ide::CancellableResult<swift::ide::IDEInspectionInstanceResult>)>::callback_fn<swift::ide::IDEInspectionInstance::codeComplete(swift::CompilerInvocation&, llvm::ArrayRef<char const*>, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, llvm::MemoryBuffer*, unsigned int, swift::DiagnosticConsumer*, swift::ide::CodeCompletionContext&, std::__1::shared_ptr<std::__1::atomic<bool>>, llvm::function_ref<void (swift::ide::CancellableResult<swift::ide::CodeCompleteResult>)>)::$_0>(long, swift::ide::CancellableResult<swift::ide::IDEInspectionInstanceResult>) + 128
32 swift-ide-test 0x102f622fc llvm::function_ref<void (swift::ide::CancellableResult<swift::ide::IDEInspectionInstanceResult>)>::operator()(swift::ide::CancellableResult<swift::ide::IDEInspectionInstanceResult>) const + 104
33 swift-ide-test 0x102f62940 swift::ide::IDEInspectionInstance::performNewOperation(std::__1::optional<llvm::hash_code>, swift::CompilerInvocation&, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, llvm::MemoryBuffer*, unsigned int, swift::DiagnosticConsumer*, std::__1::shared_ptr<std::__1::atomic<bool>>, llvm::function_ref<void (swift::ide::CancellableResult<swift::ide::IDEInspectionInstanceResult>)>) + 852
34 swift-ide-test 0x102f630b4 swift::ide::IDEInspectionInstance::performOperation(swift::CompilerInvocation&, llvm::ArrayRef<char const*>, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, llvm::MemoryBuffer*, unsigned int, swift::DiagnosticConsumer*, std::__1::shared_ptr<std::__1::atomic<bool>>, llvm::function_ref<void (swift::ide::CancellableResult<swift::ide::IDEInspectionInstanceResult>)>) + 524
35 swift-ide-test 0x102f6327c swift::ide::IDEInspectionInstance::codeComplete(swift::CompilerInvocation&, llvm::ArrayRef<char const*>, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, llvm::MemoryBuffer*, unsigned int, swift::DiagnosticConsumer*, swift::ide::CodeCompletionContext&, std::__1::shared_ptr<std::__1::atomic<bool>>, llvm::function_ref<void (swift::ide::CancellableResult<swift::ide::CodeCompleteResult>)>) + 208
36 swift-ide-test 0x102a537ac bool llvm::function_ref<bool (CompletionLikeOperationParams)>::callback_fn<doCodeCompletion(swift::CompilerInvocation const&, llvm::StringRef, llvm::StringRef, llvm::StringRef, bool, bool, bool, bool, bool, bool, bool, bool, bool)::$_0>(long, CompletionLikeOperationParams) + 368
37 swift-ide-test 0x102a534f0 performWithCompletionLikeOperationParams(swift::CompilerInvocation const&, llvm::StringRef, llvm::StringRef, llvm::StringRef, bool, llvm::function_ref<bool (CompletionLikeOperationParams)>) + 1436
38 swift-ide-test 0x102a40b70 doCodeCompletion(swift::CompilerInvocation const&, llvm::StringRef, llvm::StringRef, llvm::StringRef, bool, bool, bool, bool, bool, bool, bool, bool, bool) + 464
39 swift-ide-test 0x102a3c2b4 main + 12516
40 dyld 0x180895d54 start + 7184
Metadata
Metadata
Assignees
Labels
code completionArea → source tooling: code completionArea → source tooling: code completioncrashBug: A crash, i.e., an abnormal termination of softwareBug: A crash, i.e., an abnormal termination of software