Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Segfault in getkeymapcmd

> p f->widget
error: Couldn't apply expression side effects : Couldn't dematerialize
a result variable: couldn't read its memory

> down
frame #0: 0x000000010054a6ee
zle.so`getkeymapcmd(km=0x000000010082e400, funcp=0x00007ffeefbfc980,
strp=0x00007ffeefbfc968) at zle_keymap.c:1609
   1607            /* can be patient with vi commands that need a
motion operator: *
   1608             * they wait till a key is pressed for the movement
anyway      */
-> 1609            timeout = !(!virangeflag && !region_active && f &&
f->widget &&
   1610                f->widget->flags & ZLE_VIOPER);
   1611    #ifdef MULTIBYTE_SUPPORT
   1612            if ((f == Th(z_selfinsert) || f == Th(z_selfinsertunmeta)) &&
Target 0: (zsh-5.7.1-dev-0) stopped.

> bt
* thread #1, queue = 'com.apple.main-thread', stop reason =
EXC_BAD_ACCESS (code=1, address=0x142200000059)
  * frame #0: zle.so`getkeymapcmd(km=0x0000000100806400,
funcp=0x00007ffeefbfc9a0, strp=0x00007ffeefbfc988) at
    frame #1: zle.so`getkeycmd at zle_keymap.c:1705
    frame #2: zle.so`zlecore at zle_main.c:1128
    frame #3: zle.so`zleread(lp=0x00000001000d0cb8,
rp=0x0000000000000000, flags=3, context=0, init="zle-line-init",
finish="zle-line-finish") at zle_main.c:1350
    frame #4: zle.so`zle_main_entry(cmd=1, ap=0x00007ffeefbfcf80) at
    frame #5: zsh-5.7.1-dev-0`zleentry(cmd=1) at init.c:1616
    frame #6: zsh-5.7.1-dev-0`inputline at input.c:295
    frame #7: zsh-5.7.1-dev-0`ingetc at input.c:228
    frame #8: zsh-5.7.1-dev-0`ihgetc at hist.c:408
    frame #9: zsh-5.7.1-dev-0`gettok at lex.c:611
    frame #10: zsh-5.7.1-dev-0`zshlex at lex.c:275

The setup is somewhat unminimalistic, as it installs zplugin under the
custom ZDOTDIR and loads 3 plugins, but that might not be important
thanks to the clear backtrace. The bug triggers after 3-5 tries, after

ZDOTDIR=`pwd` zsh-5.7.1-dev-0

And waiting 2-3 seconds and then pressing Enter.

Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org
# Install `zplugin` if not installed
if [[ ! -d "${ZDOTDIR:-HOME}/.zplugin" ]]; then
    sh -c "$(curl -fsSL https://raw.githubusercontent.com/zdharma/zplugin/master/doc/install.sh)"

source "${ZDOTDIR:-$HOME}/.zplugin/bin/zplugin.zsh"

zplugin ice wait'0' lucid
zplugin light zdharma/z-p-submods

zplugin ice wait'0' lucid svn submods"clvv/fasd -> external"
zplugin snippet PZT::modules/fasd

Messages sorted by: Reverse Date, Date, Thread, Author