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

Re: segfaults in 4.0.2



> Doesn't for me, neither in 4.0.1 nor in the current 4.1.x CVS snapshot (I
> don't have an actual 4.0.2 handy).
> 
> Can you provide more details?

Yes.  It doesn't happen with -f.
I can reproduce it this way:

zsh -f
autoload -U promptinit ; promptinit
prompt ${${(z):-adam1 adam2 bigfade clint elite2}[RANDOM%5]}
coproc || echo test

Of the prompts I tried, only ``bart'' didn't facilitate a segfault.
I can't narrow down what the prompts do as causative.

Here's a backtrace:

#0  0x4011b31f in strlen () from /lib/libc.so.6
#1  0x80b0dda in taddstr (s=0x5cdabea8 <Address 0x5cdabea8 out of bounds>)
    at text.c:60
#2  0x80b156e in gettext2 (state=0xbffffcac) at text.c:322
#3  0x80b10bd in getjobtext (prog=0x40016168, c=0x40016188) at text.c:160
#4  0x8078ae2 in loop (toplevel=1, justonce=0) at init.c:153
#5  0x807b582 in zsh_main (argc=1, argv=0xbffffdcc) at init.c:1214
#6  0x8051826 in main (argc=1, argv=0xbffffdcc) at ./main.c:37



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