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

Re: [bug report] 4.0.2 / 4.0.4 dumps core



On Nov 12, 11:39am, Akitoshi MORISHIMA wrote:
}
} Condition:
} 	put only the following line
} 
} 	setopt extendedglob globcomplete
} 
} 	in .zshrc, and inactivate(remove) every other startup files,
} 	and invoke zsh
} 
} Type:
} 	!^ then [TAB]
} 
} then zsh dumps core...
} 
} I guess "!^" accesses to "previous command line", which is expectd to
} be always present even without history-related settings, but this
} isn't true in this "special" case...

This is a mis-diagnosis.

Zsh is attempting to complete reserved words (in this case, the word "!").
The reswords table contains static strings, but the completion code tries
to poke '\0' byte in at the end of the word, resulting in a segfault on any
platform where static strings aren't writable.

The combination of extendedglob and globcomplete (which makes "^" mean
something), plus lack of history, tickles the bug, but is not the reason
for it:

schaefer[524] Src/zsh -f
zagzig% setopt extendedglob globcomplete nobanghist
zagzig% !^<TAB>zsh: segmentation fault (core dumped)  Src/zsh -f


-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



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