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

Re: zsh 4.3.4 released



On 23/04/07, Peter Stephenson <pws@xxxxxxx> wrote:
"Mikael Magnusson" wrote:
> (gdb) print tindent
> $12 = -2

Thanks.  This is the problem; tindent should never be less than zero.
I'm not sure why I'm not seeing it; it might suggest the structure with
the function in it is already corrupt at the point where you run
"which".

The following patch should stop the crash (so it's probably worth
having) and report at the point where it first becomes confused, though
it doesn't address the underlying problem.

With latest cvs, it still crashes, but differently.

Program received signal SIGSEGV, Segmentation fault.
0xa7dc90cc in memcpy () from /lib/libc.so.6
(gdb) bt
#0  0xa7dc90cc in memcpy () from /lib/libc.so.6
#1  0x080d0e1b in taddstr (s=0x80e4c4a "esac") at text.c:81
#2  0x080d1e19 in gettext2 (state=0xaf8659c0) at text.c:594
#3  0x080d0f9e in getpermtext (prog=0x8115538, c=0x8116a64) at text.c:141
#4  0x08081057 in printshfuncnode (hn=0x8115560, printflags=32) at
hashtable.c:889
#5  0x080619f7 in bin_whence (nam=0xa7f362a0 "which", argv=0xaf865c50,
ops=0xaf865ca0, func=0)
   at builtin.c:3050
#6  0x080536bd in execbuiltin (args=0xa7f36278, bn=0x80e73a8) at builtin.c:438
#7  0x0807496c in execcmd (state=0xaf866080, input=0, output=0,
how=18, last1=2) at exec.c:2670
#8  0x08070cd1 in execpline2 (state=0xaf866080, pcode=195, how=18,
input=0, output=0, last1=0)
   at exec.c:1343
#9  0x0806fc28 in execpline (state=0xaf866080, slcode=4098, how=18,
last1=0) at exec.c:1129
#10 0x0806f355 in execlist (state=0xaf866080, dont_change_job=0,
exiting=0) at exec.c:935
#11 0x0806ef63 in execode (p=0xa7f36220, dont_change_job=0, exiting=0)
at exec.c:793
#12 0x0808996c in loop (toplevel=1, justonce=0) at init.c:180
#13 0x0808c470 in zsh_main (argc=2, argv=0xaf8661b4) at init.c:1347
#14 0x08052d12 in main (argc=2, argv=0xaf8661b4) at ./main.c:93
(gdb) frame 1
#1  0x080d0e1b in taddstr (s=0x80e4c4a "esac") at text.c:81
81		memcpy(tptr, s, sl);
(gdb) print tptr
$1 = 0x1ffffff <Address 0x1ffffff out of bounds>
(gdb) print s
$2 = 0x80e4c4a "esac"
(gdb) print sl
$3 = 4
(gdb) print tbuf
$4 = 0x0
(gdb) print tlim
$5 = 0x4000000 <Address 0x4000000 out of bounds>
(gdb) print tsiz
$6 = 67108864
(gdb) print tindent
$7 = 0
(gdb) print tnewlins
$8 = 1

Don't know if it would help but here's the zwc file too,
http://mikachu.ath.cx/dot-zshurxvt.zwc

--
Mikael Magnusson



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