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

Core Dump in pws-21 with strict aliasing



Under Solaris-2.5.1, using the latest pre-release of the EGCS compiler, I 
can very easily get a coredump using completion.  It takes a few tries, but 
a sequence of:

pushd new/bu<TAB>/<TAB>
popd
pushd new/bu<TAB>/<TAB>
popd
...

(perhaps with a few typos thrown in)
will crash the shell.  This crash does not happen with egcs-1.1.2.
Among the major differences between the versions of the compiler is
that strict aliasing is now turned on by default.  [Those of you who
follow egcs development will understand why this issue is very much on 
my mind.]  I will attempt to reproduce the problem after turning off
strict aliasing, but I suspect that this coredump was caused by strict
aliasing.  I'll investigate further, but for now here's a backtrace:
[The crash occurs with zsh -f, BTW].



gdb /u/shelton/new/zsh-3.1.5-pws-21/bin/zsh core
GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "sparc-sun-solaris2.5.1"...
Core was generated by `/u/shelton/new/zsh-3.1.5-pws-21/bin/zsh -f'.
Program terminated with signal 10, Bus Error.
Reading symbols from /usr/lib/libsocket.so.1...done.
Reading symbols from /usr/lib/libnsl.so.1...done.
Reading symbols from /usr/lib/libc.so.1...done.
Reading symbols from /usr/lib/libdl.so.1...done.
Reading symbols from /usr/lib/libintl.so.1...done.
Reading symbols from /usr/lib/libmp.so.1...done.
Reading symbols from /usr/lib/libw.so.1...done.
#0  malloc (size=12) at ../../../../src/zsh-3.1.5-pws-21/Src/mem.c:690
690                 m->free = sh->next;
(gdb) bt
#0  malloc (size=12) at ../../../../src/zsh-3.1.5-pws-21/Src/mem.c:690
#1  0x434cc in zalloc (size=753320) at ../../../../src/zsh-3.1.5-pws-21/Src/mem.c:416
#2  0x43614 in ztrdup (s=0xb6708 "new/bunew/") at ../../../../src/zsh-3.1.5-pws-21/Src/mem.c:493
#3  0x80c68 in dupmatch (m=0xb6810) at ../../../../../src/zsh-3.1.5-pws-21/Src/Zle/zle_tricky.c:6830
#4  0x80ed8 in permmatches () at ../../../../../src/zsh-3.1.5-pws-21/Src/Zle/zle_tricky.c:6907
#5  0x7bb54 in makecomplist (s=0xb65ec "new/build/", incmd=0, lst=0)
    at ../../../../../src/zsh-3.1.5-pws-21/Src/Zle/zle_tricky.c:4813
#6  0x7a708 in docompletion (s=0xb7fa8 "new/build/", lst=0, incmd=0)
    at ../../../../../src/zsh-3.1.5-pws-21/Src/Zle/zle_tricky.c:4338
#7  0x731f0 in docomplete (lst=0) at ../../../../../src/zsh-3.1.5-pws-21/Src/Zle/zle_tricky.c:1052
#8  0x71b08 in expandorcomplete () at ../../../../../src/zsh-3.1.5-pws-21/Src/Zle/zle_tricky.c:477
#9  0x69c84 in execzlefunc (func=0xa6e00) at ../../../../../src/zsh-3.1.5-pws-21/Src/Zle/zle_main.c:626
#10 0x6998c in zleread (
    lp=0xb1800 "\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â\005Â", rp=0xeffff500 "", flags=1) at ../../../../../src/zsh-3.1.5-pws-21/Src/Zle/zle_main.c:543
#11 0x39480 in inputline () at ../../../../src/zsh-3.1.5-pws-21/Src/input.c:263
#12 0x39340 in ingetc () at ../../../../src/zsh-3.1.5-pws-21/Src/input.c:208
#13 0x33ec4 in hgetc () at ../../../../src/zsh-3.1.5-pws-21/Src/hist.c:223
#14 0x3d554 in gettok () at ../../../../src/zsh-3.1.5-pws-21/Src/lex.c:526
#15 0x3ce1c in yylex () at ../../../../src/zsh-3.1.5-pws-21/Src/lex.c:289
#16 0x4a538 in parse_event () at ../../../../src/zsh-3.1.5-pws-21/Src/parse.c:99
#17 0x37850 in loop (toplevel=1, justonce=0) at ../../../../src/zsh-3.1.5-pws-21/Src/init.c:100
#18 0x1bc4c in main (argc=2, argv=0x1) at ../../../../src/zsh-3.1.5-pws-21/Src/main.c:89
(gdb) q


vin shelton



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