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

seg fault on tab completion in swift REPL

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Component/s: Compiler
    • Environment:

      macOS 10.14.6

      Xcode 11.0

      Description

      If I try tab completion in the REPL in this example:

      $ swift
      Welcome to Apple Swift version 5.1 (swiftlang-1100.0.270.13 clang-1100.0.33.7).
      1> var optionalName: String? = "Foo"
      optionalName: String? = "Foo"
      2> if let name = optio<tab>

       

      I get the following seg fault error:

       

      lldb 0x000000010b8c2705 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 37
      1 lldb 0x000000010b8c1d77 llvm::sys::RunSignalHandlers() + 39
      2 lldb 0x000000010b8c2d58 SignalHandler(int) + 264
      3 libsystem_platform.dylib 0x00007fff78587b5d _sigtramp + 29
      4 libsystem_platform.dylib 0x00007fdb6d27c300 _sigtramp + 4107225024
      5 LLDB 0x000000010c37b1dd (anonymous namespace)::CodeCompletionCallbacksImpl::doneParsing() + 15469
      6 LLDB 0x000000010cb597ba swift::performDelayedParsing(swift::DeclContext*, swift::PersistentParserState&, swift::CodeCompletionCallbacksFactory*) + 458
      7 LLDB 0x000000010c39f03e doCodeCompletion(swift::SourceFile&, llvm::StringRef, unsigned int*, swift::CodeCompletionCallbacksFactory*) + 494
      8 LLDB 0x000000010c39ede1 swift::REPLCompletions::populate(swift::SourceFile&, llvm::StringRef) + 673
      9 LLDB 0x000000010bdde029 lldb_private::SwiftREPL::CompleteCode(std::_1::basic_string<char, std::1::char_traits<char>, std::_1::allocator<char> > const&, lldb_private::StringList&) + 569
      10 LLDB 0x000000010bb8d4a9 lldb_private::REPL::IOHandlerComplete(lldb_private::IOHandler&, char const*, char const*, char const*, int, int, lldb_private::StringList&, lldb_private::StringList&) + 489
      11 LLDB 0x000000010bb01157 lldb_private::IOHandlerEditline::AutoCompleteCallback(char const*, char const*, char const*, int, int, lldb_private::StringList&, lldb_private::StringList&, void*) + 55
      12 LLDB 0x000000010bba41fe lldb_private::Editline::TabCommand(int) + 110
      13 LLDB 0x000000010bba6531 lldb_private::Editline::ConfigureEditor(bool)::$13::_invoke(editline*, int) + 33
      14 libedit.3.dylib 0x00007fff75f0774b el_wgets + 478
      15 libedit.3.dylib 0x00007fff75f1294b el_gets + 37
      16 LLDB 0x000000010bba5d1e lldb_private::Editline::GetLines(int, lldb_private::StringList&, bool&) + 446
      17 LLDB 0x000000010bb01b03 lldb_private::IOHandlerEditline::Run() + 115
      18 LLDB 0x000000010bae8fdb lldb_private::Debugger::ExecuteIOHandlers() + 123
      19 LLDB 0x000000010baeba23 lldb_private::Debugger::IOHandlerThread(void*) + 19
      20 LLDB 0x000000010bb962d7 lldb_private::HostNativeThreadBase::ThreadCreateTrampoline(void*) + 103
      21 libsystem_pthread.dylib 0x00007fff785902eb _pthread_body + 126
      22 libsystem_pthread.dylib 0x00007fff78593249 _pthread_start + 66
      23 libsystem_pthread.dylib 0x00007fff7858f40d thread_start + 13
      Segmentation fault: 11

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              rob_kn Rob Knapen
              Votes:
              15 Vote for this issue
              Watchers:
              19 Start watching this issue

                Dates

                Created:
                Updated: