Closed p5pRT closed 22 years ago
Perl 5.8.0 fails several tests. Here is some output from make test\, with the parts that are ok removed\, and some more details interspersed from running the individual test files (where this provides extra output):
t/op/pack............................# Failed at op/pack.t line 73
# got '67'
# expected '9'
FAILED at test 6
t/op/pat.............................FAILED at test 101
# ans='1 1 1 1 1 1 1 1 1'
# expect='(bla()) ((l)u((e))) (l(e)e)'
not ok 101
# ans=' '
# expect='(bla()) ((l)u((e))) (l(e)e)'
not ok 102
t/op/regexp..........................FAILED at test 422
not ok 422 () ^(a(?(1)\1)){4}$:aaaaaaaaaa:y:$1:aaaa => `'\, match=1
not ok 423 () ^(a(?(1)\1)){4}$:aaaaaaaaa:n:-:- => false positive
not ok 424 () ^(a(?(1)\1)){4}$:aaaaaaaaaaa:n:-:- => false positive
160466688 223
not ok 516 (?(1)a|b):a:n:-:- => error `regexp memory corruption at (eval
1009) line 1\, \
-Olaf. -- ___ Olaf 'Rhialto' Seibert -- The evil eye is caused by the black \X/ rhialto/at/xs4all.nl -- tongue - Tom Poes\, "Het boze oog"\, 4456.
On Wed\, Sep 11\, 2002 at 11:00:47PM -0000\, Rhialto wrote:
Perl 5.8.0 fails several tests. Here is some output from make test\, with the parts that are ok removed\, and some more details interspersed from running the individual test files (where this provides extra output):
This perlbug was built using Perl v5.8.0 - Wed Sep 11 23:18:49 CEST 2002 It is being executed now by Perl v5.6.1 - Sun Nov 11 19:29:28 CET 2001.
I assume that 5.8.0 will pick the same values as 5.6.1
optimize='\-O2'\, cppflags='\-fno\-strict\-aliasing \-I/usr/pkg/include' ccversion=''\, gccversion='egcs\-2\.91\.66 19990314 \(egcs\-1\.1\.2 release\)'\, gccosandvers=''
I'm told that gcc 2.95 (and presumably earlier) has a broken optimiser on alpha. (IIRC I was told that under 2.95 if you run with -O the compiler issues a warning that you will expose known bugs)
Apparently gcc 3.1 has a functional alpha optimiser.
Does rebuilding perl 5.8.0 with no optimisation\, or optimisation at -O1 make the bugs vanish?
Maybe Configure should have check to drop back to no optimisation on alpha for gcc \<3.1. (Or maybe 3.0)
Nicholas Clark
On Thu 12 Sep 2002 at 10:41:40 -0000\, Nicholas Clark wrote:
On Wed\, Sep 11\, 2002 at 11:00:47PM -0000\, Rhialto wrote:
Perl 5.8.0 fails several tests. Here is some output from make test\, with the parts that are ok removed\, and some more details interspersed from running the individual test files (where this provides extra output):
This perlbug was built using Perl v5.8.0 - Wed Sep 11 23:18:49 CEST 2002 It is being executed now by Perl v5.6.1 - Sun Nov 11 19:29:28 CET 2001.
I assume that 5.8.0 will pick the same values as 5.6.1
I think 5.8.0 chose optimize='-O1'.
optimize='\-O2'\, cppflags='\-fno\-strict\-aliasing \-I/usr/pkg/include' ccversion=''\, gccversion='egcs\-2\.91\.66 19990314 \(egcs\-1\.1\.2 release\)'\, gccosandvers=''
I'm told that gcc 2.95 (and presumably earlier) has a broken optimiser on alpha. (IIRC I was told that under 2.95 if you run with -O the compiler issues a warning that you will expose known bugs)
Apparently gcc 3.1 has a functional alpha optimiser.
Does rebuilding perl 5.8.0 with no optimisation\, or optimisation at -O1 make the bugs vanish?
Maybe Configure should have check to drop back to no optimisation on alpha for gcc \<3.1. (Or maybe 3.0)
Nicholas Clark
and
On Thu 12 Sep 2002 at 22:05:04 +0300\, Jarkko Hietaniemi wrote:
One easy way to see whether it's the gcc would be to try dropping the optimization: Configure -Doptimize=-O0 ...
I tried compiling with the system-supplied gcc "gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)" with -O0 and then all the tests ran perfectly. This seems to suggest a compiler optimisation bug indeed (although it is still theoretically possible that perl has a bug which is hidden in such a case).
I tried to use a version of "gcc version 2.95.3 20010315 (release) (NetBSD nb3)" that was set up for a sort of cross-compilation to build new NetBSD system versions (so that I did not have to install another copy). So far this has not succeeded. Perhaps I should bite the bullet and find some space to install a normal copy of this gcc.
Jarkko Hietaniemi \jhi@​iki\.fi http://www.iki.fi/jhi/ "There is this special -Olaf. -- ___ Olaf 'Rhialto' Seibert -- The evil eye is caused by the black \X/ rhialto/at/xs4all.nl -- tongue - Tom Poes\, "Het boze oog"\, 4456.
On Fri 13 Sep 2002 at 22:21:16 +0200\, Rhialto wrote:
Perhaps I should bite the bullet and find some space to install a normal copy of this gcc.
And indeed\, on "gcc version 2.95.3 20010315 (release) (NetBSD nb3)" with optimize='-O' (which is the default)\, all tests pass. To install it\, I installed the package "lang/gcc". Judging by the version string\, the same compiler will also be shipped with NetBSD 1.6 which is due RSN.
So I suppose that this more or less fixes my problem.
I don't know if this information can be used in the configuration defaults somehow\, but it would be great if it could.
Thanks for your your time\, -Olaf. -- ___ Olaf 'Rhialto' Seibert -- The evil eye is caused by the black \X/ rhialto/at/xs4all.nl -- tongue - Tom Poes\, "Het boze oog"\, 4456.
On Sat\, Sep 14\, 2002 at 12:56:22AM +0200\, Rhialto wrote:
On Fri 13 Sep 2002 at 22:21:16 +0200\, Rhialto wrote:
Perhaps I should bite the bullet and find some space to install a normal copy of this gcc.
And indeed\, on "gcc version 2.95.3 20010315 (release) (NetBSD nb3)" with optimize='-O' (which is the default)\, all tests pass. To install it\, I installed the package "lang/gcc". Judging by the version string\, the same compiler will also be shipped with NetBSD 1.6 which is due RSN.
So I suppose that this more or less fixes my problem.
Good to hear!
I don't know if this information can be used in the configuration defaults somehow\, but it would be great if it could.
Well\, we could simply bail out (and suggest installing the lang/gcc) in netbsd/alpha if someone tries to compile Perl with the 2.91.66\, or anything less than 2.95.3.
-- Jarkko Hietaniemi \jhi@​iki\.fi http://www.iki.fi/jhi/ "There is this special biologist word we use for 'stable'. It is 'dead'." -- Jack Cohen
How does one in netbsd/alpha find out easily that one is in in alpha? uname -m?
-- Jarkko Hietaniemi \jhi@​iki\.fi http://www.iki.fi/jhi/ "There is this special biologist word we use for 'stable'. It is 'dead'." -- Jack Cohen
Could you try the below patch on the box with gcc the 2.91.66?
On Sat 14 Sep 2002 at 08:04:37 +0300\, Jarkko Hietaniemi wrote:
Could you try the below patch on the box with gcc the 2.91.66?
Yep\, I adjusted it a bit into this to adjust for the precise version string as printed by gcc\, and it gives an example of how to use the suggested gcc version. Apparently $cc is not set to its default of cc yet at this point so I used ${cc:-cc} instead.
When this all is ok\, I'll communicate with packages@netbsd.org to get the patch into the local package patches\, so it will be available before the next stable Perl release is imported into that system.
Looks good to me. I'll bounce a copy of the patch to the perl5-porters mailing list\, too\, so that Perl 5.8.1 will have the patch.
-- Jarkko Hietaniemi \jhi@​iki\.fi http://www.iki.fi/jhi/ "There is this special biologist word we use for 'stable'. It is 'dead'." -- Jack Cohen
The old gcc on netbsd/alpha produces broken code on optimisation. To resolve this one can either install a newer gcc (which NetBSD 1.6 released 2002-09-14 already has)\, or compile without optimisation. The attached hints patch (tested by Rhialto) catches the problem early enough and explains the situation. I believe the #17174 can be closed.
-- Jarkko Hietaniemi \jhi@​iki\.fi http://www.iki.fi/jhi/ "There is this special biologist word we use for 'stable'. It is 'dead'." -- Jack Cohen
Jarkko Hietaniemi wrote:
The old gcc on netbsd/alpha produces broken code on optimisation. To resolve this one can either install a newer gcc (which NetBSD 1.6 released 2002-09-14 already has)\, or compile without optimisation. The attached hints patch (tested by Rhialto) catches the problem early enough and explains the situation. I believe the #17174 can be closed.
Thanks\, applied as #17907.
@rgs - Status changed from 'new' to 'resolved'
Migrated from rt.perl.org#17174 (status was 'resolved')
Searchable as RT17174$