marlonrichert / zsh-autocomplete

🤖 Real-time type-ahead completion for Zsh. Asynchronous find-as-you-type autocompletion.
MIT License
5.26k stars 145 forks source link

ZSH segfault when zsh-autosuggestions is enabled #725

Open YaroST12 opened 3 months ago

YaroST12 commented 3 months ago

Environment

% typeset -p1 VENDOR OSTYPE ZSH_PATCHLEVEL _autocomplete__funcfiletrace
typeset VENDOR=pc
typeset OSTYPE=linux-gnu
typeset ZSH_PATCHLEVEL=zsh-5.9-0-g73d3173
typeset -a _autocomplete__funcfiletrace=(
  /home/yaro/.oh-my-zsh/plugins/zsh-autocomplete/zsh-autocomplete.plugin.zsh:4
  /home/yaro/.oh-my-zsh/oh-my-zsh.sh:181
  /home/yaro/.oh-my-zsh/oh-my-zsh.sh:208
  /home/yaro/.zshrc:75
  zsh:0
)

% git -C ~autocomplete log --oneline -n1
Unavailable, using Arch linux version: zsh-autosuggestions 0.7.0-2
  1. Type (or call it from history) adb shell am broadcast -a android.intent.action.BOOT_COMPLETED
  2. Hit CTR+C or execute the command
  3. Hit arrow key up to open history
  4. Segfault.

This adb shell line seems to reproduce it 10/10 times, but I've caught segfaults in a few other places, which I assume are caused by the same issue.

YaroST12 commented 3 months ago

Here's the coredump from journalctl

Jun 10 15:31:49 yaro systemd-coredump[475386]: [🡕] Process 474047 (zsh) of user 1000 dumped core.

                                               Stack trace of thread 474047:
                                               #0  0x0000557b3eaf9f90 n/a (complist.so + 0x8f90)
                                               #1  0x0000557b3eafbbed n/a (complist.so + 0xabed)
                                               #2  0x0000557b3eee7e21 list_matches (complete.so + 0x15e21)
                                               #3  0x0000557b3eb46257 zrefresh (zle.so + 0x27257)
                                               #4  0x0000557b3eaf5bd0 n/a (complist.so + 0x4bd0)
                                               #5  0x0000557b3ef6f109 runhookdef (zsh + 0x6a109)
                                               #6  0x0000557b3eedad56 after_complete (complete.so + 0x8d56)
                                               #7  0x0000557b3eb5292c n/a (zle.so + 0x3392c)
                                               #8  0x0000557b3eaf8a20 n/a (complist.so + 0x7a20)
                                               #9  0x0000557b3eb4b074 completecall (zle.so + 0x2c074)
                                               #10 0x0000557b3eb3870f execzlefunc (zle.so + 0x1970f)
                                               #11 0x0000557b3eb4e441 n/a (zle.so + 0x2f441)
                                               #12 0x0000557b3ef16163 execbuiltin (zsh + 0x11163)
                                               #13 0x0000557b3ef3d7e6 n/a (zsh + 0x387e6)
                                               #14 0x0000557b3ef3e2cf n/a (zsh + 0x392cf)
                                               #15 0x0000557b3ef3e714 n/a (zsh + 0x39714)
                                               #16 0x0000557b3ef40646 execlist (zsh + 0x3b646)
                                               #17 0x0000557b3ef7499f execif (zsh + 0x6f99f)
                                               #18 0x0000557b3ef3c0ed n/a (zsh + 0x370ed)
                                               #19 0x0000557b3ef3e2cf n/a (zsh + 0x392cf)
                                               #20 0x0000557b3ef3e714 n/a (zsh + 0x39714)
                                               #21 0x0000557b3ef40646 execlist (zsh + 0x3b646)
                                               #22 0x0000557b3ef40e3e execode (zsh + 0x3be3e)
                                               #23 0x0000557b3ef44799 runshfunc (zsh + 0x3f799)
                                               #24 0x0000557b3e7dfc66 n/a (private.so + 0x1c66)
                                               #25 0x0000557b3ef4452d runshfunc (zsh + 0x3f52d)
                                               #26 0x0000557b3ef44eda doshfunc (zsh + 0x3feda)
                                               #27 0x0000557b3eb384b6 execzlefunc (zle.so + 0x194b6)
                                               #28 0x0000557b3eb4e441 n/a (zle.so + 0x2f441)
                                               #29 0x0000557b3ef16163 execbuiltin (zsh + 0x11163)
                                               #30 0x0000557b3ef3d7e6 n/a (zsh + 0x387e6)
                                               #31 0x0000557b3ef3e2cf n/a (zsh + 0x392cf)
                                               #32 0x0000557b3ef3e714 n/a (zsh + 0x39714)
                                               #33 0x0000557b3ef40646 execlist (zsh + 0x3b646)
                                               #34 0x0000557b3ef7499f execif (zsh + 0x6f99f)
                                               #35 0x0000557b3ef3c0ed n/a (zsh + 0x370ed)
                                               #36 0x0000557b3ef3e2cf n/a (zsh + 0x392cf)
                                               #37 0x0000557b3ef3e714 n/a (zsh + 0x39714)
                                               #38 0x0000557b3ef40646 execlist (zsh + 0x3b646)
                                               #39 0x0000557b3ef40e3e execode (zsh + 0x3be3e)
                                               #40 0x0000557b3ef44799 runshfunc (zsh + 0x3f799)
                                               #41 0x0000557b3e7dfc66 n/a (private.so + 0x1c66)
                                               #42 0x0000557b3ef4452d runshfunc (zsh + 0x3f52d)
                                               #43 0x0000557b3ef44eda doshfunc (zsh + 0x3feda)
                                               #44 0x0000557b3ef465b4 n/a (zsh + 0x415b4)
                                               #45 0x0000557b3ef3dc70 n/a (zsh + 0x38c70)
                                               #46 0x0000557b3ef3e2cf n/a (zsh + 0x392cf)
                                               #47 0x0000557b3ef3e714 n/a (zsh + 0x39714)
                                               #48 0x0000557b3ef40646 execlist (zsh + 0x3b646)
                                               #49 0x0000557b3ef40e3e execode (zsh + 0x3be3e)
                                               #50 0x0000557b3ef44799 runshfunc (zsh + 0x3f799)
                                               #51 0x0000557b3e7dfc66 n/a (private.so + 0x1c66)
                                               #52 0x0000557b3ef4452d runshfunc (zsh + 0x3f52d)
                                               #53 0x0000557b3ef44eda doshfunc (zsh + 0x3feda)
                                               #54 0x0000557b3ef465b4 n/a (zsh + 0x415b4)
                                               #55 0x0000557b3ef3dc70 n/a (zsh + 0x38c70)
                                               #56 0x0000557b3ef3e2cf n/a (zsh + 0x392cf)
                                               #57 0x0000557b3ef3e714 n/a (zsh + 0x39714)
                                               #58 0x0000557b3ef40646 execlist (zsh + 0x3b646)
                                               #59 0x0000557b3ef40e3e execode (zsh + 0x3be3e)
                                               #60 0x0000557b3ef44799 runshfunc (zsh + 0x3f799)
                                               #61 0x0000557b3e7dfc66 n/a (private.so + 0x1c66)
                                               #62 0x0000557b3ef4452d runshfunc (zsh + 0x3f52d)
                                               #63 0x0000557b3ef44eda doshfunc (zsh + 0x3feda)
                                               ELF object binary architecture: AMD x86-64
Jun 10 15:31:49 yaro systemd[1]: Started Process Core Dump (PID 475385/UID 0).