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

[BUG] Another alias-related crash



Oh, i found the original issue i said i was looking for in workers/43508. We're
pressing Return after each line here:

  # OK
  % unalias grep
  % echo $(( $(echo x | grep . ))
  cmdsubst> ^C

  # Crash
  % alias grep='grep --color=auto'
  % echo $(( $(echo x | grep . ))
  zsh: segmentation fault

It seems like ZLE is required to make this happen, but i don't think completion
is necessary this time. As before, i replicated on 5.4.2 (Linux) and master
(macOS).

input_hasalias() was introduced in workers/40306.

Back-trace from 5.4.2:

#0  input_hasalias () at ../../Src/input.c:696
        flags = <optimized out>
        instackptr = 0x55b509ad30a8
#1  0x000055b508572b11 in par_simple (nr=0, cmplx=0x7ffdea7ca1c4) at ../../Src/parse.c:1777
        isnull = 1
        p = <optimized out>
        isfunc = 0
        sr = 0
        nrediradd = <optimized out>
        r = 32521
        argc = 0
        oecused = 3
        c = 0
        assignments = 0
        ppost = 0
        is_typeset = 0
        hasalias = <optimized out>
        postassigns = <optimized out>
        oecused = <optimized out>
        isnull = <optimized out>
        r = <optimized out>
        argc = <optimized out>
        p = <optimized out>
        isfunc = <optimized out>
        sr = <optimized out>
        c = <optimized out>
        nrediradd = <optimized out>
        assignments = <optimized out>
        ppost = <optimized out>
        is_typeset = <optimized out>
        hasalias = <optimized out>
        postassigns = <optimized out>
        ptr = <optimized out>
        name = <optimized out>
        str = <optimized out>
        oldcmdpos = <optimized out>
        n = <optimized out>
        type2 = <optimized out>
        redir_var = <optimized out>
        eptr = <optimized out>
        ptr = <optimized out>
        toksave = <optimized out>
        idstring = <optimized out>
        ptr = <optimized out>
        name = <optimized out>
        str = <optimized out>
        n = <optimized out>
        parr = <optimized out>
        oldlineno = <optimized out>
        onp = <optimized out>
        so = <optimized out>
        oecssub = <optimized out>
        c = <optimized out>
        ll = <optimized out>
        sl = <optimized out>
        c = <optimized out>
        parg = <optimized out>
#2  par_cmd (cmplx=cmplx@entry=0x7ffdea7ca1c4, zsh_construct=zsh_construct@entry=0) at ../../Src/parse.c:1011
        sr = <optimized out>
        r = 3
        nr = 0
#3  0x000055b50857417c in par_pline (cmplx=cmplx@entry=0x7ffdea7ca1c4) at ../../Src/parse.c:858
        p = 2
        line = 2
#4  0x000055b508574389 in par_sublist2 (cmplx=cmplx@entry=0x7ffdea7ca1c4) at ../../Src/parse.c:839
        f = 0

dana



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