Here are the test results on my box.
Test Run By mtodorov on 2007-02-13 22:15:43 Native configuration is i686-pc-linux-gnu (domac) gpc 20060325, based on gcc-4.1.1, flags: -g -O3 -W -Wall -Wno-unused TEST agettext2test.pas: SKIPPED: could not set locale `de_DE' TEST aregextest.pas: SKIPPED: librx not installed TEST backtracerr.pas: 14c14,71 < ./test_run: line 339: 20465 Killed ./"$A_OUT" "$1" ---
c: about to a(yy) a: about to xx() c: about to a(yy) a: about to xx() c: about to a(yy) a: about to xx() c: about to a(yy) a: about to xx() c: about to a(yy) a: about to xx() c: about to a(yy) a: about to xx() c: about to a(yy) a: about to xx() c: about to a(yy) a: about to xx() c: about to a(yy) a: about to xx() c: about to a(yy) a: about to xx() c: about to a(yy) a: about to xx()
d: a: back from xx() c: back from a(yy) a: back from xx() c: back from a(yy) a: back from xx() c: back from a(yy) a: back from xx() c: back from a(yy) a: back from xx() c: back from a(yy) a: back from xx() c: back from a(yy) a: back from xx() c: back from a(yy) a: back from xx() c: back from a(yy) a: back from xx() c: back from a(yy) a: back from xx() c: back from a(yy) a: back from xx() c: back from a(yy) b: back from yy b: back from b(c) b: back from b(c) b: back from b(c) b: back from b(c) b: back from b(c) b: back from b(c) b: back from b(c) b: back from b(c) b: back from b(c) b: back from b(c) b: back from b(c) program: back from b( d )
failed TEST fay.pas: 1c1,12 < ./test_run: line 339: 420 Killed ./"$A_OUT" "$1" ---
stacking 1 Doing successors of 1 stacking 2 Doing successors of 2 Now checking if 2 is an SCC root Now checking if 1 is an SCC root 1 is an SCC root; SP= 2 T= 1 Yield SCC should pass 1 out to TakeUSCC YieldUSCC passes 1 to TakeUSCC TakeUSCC receives V= 1 from YieldUSCC The SCC's constituents are: 2 1
failed TEST fjf165a.pas: SKIPPED: German locale not installed TEST fjf206c.pas: failed: ./fjf206c.pas:2: error: arithmetical overflow ./fjf206c.pas:2: error: constant overflow in expression
TEST fjf322.pas: 'result_0.length./fjf322.pas: In function `o': gpc1: warnings being treated as errors ./fjf322.pas:8: warning: ' is used uninitialized in this function failed TEST fjf35.pas: ./test_run: line 339: 16467 Killed ./"$A_OUT" "$1" TEST fjf395a.pas: a Value 2 TEST fjf395b.pas: a Value -128 TEST fjf403b.pas: failed: failed
TEST fjf563e.pas: failed: failed
TEST fjf587b.pas: 'concat_0._p_Schema_[3]{lb: 1 sz: 1}./fjf587b.pas: In procedure `Foo': gpc1: warnings being treated as errors ./fjf587b.pas:5: warning: ' is used uninitialized in this function failed TEST fjf779a.pas: failed: TEST fjf779b.pas: failed: TEST fjf779e.pas: failed: TEST fjf779f.pas: failed: TEST fjf779g.pas: failed: TEST fproc.pas: 4c4,11 < Stack frame: 0 formal print =./test_run: line 339: 1897 Killed ./"$A_OUT" "$1" ---
Stack frame: 0 formal print = 4 formal routine = 4 Stack frame: 1 formal print = 4 formal routine = 4 Stack frame: 2 formal print = 4 formal routine = 4 Stack frame: 3 formal print = 4 formal routine = 4 Stack frame: 4 formal print = non-local jump Stack frame: 8 formal print = -1 formal routine = -1 Stack frame: 9 formal print = -1 formal routine = -1 Stack frame: 10 formal print = -1 formal routine = -1
failed TEST gmptest.pas: SKIPPED: libgmp (>=3.x) not installed TEST knuth1.pas: ./test_run: line 339: 175 Killed ./"$A_OUT" "$1" TEST nicola4c.pas: failed: TEST nlgpp.pas: ./test_run: line 339: 21147 Killed ./"$A_OUT" "$1" TEST nlgpp2.pas: 13c13,30 < ./test_run: line 339: 12038 Killed ./"$A_OUT" "$1" ---
DoGoto 3 True OK Recursive end 3 True Recursive before goto 4 True Recursive end 4 True Recursive before goto 5 True Recursive end 5 True Recursive before goto 6 True Recursive end 6 True Recursive before goto 7 True Recursive end 7 True Recursive before goto 8 True Recursive end 8 True Recursive before goto 9 True Recursive end 9 True Recursive before goto 10 True Recursive end 10 True Main end
failed TEST t6334-2.pas: ./test_run: line 339: 27049 Killed ./"$A_OUT" "$1" TEST t6p6p3p4.pas: ./test_run: line 339: 7676 Killed ./"$A_OUT" "$1"
# of tests 5070 # of expected passes 5044 # of unexpected failures 22 # of unsupported tests 4
Mirsad
"Be conservative in what you do, be liberal in what you accept from others." -- Jon Postel
Mirsad Todorovac wrote:
Here are the test results on my box.
Test Run By mtodorov on 2007-02-13 22:15:43 Native configuration is i686-pc-linux-gnu (domac) gpc 20060325, based on gcc-4.1.1, flags: -g -O3 -W -Wall -Wno-unused TEST agettext2test.pas: SKIPPED: could not set locale `de_DE' TEST aregextest.pas: SKIPPED: librx not installed TEST backtracerr.pas: 14c14,71 < ./test_run: line 339: 20465 Killed ./"$A_OUT" "$1"
<snip>
failed TEST fay.pas: 1c1,12
< ./test_run: line 339: 420 Killed ./"$A_OUT" "$1"
<snip>
failed TEST fjf165a.pas: SKIPPED: German locale not installed TEST fjf206c.pas: failed: ./fjf206c.pas:2: error: arithmetical overflow ./fjf206c.pas:2: error: constant overflow in expression
TEST fjf322.pas: 'result_0.length./fjf322.pas: In function `o': gpc1: warnings being treated as errors ./fjf322.pas:8: warning: ' is used uninitialized in this function failed TEST fjf35.pas: ./test_run: line 339: 16467 Killed ./"$A_OUT" "$1" TEST fjf395a.pas: a Value 2 TEST fjf395b.pas: a Value -128 TEST fjf403b.pas: failed: failed
TEST fjf563e.pas: failed: failed
TEST fjf587b.pas: 'concat_0._p_Schema_[3]{lb: 1 sz: 1}./fjf587b.pas: In procedure `Foo': gpc1: warnings being treated as errors ./fjf587b.pas:5: warning: ' is used uninitialized in this function failed TEST fjf779a.pas: failed: TEST fjf779b.pas: failed: TEST fjf779e.pas: failed: TEST fjf779f.pas: failed: TEST fjf779g.pas: failed: TEST fproc.pas: 4c4,11 < Stack frame: 0 formal print =./test_run: line 339: 1897 Killed ./"$A_OUT" "$1"
<snip>
failed TEST gmptest.pas: SKIPPED: libgmp (>=3.x) not installed TEST knuth1.pas: ./test_run: line 339: 175 Killed ./"$A_OUT" "$1" TEST nicola4c.pas: failed: TEST nlgpp.pas: ./test_run: line 339: 21147 Killed ./"$A_OUT" "$1" TEST nlgpp2.pas: 13c13,30 < ./test_run: line 339: 12038 Killed ./"$A_OUT" "$1"
<snip>
TEST t6334-2.pas: ./test_run: line 339: 27049 Killed ./"$A_OUT" "$1" TEST t6p6p3p4.pas: ./test_run: line 339: 7676 Killed ./"$A_OUT" "$1"
That looks bad. The 'Killed' messages shows that you have serious problem with nonlocal gotos. That is strange, as nonlocal gotos worked fine for me and other folks. Are you sure that you correctly applied patches? Also, is it fresh build (just after patching) or you patched failed build and re-run make?
[cut]
TEST fjf779b.pas: failed: TEST fjf779e.pas: failed: TEST fjf779f.pas: failed: TEST fjf779g.pas: failed: TEST fproc.pas: 4c4,11 < Stack frame: 0 formal print =./test_run: line 339: 1897 Killed ./"$A_OUT" "$1"
<snip> > failed > TEST gmptest.pas: SKIPPED: libgmp (>=3.x) not installed > TEST knuth1.pas: ./test_run: line 339: 175 Killed ./"$A_OUT" "$1" > TEST nicola4c.pas: failed: > TEST nlgpp.pas: ./test_run: line 339: 21147 Killed ./"$A_OUT" "$1" > TEST nlgpp2.pas: 13c13,30 > < ./test_run: line 339: 12038 Killed ./"$A_OUT" "$1" <snip> > TEST t6334-2.pas: ./test_run: line 339: 27049 Killed ./"$A_OUT" "$1" > TEST t6p6p3p4.pas: ./test_run: line 339: 7676 Killed ./"$A_OUT" "$1" >
That looks bad. The 'Killed' messages shows that you have serious problem with nonlocal gotos. That is strange, as nonlocal gotos worked fine for me and other folks. Are you sure that you correctly applied patches? Also, is it fresh build (just after patching) or you patched failed build and re-run make?
It is a fresh build. I have completely re-done unapcking archive gcc, then gpc, then both patches.
But I do have a PAX-extended kernel, though. Maybe nonlocal gotos hurt that. I will try to bypass PAX and redo some tests.
Mirsad
Mirsad Todorovac wrote:
Here are the test results on my box.
Test Run By mtodorov on 2007-02-13 22:15:43 Native configuration is i686-pc-linux-gnu (domac) gpc 20060325, based on gcc-4.1.1, flags: -g -O3 -W -Wall -Wno-unused TEST agettext2test.pas: SKIPPED: could not set locale `de_DE' TEST aregextest.pas: SKIPPED: librx not installed TEST backtracerr.pas: 14c14,71 < ./test_run: line 339: 20465 Killed ./"$A_OUT" "$1"
<snip> > failed > TEST fay.pas: 1c1,12 > < ./test_run: line 339: 420 Killed ./"$A_OUT" "$1" > --- <snip> > failed > TEST fjf165a.pas: SKIPPED: German locale not installed > TEST fjf206c.pas: failed: ./fjf206c.pas:2: error: arithmetical overflow > ./fjf206c.pas:2: error: constant overflow in expression > > TEST fjf322.pas: 'result_0.length./fjf322.pas: In function `o': > gpc1: warnings being treated as errors > ./fjf322.pas:8: warning: ' is used uninitialized in this function > failed > TEST fjf35.pas: ./test_run: line 339: 16467 Killed ./"$A_OUT" "$1" > TEST fjf395a.pas: a Value 2 > TEST fjf395b.pas: a Value -128 > TEST fjf403b.pas: failed: failed > > TEST fjf563e.pas: failed: failed > > TEST fjf587b.pas: 'concat_0._p_Schema_[3]{lb: 1 sz: 1}./fjf587b.pas: In procedure `Foo': > gpc1: warnings being treated as errors > ./fjf587b.pas:5: warning: ' is used uninitialized in this function > failed > TEST fjf779a.pas: failed: > TEST fjf779b.pas: failed: > TEST fjf779e.pas: failed: > TEST fjf779f.pas: failed: > TEST fjf779g.pas: failed: > TEST fproc.pas: 4c4,11 > < Stack frame: 0 formal print =./test_run: line 339: 1897 Killed ./"$A_OUT" "$1" <snip> > failed > TEST gmptest.pas: SKIPPED: libgmp (>=3.x) not installed > TEST knuth1.pas: ./test_run: line 339: 175 Killed ./"$A_OUT" "$1" > TEST nicola4c.pas: failed: > TEST nlgpp.pas: ./test_run: line 339: 21147 Killed ./"$A_OUT" "$1" > TEST nlgpp2.pas: 13c13,30 > < ./test_run: line 339: 12038 Killed ./"$A_OUT" "$1" <snip> > TEST t6334-2.pas: ./test_run: line 339: 27049 Killed ./"$A_OUT" "$1" > TEST t6p6p3p4.pas: ./test_run: line 339: 7676 Killed ./"$A_OUT" "$1" >
That looks bad. The 'Killed' messages shows that you have serious problem with nonlocal gotos. That is strange, as nonlocal gotos worked fine for me and other folks. Are you sure that you correctly applied patches? Also, is it fresh build (just after patching) or you patched failed build and re-run make?
I have rerun tests, and I've run /sbin/chpax -pemrxs a.out after each compile, but clumsy, since it is hard for me to modify test_run code.
I used gpc wrapper shell script, but I did it clumsy as I said and created some "a.out: No such file or directory" errors.
BUT THE GOOD NEWS is that there are no longer "Killed" error messages, so I think we've found the murderer: it was Linux's PAX kernel extension!
chpax has following options, so you will see why it could have affected nonlocal gotos:
------------------------------------------------------------------ mtodorov@domac:~/pascal/gcc-4.1.1/gcc/p/test$ /sbin/chpax -v /sbin/chpax 0.7 .::. Manage PaX flags for binaries Usage: /sbin/chpax OPTIONS FILE1 FILE2 FILEN ... -P enforce paging based non-executable pages -p do not enforce paging based non-executable pages -E emulate trampolines -e do not emulate trampolines -M restrict mprotect() -m do not restrict mprotect() -R randomize mmap() base [ELF only] -r do not randomize mmap() base [ELF only] -X randomize ET_EXEC base [ELF only] -x do not randomize ET_EXEC base [ELF only] -S enforce segmentation based non-executable pages -s do not enforce segmentation based non-executable pages -v view current flag mask -z zero flag mask (next flags still apply)
The flags only have effect when running the patched Linux kernel. mtodorov@domac:~/pascal/gcc-4.1.1/gcc/p/test$ --------------------------------------------------------------------
The wrapper is simplistic, it still does something wrong. It does not work in all cases, and I can investigate, but I believe Frank will know immediatelly the solution, provided he has enough time ... The wrapper:
p/test/gpc: ------------------------------------------------- #/bin/bash -f
/usr/local/bin/gpc $*
if [ -x a.out ]; then /sbin/chpax -pemrxs a.out fi -------------------------------------------------
This far we have located fault on PAX process killer, so I think the further work is the question whether to allow post-processing command to be executed in test_run script in a general manner, so chpax could be safely executed whenever $PC is.
I am waiting for further instructions. I saw some warnings about number of parms in format not matching parameter list, so I could concentrate on those.
Regards, Mirsad
Mirsad Todorovac wrote:
BUT THE GOOD NEWS is that there are no longer "Killed" error messages, so I think we've found the murderer: it was Linux's PAX kernel extension!
chpax has following options, so you will see why it could have affected nonlocal gotos:
-E emulate trampolines -e do not emulate trampolines -M restrict mprotect() -m do not restrict mprotect()
I wrote previously about nonlocal gotos. But now I think that the problem is with trampolines (problems with nonlocal gotos and trampolines are frequently related). Description of PAX extension makes clear that by default trampolines do not work if the extension is active, and the affected tests use trampolines. On other (non-Linux) platforms the compiler emits 'mprotect' calls to allows trampolines to work (on Linux trampolines are supposed to work even without 'mprotect' call). So, the best solution would be to modify gcc so that 'mprotect' gets called and to tell PAX to respect 'mprotect' calls.
This far we have located fault on PAX process killer, so I think the further work is the question whether to allow post-processing command to be executed in test_run script in a general manner, so chpax could be safely executed whenever $PC is.
Some time ago I modified test_run script to allow a runner program: instead of running test directly we would call runner program giving it the name of executable and the argument list. This was needed for testing cross-compilers (so that runner could launch apropriate emulator), in particular I used this to test djgpp and mingw ports (using dosemu and wine). I could probably dig out (or recreate) the patch, but I am not sure if such change is worth including in the standard version.
On Wed, 14 Feb 2007, Waldek Hebisch wrote:
Mirsad Todorovac wrote:
BUT THE GOOD NEWS is that there are no longer "Killed" error messages, so I think we've found the murderer: it was Linux's PAX kernel extension!
chpax has following options, so you will see why it could have affected nonlocal gotos:
-E emulate trampolines -e do not emulate trampolines -M restrict mprotect() -m do not restrict mprotect()
I wrote previously about nonlocal gotos. But now I think that the problem is with trampolines (problems with nonlocal gotos and trampolines are frequently related). Description of PAX extension makes clear that by default trampolines do not work if the extension is active, and the affected tests use trampolines. On other (non-Linux) platforms the compiler emits 'mprotect' calls to allows trampolines to work (on Linux trampolines are supposed to work even without 'mprotect' call). So, the best solution would be to modify gcc so that 'mprotect' gets called and to tell PAX to respect 'mprotect' calls.
This means using /sbin/chpax ...
This far we have located fault on PAX process killer, so I think the further work is the question whether to allow post-processing command to be executed in test_run script in a general manner, so chpax could be safely executed whenever $PC is.
Some time ago I modified test_run script to allow a runner program: instead of running test directly we would call runner program giving it the name of executable and the argument list. This was needed for testing cross-compilers (so that runner could launch apropriate emulator), in particular I used this to test djgpp and mingw ports (using dosemu and wine). I could probably dig out (or recreate) the patch, but I am not sure if such change is worth including in the standard version.
... which would IMHO make a runner program very useful in standard distribution. I hope to see it included soon, so we avoid duplicating of work.
Regards, Mirsad
Waldek Hebisch wrote:
Mirsad Todorovac wrote:
BUT THE GOOD NEWS is that there are no longer "Killed" error messages, so I think we've found the murderer: it was Linux's PAX kernel extension!
chpax has following options, so you will see why it could have affected nonlocal gotos:
-E emulate trampolines -e do not emulate trampolines -M restrict mprotect() -m do not restrict mprotect()
I wrote previously about nonlocal gotos. But now I think that the problem is with trampolines (problems with nonlocal gotos and trampolines are frequently related). Description of PAX extension makes clear that by default trampolines do not work if the extension is active, and the affected tests use trampolines. On other (non-Linux) platforms the compiler emits 'mprotect' calls to allows trampolines to work (on Linux trampolines are supposed to work even without 'mprotect' call). So, the best solution would be to modify gcc so that 'mprotect' gets called and to tell PAX to respect 'mprotect' calls.
I agree, and I hope the backend folks will do so. (Otherwise we could add backend patches in GPC again.)
In the meantime, it seems "-E" might help, or "-p". (You apparently did the latter, Mirsad, but the former might be less intrusive if it works.)
-P enforce paging based non-executable pages -p do not enforce paging based non-executable pages
The wrapper is simplistic, it still does something wrong. It does not work in all cases, and I can investigate, but I believe Frank will know immediatelly the solution, provided he has enough time ...
Not all tests use "a.out" for various reasons. I suppose Waldek's patch takes this into account already.
The wrapper:
p/test/gpc:
#/bin/bash -f
/usr/local/bin/gpc $*
Please use "$@" rather than $*. (This applis to almost all sh scripts, almost always, BTW.) "$@" leaves arguments as they are, $* does word-splitting which breaks options with spaces (e.g.).
Then add something like "|| exit $?", otherwise you discard GPC errors(*) (which leads to false positives, and false negatives in expected-fail tests). (This advice also applies to almost all shell scripts, almost always. ;-)
(*) Well, not entirely, as the test_sum script is somewhat more paranoid and checks error messages as well. But it's always a bad idea to discard the exit status of any program that may realistically fail (i.e., anything except /bin/true and "echo" ;-), especially if it's expected to fail sometimes.
Some time ago I modified test_run script to allow a runner program: instead of running test directly we would call runner program giving it the name of executable and the argument list. This was needed for testing cross-compilers (so that runner could launch apropriate emulator), in particular I used this to test djgpp and mingw ports (using dosemu and wine). I could probably dig out (or recreate) the patch, but I am not sure if such change is worth including in the standard version.
BTW, FWIW, I've always tested DJGPP by letting the whole test suite run in DosEmu (which is probably a bit faster as DosEmu doesn't have to be restarted each time), the same might apply to Mingw.
But I agree that in other situations, a runner can be useful (e.g. in Mirsad's case, or for cross-compilers -- when no emulator is available, one could even use a runner that transfers the executable to a remote machine and runs it there). So your patch seems useful for the standard distribution.
Frank