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-10584] REPL crashes when triggering code completion with tab #4569
Comments
Comment by Gábor Sebestyén (JIRA) Tested on Ubuntu 18.04.2 LTS with Swift 5.0.1 release and it worked. So above crash occurs only on Arch Linux. I checked out which libc6 version is being used, Ubuntu uses version 2.27, Arch Linux has a newer one 2.29-1. |
Comment by Gábor Sebestyén (JIRA) I tried the reported sample with snapshot [segabor@csihuhu ~]$ swift
Welcome to Swift version 5.1-dev (LLVM 082dec2e22, Swift 4929726d30).
Type :help for assistance.
1> let str="apple"
str: String = "apple"
2> print(str.lldb: /home/segabor/Workspace/swift-dev/lldb/source/Symbol/SwiftASTContext.cpp:3082: swift::ASTContext *lldb_private::SwiftASTContext::GetASTContext(): Assertion `m_initialized_search_path_options && m_initialized_clang_importer_options && "search path options must be initialized before ClangImporter"' failed.
#​0 0x000055c3e23e42e4 (lldb+0x222e4)
#​1 0x000055c3e23e23dc (lldb+0x203dc)
#​2 0x000055c3e23e4878 (lldb+0x22878)
#​3 0x00007fe2a04db4d0 __restore_rt (/usr/lib/libpthread.so.0+0x124d0)
#​4 0x00007fe29861b82f __GI_raise (/usr/lib/libc.so.6+0x3782f)
#​5 0x00007fe298606672 __GI_abort (/usr/lib/libc.so.6+0x22672)
#​6 0x00007fe298606548 _nl_load_domain.cold.0 (/usr/lib/libc.so.6+0x22548)
#​7 0x00007fe298613db6 (/usr/lib/libc.so.6+0x2fdb6)
#​8 0x00007fe299891f1e lldb_private::SwiftASTContext::GetASTContext() (/home/segabor/.swiftenv/versions/swift-5.1-DEVELOPMENT-SNAPSHOT-2019-05-21-a/usr/bin/../lib/liblldb.so.7svn+0xb61f1e)
#​9 0x00007fe299893511 lldb_private::SwiftASTContext::SwiftASTContext(lldb_private::SwiftASTContext const&) (/home/segabor/.swiftenv/versions/swift-5.1-DEVELOPMENT-SNAPSHOT-2019-05-21-a/usr/bin/../lib/liblldb.so.7svn+0xb63511)
#​10 0x00007fe299aafde9 lldb_private::SwiftREPL::CompleteCode(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, lldb_private::StringList&) (/home/segabor/.swiftenv/versions/swift-5.1-DEVELOPMENT-SNAPSHOT-2019-05-21-a/usr/bin/../lib/liblldb.so.7svn+0xd7fde9)
#​11 0x00007fe2997e8168 lldb_private::REPL::IOHandlerComplete(lldb_private::IOHandler&, char const*, char const*, char const*, int, int, lldb_private::StringList&, lldb_private::StringList&) (/home/segabor/.swiftenv/versions/swift-5.1-DEVELOPMENT-SNAPSHOT-2019-05-21-a/usr/bin/../lib/liblldb.so.7svn+0xab8168)
#​12 0x00007fe2997537d6 lldb_private::IOHandlerEditline::AutoCompleteCallback(char const*, char const*, char const*, int, int, lldb_private::StringList&, lldb_private::StringList&, void*) (/home/segabor/.swiftenv/versions/swift-5.1-DEVELOPMENT-SNAPSHOT-2019-05-21-a/usr/bin/../lib/liblldb.so.7svn+0xa237d6)
#​13 0x00007fe2997f972b lldb_private::Editline::TabCommand(int) (/home/segabor/.swiftenv/versions/swift-5.1-DEVELOPMENT-SNAPSHOT-2019-05-21-a/usr/bin/../lib/liblldb.so.7svn+0xac972b)
#​14 0x00007fe2997fbced lldb_private::Editline::ConfigureEditor(bool)::$13::_invoke(editline*, int) (/home/segabor/.swiftenv/versions/swift-5.1-DEVELOPMENT-SNAPSHOT-2019-05-21-a/usr/bin/../lib/liblldb.so.7svn+0xacbced)
#​15 0x00007fe298375d33 el_wgets (/usr/lib/libedit.so.0+0x10d33)
#​16 0x00007fe2983712d4 el_gets (/usr/lib/libedit.so.0+0xc2d4)
#​17 0x00007fe2997fb42d lldb_private::Editline::GetLines(int, lldb_private::StringList&, bool&) (/home/segabor/.swiftenv/versions/swift-5.1-DEVELOPMENT-SNAPSHOT-2019-05-21-a/usr/bin/../lib/liblldb.so.7svn+0xacb42d)
#​18 0x00007fe299753ff7 lldb_private::IOHandlerEditline::GetLines(lldb_private::StringList&, bool&) (/home/segabor/.swiftenv/versions/swift-5.1-DEVELOPMENT-SNAPSHOT-2019-05-21-a/usr/bin/../lib/liblldb.so.7svn+0xa23ff7)
#​19 0x00007fe299754204 lldb_private::IOHandlerEditline::Run() (/home/segabor/.swiftenv/versions/swift-5.1-DEVELOPMENT-SNAPSHOT-2019-05-21-a/usr/bin/../lib/liblldb.so.7svn+0xa24204)
#​20 0x00007fe299737a26 lldb_private::Debugger::ExecuteIOHandlers() (/home/segabor/.swiftenv/versions/swift-5.1-DEVELOPMENT-SNAPSHOT-2019-05-21-a/usr/bin/../lib/liblldb.so.7svn+0xa07a26)
#​21 0x00007fe29973bdad lldb_private::Debugger::IOHandlerThread(void*) (/home/segabor/.swiftenv/versions/swift-5.1-DEVELOPMENT-SNAPSHOT-2019-05-21-a/usr/bin/../lib/liblldb.so.7svn+0xa0bdad)
#​22 0x00007fe299804184 lldb_private::HostNativeThreadBase::ThreadCreateTrampoline(void*) (/home/segabor/.swiftenv/versions/swift-5.1-DEVELOPMENT-SNAPSHOT-2019-05-21-a/usr/bin/../lib/liblldb.so.7svn+0xad4184)
#​23 0x00007fe2a04d0a92 start_thread (/usr/lib/libpthread.so.0+0x7a92)
#​24 0x00007fe2986decd3 _GI__clone (/usr/lib/libc.so.6+0xfacd3)
Aborted (core dumped) |
Comment by Gábor Sebestyén (JIRA) Bug disappeared in snapshot `swift-5.1-DEVELOPMENT-SNAPSHOT-2019-06-21-a`. So I'm going to close the ticket. |
Comment by Gábor Sebestyén (JIRA) As commented earlier issue is gone in snapshot `swift-5.1-DEVELOPMENT-SNAPSHOT-2019-06-21-a`, tab completion in REPL works as a charm. |
Environment
OS: Arch Linux
Swift Snapshot Version: 5.1-DEVELOPMENT-SNAPSHOT-2019-04-25-a
Additional Detail from JIRA
md5: 999acccd4cc97b4131e9058e2a7608fa
Issue Description:
Swift REPL in latest snapshot crashes at once if I want to get code completion for a string. Session captured below:
The text was updated successfully, but these errors were encountered: