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

sigsegv bug in 3.1.4.



I noticed a bug in the latest beta version. It's easy to reproduce and
should be rather easy to fix. I didn't try myself, since I am familiar
with the zsh code.

Reproduce it:

	unset LC_CTYPE
	export LC_CTYPE

This results in a sigsev:

Program received signal SIGSEGV, Segmentation fault.
0x807e59e in mkenvstr (name=0x80a1b4c "LC_CTYPE", value=0x0) at
params.c:2075
2075             *s && (*s++ != Meta || *s++ != 32); len_value++);
(gdb) bt
#0  0x807e59e in mkenvstr (name=0x80a1b4c "LC_CTYPE", value=0x0)
    at params.c:2075
#1  0x807e72e in addenv (name=0x80a1b4c "LC_CTYPE", value=0x0) at
#params.c:2114
#2  0x8052a66 in bin_typeset (name=0x80a19f4 "export", argv=0x80a1c80,
    ops=0xbffff748 "", func=21) at builtin.c:1590
#3  0x804fc77 in execbuiltin (args=0x80a1b28, bn=0x8097334) at
#builtin.c:352
#4  0x805d097 in execcmd (cmd=0x80a1b08, input=0, output=0, how=2,
#last1=2)
    at exec.c:1806
#5  0x805a972 in execpline2 (pline=0x80a1c5c, how=2, input=0,
#output=0,
    last1=0) at exec.c:902
#6  0x805a2be in execpline (l=0x80a1af4, how=2, last1=0) at exec.c:747
#7  0x8059f73 in execlist (list=0x80a1c6c, dont_change_job=0,
#exiting=0)
    at exec.c:627

The reason is of course that the value is NULL.

-- 
David Hedbor



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