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

zsh 4.0.2 (and 4.0.1) on IRIX 6.5 but not 6.3 segfaults on, eg, setopt



I am not a subscriber to this list.

This happens only on IRIX 6.5, not on IRIX 6.3 (however, the system compiler
on the 6.3 machine is older than that on the 6.5 machine). The 6.5 machine
is a 195MHz IP30 (R10000 Octane). I configured with "CC=cc ./configure
--prefix=/cs", made it, and then did a make check, and zsh crashed on every
test. It also segfaults when loading my startup files, but *not* when
started with "-f". This does not happen if I do a configure without the
CC=cc, which results in it using gcc egcs-2.91.66 19990314 (egcs-1.1.2
release). The version of the system cc installed is MIPSpro 7.3.1.2m. I did
"ZTST_verbose=1 gmake check TESTNUM=A01", and got the following output:

cd Test ; gmake check
/cs/src/zsh/zsh-4.0.2/Test
gmake[1]: Entering directory `/cs/src/zsh/zsh-4.0.2/Test'
if test -n "cc"; then \
  cd .. && \
  gmake MODDIR=`pwd`/Test/Modules install.modules > /dev/null; \
fi
mkdir /cs/src/zsh/zsh-4.0.2/Test/Modules
mkdir /cs/src/zsh/zsh-4.0.2/Test/Modules/zsh
for f in ./A01*.ztst; do \
  ../Src/zsh +Z -f ./ztst.zsh $f; \
done
zsh/main
/bin/sh: 55332 Memory fault
gmake[1]: [check] Error 139 (ignored)
rm -rf Modules .zcompdump
gmake[1]: Leaving directory `/cs/src/zsh/zsh-4.0.2/Test'

I then attempted to run through the test manually:

tsm@z /cs/src/zsh/zsh-4.0.2 -> gmake MODDIR=`pwd`/Test/Modules install.modules > /dev/null
mkdir /cs/src/zsh/zsh-4.0.2/Test/Modules
mkdir /cs/src/zsh/zsh-4.0.2/Test/Modules/zsh
tsm@z /cs/src/zsh/zsh-4.0.2 -> cd Test
tsm@z /cs/src/zsh/zsh-4.0.2/Test -> ../Src/zsh +Z -f
z% : ${ZTST_verbose:=1}
z% emulate -R zsh
z% [[ -n $LC_ALL ]] && LC_ALL=C
z% [[ -n $LC_COLLATE ]] && LC_COLLATE=C
z% [[ -n $LANG ]] && LANG=C
z% [[ -d Modules/zsh ]] && module_path=( $PWD/Modules )
z% zmodload -i zsh/parameter
zsh/main
z% ZTST_testopts=(${(kv)options})
z% echo $ZTST_testopts
z% setopt extendedglob nonomatch
zsh: 62058 segmentation fault  ../Src/zsh +Z -f

Running dbx and doing that again, it turns out zsh is built stripped, so I
manually relinked it without the -s, went through the steps again, and got:

z% setopt extendedglob nonomatch
Process 61793 (zsh) stopped on signal SIGSEGV: Segmentation violation (default) at [optlookup:576 +0x8,0x10050b88]
 576  s = t = dupstring(name);
(dbx) file
/cs/src/zsh/zsh-4.0.2/Src/options.c

Unfortunately there's no debugging information, so I distcleaned and
reconfigured with the additional option --enable-zsh-debug, and then ran
through the steps above, with different behavior starting here:

z% zmodload -i zsh/parameter
zsh: invalid module name `'
z% ZTST_testopts=(${(kv)options})
z% setopt extendedglob nonomatch
setopt: no such option: 

So it doesn't crash at the same place, but it's not working right either. I
compiled without --enable-zsh-debug again, and looked for warning or error
messages on compiling options.c, but didn't see any. However, I did see a
number of suspicious warnings or the form:

cc-1999 cc: WARNING File = compmatch.c, Line = 553
  "jumping out of a block containing VLAs" is not currently implemented

for compmatch.c on 553, 571, 590, 599, etc., also compresult.c 1442, 1469,
1558, ..., computil.c 3326, 3342, 3366, ..., and zle_tricky.c 2031, 2045,
2059, .... In the man page, vla refers to variable length arrays; I can't
turn up any additional references to vla.

If I compile just options.c without -O, rm zsh and remake, all the tests
yield this output:

zsh/main
./ztst.zsh:setopt:44: no such option: 
./ztst.zsh:94: no matches found: *.tmp
/bin/sh: 74785 Memory fault

   Tim



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