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

Segfault in paramsubst() from completion (regression from 5.3.1)



Just found this:

    % autoload compinit
    % compinit
    % _f() { _arguments '1: :_files' '2: :_hosts' ':: : _normal' }
    % compdef _f f 
    % f x y <TAB>
    Process 27225 stopped
    * thread #1: tid = 27225, 0x00000000004cc3ca zsh`paramsubst(l=0x00007fffff800268, n=0x00007fffff800250, str=0x00007fffff7ff6d0, qt=1, pf_flags=4, ret_flags=0x00007fffff7ffcac) + 762 at subst.c:1770, name = 'zsh', stop reason = signal SIGSEGV: invalid address (fault address: 0x7fffff7fed68)
        frame #0: 0x00000000004cc3ca zsh`paramsubst(l=0x00007fffff800268, n=0x00007fffff800250, str=0x00007fffff7ff6d0, qt=1, pf_flags=4, ret_flags=0x00007fffff7ffcac) + 762 at subst.c:1770
       1767	     * these later on, too.
       1768	     */
       1769	    c = *s;
    -> 1770	    if (itype_end(s, IIDENT, 1) == s && *s != '#' && c != Pound &&
       1771		!IS_DASH(c) &&
       1772		c != '!' && c != '$' && c != String && c != Qstring &&
       1773		c != '?' && c != Quest &&
    (lldb) p s 
    (char *) $0 = 0x00007ffff5f171da "curcontext\xffffff9e"
    (lldb) p $0[9]
    (char) $1 = 't'
    (lldb) p $0[10]
    (char) $2 = '\x9e'
    (lldb) p $0[11]
    (char) $3 = '\0'
    (lldb) 

On 5.4.2-dev-0 compiled from git.

In 5.3.1 (Debian package) I just get:

    _tags:comptags:36: nesting level too deep
    _tags:comptags:60: nesting level too deep
    _tags:comptags:67: nesting level too deep



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