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

zsh crash on assignment to $options



I got this on after

typeset -A __opts
__opts=${(kv)options}
echo ${options[shwordsplit]}
emulate -R sh
echo ${options[shwordsplit]}
options=$__opts

Stack trace:

(gdb) bt
#0  0x08098427 in setstrvalue (v=0xbfbf1fbc,
    val=0x9028050 "autolist on printexitvalue off kshzerosubscript off 
histreduceblanks off chaselinks off extendedglob off histnostore off 
automenu on globcomplete off unset on listpacked off promptsubst off 
shwordspli"...)
    at params.c:2273
#1  0x0809cf1a in assignsparam (s=0xb80b82cb "",
    val=0x9028050 "autolist on printexitvalue off kshzerosubscript off 
histreduceblanks off chaselinks off extendedglob off histnostore off 
automenu on globcomplete off unset on listpacked off promptsubst off 
shwordspli"...,
    flags=<value optimized out>) at params.c:2617
#2  0x08065c26 in addvars (state=0xbfbf211c, pc=<value optimized out>,
    addflags=<value optimized out>) at exec.c:2112
#3  0x08065e7b in execsimple (state=0xbfbf211c) at exec.c:1002
#4  0x0806c426 in execlist (state=0xbfbf211c, dont_change_job=0, 
exiting=0)
    at exec.c:1112
#5  0x0806cb1e in execode (p=0xb80b8280, dont_change_job=0, exiting=0)
    at exec.c:975
#6  0x0807e08c in loop (toplevel=1, justonce=0) at init.c:181
#7  0x0807f726 in zsh_main (argc=2, argv=0xbfbf2224) at init.c:1406
#8  0x08052a8f in main (argc=0, argv=0x9025050) at ./main.c:93


Using ${(kv)__opts[*]} works (and above is likely an error) still shell 
probably should not react that badly to simple user error.

Attachment: signature.asc
Description: This is a digitally signed message part.



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