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

Piping to tig segfaults on exit #893

Closed
verdie-g opened this issue Jan 28, 2019 · 1 comment
Closed

Piping to tig segfaults on exit #893

verdie-g opened this issue Jan 28, 2019 · 1 comment

Comments

@verdie-g
Copy link

$ tig --version 
tig version 2.4.1
ncursesw version 6.1.20180127
readline version 8.0

Steps to reproduce:

  • echo | tig
  • :q (to exit)

valgrind output:

Invalid read of size 4
   at 0x4893C81: _rl_update_final (in /usr/lib/libreadline.so.8.0)
   by 0x489A8F6: rl_newline (in /usr/lib/libreadline.so.8.0)
   by 0x487CA2D: _rl_dispatch_subseq (in /usr/lib/libreadline.so.8.0)
   by 0x487CFFF: readline_internal_char (in /usr/lib/libreadline.so.8.0)
   by 0x487D825: readline (in /usr/lib/libreadline.so.8.0)
   by 0x124B10: ??? (in /usr/bin/tig)
   by 0x125CEB: ??? (in /usr/bin/tig)
   by 0x1135F6: ??? (in /usr/bin/tig)
   by 0x494B222: (below main) (in /usr/lib/libc-2.28.so)
 Address 0x0 is not stack'd, malloc'd or (recently) free'd


Process terminating with default action of signal 11 (SIGSEGV): dumping core
 Access not within mapped region at address 0x0
   at 0x4893C81: _rl_update_final (in /usr/lib/libreadline.so.8.0)
   by 0x489A8F6: rl_newline (in /usr/lib/libreadline.so.8.0)
   by 0x487CA2D: _rl_dispatch_subseq (in /usr/lib/libreadline.so.8.0)
   by 0x487CFFF: readline_internal_char (in /usr/lib/libreadline.so.8.0)
   by 0x487D825: readline (in /usr/lib/libreadline.so.8.0)
   by 0x124B10: ??? (in /usr/bin/tig)
   by 0x125CEB: ??? (in /usr/bin/tig)
   by 0x1135F6: ??? (in /usr/bin/tig)
   by 0x494B222: (below main) (in /usr/lib/libc-2.28.so)
@koutcher
Copy link
Collaborator

koutcher commented Feb 9, 2019

Same here after Homebrew updated readline to 8.0. The tig test suite also fails with the same error. Switched back to readline 7.0.5 for now.

koutcher added a commit to koutcher/tig that referenced this issue Apr 22, 2019
koutcher added a commit to koutcher/tig that referenced this issue Apr 23, 2019
landonb added a commit to landonb/tig that referenced this issue Jul 17, 2024
- On macOS, you cannot cancel out of search ('/') using
  Ctrl-C (SIGINT), but rather must press <Enter> (and
  perform the search) to return to the main view.

- This commit partially reverts ea43f8b, “Fix segfaults
  with readline 8.0” (and associated Issue, “Piping to
  tig segfaults on exit” jonas#893), but just for macOS builds.
landonb added a commit to landonb/tig that referenced this issue Jul 17, 2024
- On macOS, you cannot cancel out of search ('/') using
  Ctrl-C (SIGINT), but rather must press <Enter> (and
  perform the search) to return to the main view.

- This commit partially reverts ea43f8b, “Fix segfaults
  with readline 8.0” (and associated Issue, “Piping to
  tig segfaults on exit” jonas#893), but just for macOS builds.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants