Uploaded image for project: 'Swift'
  1. Swift
  2. SR-10584

REPL crashes when triggering code completion with tab

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Cannot Reproduce
    • Component/s: LLDB for Swift
    • Labels:
      None
    • Environment:

      Description

      Swift REPL in latest snapshot crashes at once if I want to get code completion for a string. Session captured below:

      Welcome to Swift version 5.0-dev (LLVM 77814f897e, Swift ea80003b0c).
      Type :help for assistance.
        1> let str = "apple"
      str: String = "apple"
        2> print(str.
      Available completions:
      	allSatisfy(predicate: (Character) throws -> Bool(Character) throws -> Bool) -> Bool                                                                                                        
       #0 0x0000555adea34814 (lldb+0x22814)
       #1 0x0000555adea3290c (lldb+0x2090c)
       #2 0x0000555adea34da8 (lldb+0x22da8)
       #3 0x00007f2bd880a4d0 __restore_rt (/usr/lib/libpthread.so.0+0x124d0)
       #4 0x00007f2bd1b66cfc PrintCompletion(_IO_FILE*, unsigned long, unsigned long, lldb_private::StringList&, lldb_private::StringList&) (/home/segabor/.swiftenv/versions/swift-5.1-DEVELOPMENT-SNAPSHOT-2019-04-25-a/usr/bin/../lib/liblldb.so.7svn+0xac9cfc)
       #5 0x00007f2bd1b66b77 lldb_private::Editline::TabCommand(int) (/home/segabor/.swiftenv/versions/swift-5.1-DEVELOPMENT-SNAPSHOT-2019-04-25-a/usr/bin/../lib/liblldb.so.7svn+0xac9b77)
       #6 0x00007f2bd1b6900d lldb_private::Editline::ConfigureEditor(bool)::$_13::__invoke(editline*, int)(/home/segabor/.swiftenv/versions/swift-5.1-DEVELOPMENT-SNAPSHOT-2019-04-25-a/usr/bin/../lib/liblldb.so.7svn+0xacc00d)
       #7 0x00007f2bd06e2d33 el_wgets (/usr/lib/libedit.so.0+0x10d33)
       #8 0x00007f2bd06de2d4 el_gets (/usr/lib/libedit.so.0+0xc2d4)
       #9 0x00007f2bd1b6874d lldb_private::Editline::GetLines(int, lldb_private::StringList&, bool&) (/home/segabor/.swiftenv/versions/swift-5.1-DEVELOPMENT-SNAPSHOT-2019-04-25-a/usr/bin/../lib/liblldb.so.7svn+0xacb74d)
      #10 0x00007f2bd1ac1347 lldb_private::IOHandlerEditline::GetLines(lldb_private::StringList&, bool&) (/home/segabor/.swiftenv/versions/swift-5.1-DEVELOPMENT-SNAPSHOT-2019-04-25-a/usr/bin/../lib/liblldb.so.7svn+0xa24347)
      #11 0x00007f2bd1ac1554 lldb_private::IOHandlerEditline::Run() (/home/segabor/.swiftenv/versions/swift-5.1-DEVELOPMENT-SNAPSHOT-2019-04-25-a/usr/bin/../lib/liblldb.so.7svn+0xa24554)
      #12 0x00007f2bd1aa4d06 lldb_private::Debugger::ExecuteIOHandlers() (/home/segabor/.swiftenv/versions/swift-5.1-DEVELOPMENT-SNAPSHOT-2019-04-25-a/usr/bin/../lib/liblldb.so.7svn+0xa07d06)
      #13 0x00007f2bd1aa908d lldb_private::Debugger::IOHandlerThread(void*)(/home/segabor/.swiftenv/versions/swift-5.1-DEVELOPMENT-SNAPSHOT-2019-04-25-a/usr/bin/../lib/liblldb.so.7svn+0xa0c08d)
      #14 0x00007f2bd1b71544 lldb_private::HostNativeThreadBase::ThreadCreateTrampoline(void*) (/home/segabor/.swiftenv/versions/swift-5.1-DEVELOPMENT-SNAPSHOT-2019-04-25-a/usr/bin/../lib/liblldb.so.7svn+0xad4544)
      #15 0x00007f2bd87ffa92 start_thread (/usr/lib/libpthread.so.0+0x7a92)
      #16 0x00007f2bd0a4bcd3 __GI___clone (/usr/lib/libc.so.6+0xfacd3)
      Segmentation fault (core dumped)
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            segabor Gábor Sebestyén
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: