Skip to content
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

[SR-10784] Compiler crash: Segmentation fault #53174

Closed
swift-ci opened this issue May 29, 2019 · 0 comments
Closed

[SR-10784] Compiler crash: Segmentation fault #53174

swift-ci opened this issue May 29, 2019 · 0 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-10784
Radar None
Original Reporter DevilDimon (JIRA User)
Type Bug
Status Resolved
Resolution Duplicate
Environment

Xcode 10.2.1 (10E1001)

Additional Detail from JIRA
Votes 0
Component/s
Labels Bug
Assignee None
Priority Medium

md5: 348eb3a3ced863255f1812a37172c81d

duplicates:

Issue Description:

The following line crashes the compiler in Xcode, Playground or REPL:

"".split(separator: " ").compactMap(Int.init)

If I change it to the following, though, the compiler does not crash:

"".split(separator: " ").compactMap { Int($0) }

Here's the stacktrace:

0  lldb                     0x000000010efb5f95 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 37
1  lldb                     0x000000010efb5347 llvm::sys::RunSignalHandlers() + 39
2  lldb                     0x000000010efb65f2 SignalHandler(int) + 258
3  libsystem_platform.dylib 0x00007fff5c179b5d _sigtramp + 29
4  libsystem_platform.dylib 0x00007fd524a19838 _sigtramp + 3364486392
5  LLDB                     0x0000000113fc6762 swift::constraints::RequirementFailure::diagnoseAsError() + 66
6  LLDB                     0x0000000113fc51c7 swift::constraints::MissingConformance::diagnose(swift::Expr*, bool) const + 231
7  LLDB                     0x0000000113f56324 swift::Expr* llvm::function_ref<swift::Expr* (swift::Expr*)>::callback_fn<swift::constraints::ConstraintSystem::applySolutionFixes(swift::Expr*, swift::constraints::Solution const&)::$_11>(long, swift::Expr*) + 228
8  LLDB                     0x000000011378ff3e swift::Expr::forEachChildExpr(llvm::function_ref<swift::Expr* (swift::Expr*)>)::ChildWalker::walkToExprPre(swift::Expr*) + 14
9  LLDB                     0x000000011373f6dd swift::ASTVisitor<(anonymous namespace)::Traversal, swift::Expr*, swift::Stmt*, bool, swift::Pattern*, bool, void>::visit(swift::Expr*) + 205
10 LLDB                     0x0000000113741e63 (anonymous namespace)::Traversal::visitApplyExpr(swift::ApplyExpr*) + 211
11 LLDB                     0x000000011373f0e4 swift::Expr::walk(swift::ASTWalker&) + 84
12 LLDB                     0x0000000113786383 swift::Expr::forEachChildExpr(llvm::function_ref<swift::Expr* (swift::Expr*)>) + 51
13 LLDB                     0x0000000113f2e8f1 swift::constraints::ConstraintSystem::applySolutionFixes(swift::Expr*, swift::constraints::Solution const&) + 481
14 LLDB                     0x0000000113f2eacb swift::constraints::ConstraintSystem::applySolution(swift::constraints::Solution&, swift::Expr*, swift::Type, bool, bool) + 59
15 LLDB                     0x0000000114042917 swift::TypeChecker::typeCheckExpressionImpl(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener&, swift::constraints::ConstraintSystem*) + 1143
16 LLDB                     0x0000000114043d53 swift::TypeChecker::typeCheckBinding(swift::Pattern*&, swift::Expr*&, swift::DeclContext*, bool) + 339
17 LLDB                     0x0000000114043fd5 swift::TypeChecker::typeCheckPatternBinding(swift::PatternBindingDecl*, unsigned int, bool) + 277
18 LLDB                     0x000000011405d3ba validatePatternBindingEntries(swift::TypeChecker&, swift::PatternBindingDecl*) + 714
19 LLDB                     0x0000000114056d23 (anonymous namespace)::DeclChecker::visit(swift::Decl*) + 1619
20 LLDB                     0x00000001140566c6 swift::TypeChecker::typeCheckDecl(swift::Decl*) + 38
21 LLDB                     0x00000001140bef84 swift::ASTVisitor<(anonymous namespace)::StmtChecker, void, swift::Stmt*, void, void, void, void>::visit(swift::Stmt*) + 1316
22 LLDB                     0x00000001140c1158 bool (anonymous namespace)::StmtChecker::typeCheckStmt<swift::Stmt>(swift::Stmt*&) + 136
23 LLDB                     0x00000001140bf365 swift::ASTVisitor<(anonymous namespace)::StmtChecker, void, swift::Stmt*, void, void, void, void>::visit(swift::Stmt*) + 2309
24 LLDB                     0x00000001140c1158 bool (anonymous namespace)::StmtChecker::typeCheckStmt<swift::Stmt>(swift::Stmt*&) + 136
25 LLDB                     0x00000001140bef99 swift::ASTVisitor<(anonymous namespace)::StmtChecker, void, swift::Stmt*, void, void, void, void>::visit(swift::Stmt*) + 1337
26 LLDB                     0x00000001140be108 bool (anonymous namespace)::StmtChecker::typeCheckStmt<swift::BraceStmt>(swift::BraceStmt*&) + 136
27 LLDB                     0x00000001140be1fe swift::TypeChecker::typeCheckTopLevelCodeDecl(swift::TopLevelCodeDecl*) + 174
28 LLDB                     0x00000001140d9f96 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int) + 934
29 LLDB                     0x000000011460c639 lldb_private::SwiftExpressionParser::Parse(lldb_private::DiagnosticManager&, unsigned int, unsigned int, unsigned int) + 401
30 LLDB                     0x00000001146582c7 lldb_private::SwiftUserExpression::Parse(lldb_private::DiagnosticManager&, lldb_private::ExecutionContext&, lldb_private::ExecutionPolicy, bool, bool, unsigned int) + 911
31 LLDB                     0x00000001143f369f lldb_private::UserExpression::Evaluate(lldb_private::ExecutionContext&, lldb_private::EvaluateExpressionOptions const&, llvm::StringRef, llvm::StringRef, lldb_private::SharingPtr<lldb_private::ValueObject>&, lldb_private::Status&, unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*, std::__1::shared_ptr<lldb_private::Module>*) + 1361
32 LLDB                     0x00000001142b3b6d lldb_private::REPL::IOHandlerInputComplete(lldb_private::IOHandler&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&) + 1863
33 LLDB                     0x00000001143456ae lldb_private::IOHandlerEditline::Run() + 338
34 LLDB                     0x0000000114210098 lldb_private::Debugger::ExecuteIOHandlers() + 68
35 LLDB                     0x0000000114212d18 lldb_private::Debugger::IOHandlerThread(void*) + 14
36 LLDB                     0x000000011445193b lldb_private::HostNativeThreadBase::ThreadCreateTrampoline(void*) + 105
37 libsystem_pthread.dylib  0x00007fff5c1822eb _pthread_body + 126
38 libsystem_pthread.dylib  0x00007fff5c185249 _pthread_start + 66
39 libsystem_pthread.dylib  0x00007fff5c18140d thread_start + 13
Segmentation fault: 11
@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.
Projects
None yet
Development

No branches or pull requests

1 participant