Closed jbeich closed 4 years ago
This is the test:
set x=(aa bb aa bb)
echo $x:gas/a/c/:gs/b/d/
foreach i ( "$x:gas/a/c/:q" )
echo $i
end
echo $x:gas/a/q/:gs/b/w/:s/b/e/
echo $x:gas/a/q/:gs/b/w/:s/b/e/:gas/q/Q/
exit 0
The first a
flag gets stuck?
125. lexical.at:630: testing :gas work as described in the man pages ...
./lexical.at:643: tcsh -f gas.csh
--- - 2020-05-21 22:38:52.571182000 +0300
+++ /home/kim/src/tcsh/testsuite.dir/at-groups/125/stdout 2020-05-21 22:38:52.570335000 +0300
@@ -1,5 +1,5 @@
cc db cc db
cc bb cc bb
-qq we qq wb
-QQ we QQ wb
+qq ww qq ww
+QQ ww QQ ww
125. lexical.at:630: 125. :gas work as described in the man pages (lexical.at:630): FAILED (lexical.at:643)
Test succeeds on amd64.
could this be a compiler issue? compile without optimization?
Test succeeds on amd64.
If you pass -m32
it doesn't. ;)
could this be a compiler issue?
Affects at least Clang 8.0.1, 10.0.0, GCC 4.2.1 (patched), 9.3.0.
compile without optimization?
Passing CFLAGS=-O0
doesn't help.
Ok, it could be something else then; let me play with it some more on my side.
On the other topic we should fix all the tests to handle symlinks better.
Also fails on NetBSD/i386 (9.0_STABLE).
And also fails on NetBSD/amd64 (9.99.56 / 2020-04-14 09:21 EEST):
env CC='cc -m32' ./configure
I've kinda looked over it and I don't get it. I can try -m32 and see what's up.
Mmm... it's fine with -m32 on centos with gcc 4.8.5, I'm guessing it's a *BSD-i386 thing then?
I've got a qemu going, it seems realloc is doing some strange things and ending up setting RMAGIC on dolaflags[1] when realloc'ing to size 3. There's that line with op->ov_rmagic = RMAGIC
that writes out that value; after returning from xrealloc, that's the value that's there instead of a 0. (and then my VM crashed)
On Ubuntu 16.04 with env CFLAGS=-m32 ./configure
all is good. (We will soon have this in Travis CI -- see #26.)
On Ubuntu 18.04 with env CFLAGS=-m32 ./configure
the test crashes in the last expansion:
glenmorangie:~/src/tcsh> ./tcsh -f testsuite.dir/125/gas.csh
cc db cc db
cc bb cc bb
qq we qq wb
Abort
Exit 134
But the results for the previous lines are correct.
Tried with both clang
and gcc
on Ubuntu 18.04.
glenmorangie:~/src/tcsh> clang -m32 --version
clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
Target: i386-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
glenmorangie:~/src/tcsh> gcc -m32 --version
gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
How stupid of me, in sh.dol.c the two xrealloc lines growing or shrinking dolaflags and dolmcnts should read xrealloc(..., ndolflags * sizeof(int))
(emphasis on * sizeof(int)
. With that change, the test passes on FreeBSD 12.0-RELEASE and CC="gcc -m32"
, gcc being 9.3.0. I can put together a merge request for that. I have no idea why it was working on amd64
Affects at least 11.3-RELEASE, 12.1-RELEASE and 13.0-CURRENT.