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-12017] Tab completion in repl causes "Segmentation fault: 11" #54454

Closed
swift-ci opened this issue Jan 12, 2020 · 1 comment
Closed

[SR-12017] Tab completion in repl causes "Segmentation fault: 11" #54454

swift-ci opened this issue Jan 12, 2020 · 1 comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-12017
Radar None
Original Reporter dastrobu (JIRA User)
Type Bug
Status Resolved
Resolution Duplicate
Environment
$ swift --version
Apple Swift version 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
Target: x86_64-apple-darwin19.2.0
$ uname -mrsv
Darwin 19.2.0 Darwin Kernel Version 19.2.0: Sat Nov  9 03:47:04 PST 2019; root:xnu-6153.61.1~20/RELEASE_X86_64 x86_64 
Additional Detail from JIRA
Votes 0
Component/s
Labels Bug
Assignee None
Priority Medium

md5: 2764422b6f690428d5d67f74ea1d8047

duplicates:

  • SR-11578 seg fault on tab completion in swift REPL

Issue Description:

Open a repl and type a single letter like shown below.

$ swift
Welcome to Apple Swift version 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15).
Type :help for assistance.
  1> a 

Then hit tab, which causes the following segfault.

0  lldb                     0x0000000106d54705 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 37
1  lldb                     0x0000000104260d77 llvm::sys::RunSignalHandlers() + 39
2  lldb                     0x0000000104261d58 SignalHandler(int) + 264
3  libsystem_platform.dylib 0x00007fff7316542d _sigtramp + 29
4  libsystem_platform.dylib 000000000000000000 _sigtramp + 2364124144
5  LLDB                     0x0000000105786b0d (anonymous namespace)::CodeCompletionCallbacksImpl::doneParsing() + 15469
6  LLDB                     0x0000000105f6d21a swift::performDelayedParsing(swift::DeclContext*, swift::PersistentParserState&, swift::CodeCompletionCallbacksFactory*) + 458
7  LLDB                     0x00000001057aa96e doCodeCompletion(swift::SourceFile&, llvm::StringRef, unsigned int*, swift::CodeCompletionCallbacksFactory*) + 494
8  LLDB                     0x00000001057aa711 swift::REPLCompletions::populate(swift::SourceFile&, llvm::StringRef) + 673
9  LLDB                     0x00000001051e8599 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                     0x0000000104f979b9 lldb_private::REPL::IOHandlerComplete(lldb_private::IOHandler&, char const*, char const*, char const*, int, int, lldb_private::StringList&, lldb_private::StringList&) + 489
11 LLDB                     0x0000000104f0b657 lldb_private::IOHandlerEditline::AutoCompleteCallback(char const*, char const*, char const*, int, int, lldb_private::StringList&, lldb_private::StringList&, void*) + 55
12 LLDB                     0x0000000104fae70e lldb_private::Editline::TabCommand(int) + 110
13 LLDB                     0x0000000104fb0a41 lldb_private::Editline::ConfigureEditor(bool)::$_13::__invoke(editline*, int) + 33
14 libedit.3.dylib          0x00007fff70b0f7db el_wgets + 484
15 libedit.3.dylib          0x00007fff70b1a8bb el_gets + 37
16 LLDB                     0x0000000104fb022e lldb_private::Editline::GetLines(int, lldb_private::StringList&, bool&) + 446
17 LLDB                     0x0000000104f0c003 lldb_private::IOHandlerEditline::Run() + 115
18 LLDB                     0x0000000104ef34db lldb_private::Debugger::ExecuteIOHandlers() + 123
19 LLDB                     0x0000000104ef5f23 lldb_private::Debugger::IOHandlerThread(void*) + 19
20 LLDB                     0x0000000104fa07e7 lldb_private::HostNativeThreadBase::ThreadCreateTrampoline(void*) + 103
21 libsystem_pthread.dylib  0x00007fff73170e65 _pthread_start + 148
22 libsystem_pthread.dylib  0x00007fff7316c83b thread_start + 15
Segmentation fault: 11

Some googling showed that other people experienced this some time ago:

It was also discussed here to remove ~/.lldb but this did not change the behaviour for me.

@beccadax
Copy link
Contributor

@swift-ci create

@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

2 participants