Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
2.09k stars 577 forks source link

jhi patch applied #5919

Closed p5pRT closed 22 years ago

p5pRT commented 22 years ago

Migrated from rt.perl.org#17174 (status was 'resolved')

Searchable as RT17174$

p5pRT commented 22 years ago

From rhialto@azenomei.knuffel.net

Created by rhialto@azenomei.falu.nl

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\, \ line 516.'   160466688 223   not ok 517 (?(1)b|a)​:a​:y​:$&​:a => error `regexp memory corruption at   (eval 1010) line 1\, \ line 517.'   160466688 223   not ok 518 (x)?(?(1)a|b)​:a​:n​:-​:- => error `regexp memory corruption at   (eval 1011) line 1\, \ line 518.'   160466688 223   not ok 519 (x)?(?(1)b|a)​:a​:y​:$&​:a => error `regexp memory corruption at   (eval 1012) line 1\, \ line 519.'   160466688 223   not ok 520 ()?(?(1)b|a)​:a​:y​:$&​:a => error `regexp memory corruption at   (eval 1013) line 1\, \ line 520.'   not ok 525 () ^(\()?blah(?(1)(\)))$​:blah)​:n​:-​:- => false positive   not ok 529 () ^(\(+)?blah(?(1)(\)))$​:blah)​:n​:-​:- => false positive   (more complaints about regexp memory corruption elided) t/op/regexp_noamp....................FAILED at test 422 ext/Storable/t/dclone................FAILED at test 4 ext/Storable/t/freeze................FAILED at test 5 ext/Storable/t/integer...............# Failed test (../ext/Storable/t/integer.t at line 157) FAILED at test 30 ext/Storable/t/tied..................FAILED at test 5 ext/Storable/t/tied_hook.............FAILED at test 6 ext/Storable/t/utf8hash..............# Failed test (../ext/Storable/t/utf8hash.t at line 85) # got​: '193' # expected​: '2334397761725687233' FAILED at test 7   t/dclone.........FAILED test 4   Failed 1/10 tests\, 90.00% okay   t/freeze.........FAILED test 5   Failed 1/19 tests\, 94.74% okay   t/integer........NOK 30# Failed test (t/integer.t at line 157)   t/integer........NOK 80# Failed test (t/integer.t at line 157)   t/integer........NOK 85# Failed test (t/integer.t at line 157)   t/integer........NOK 90# Failed test (t/integer.t at line 157)   t/integer........NOK 110# Failed test (t/integer.t at line 157)   t/integer........NOK 115# Failed test (t/integer.t at line 157)   t/integer........NOK 200# Failed test (t/integer.t at line 157)   t/integer........NOK 250# Failed test (t/integer.t at line 157)   t/integer........NOK 255# Failed test (t/integer.t at line 157)   t/integer........NOK 260# Failed test (t/integer.t at line 157)   t/integer........NOK 280# Failed test (t/integer.t at line 157)   t/integer........NOK 285# Failed test (t/integer.t at line 157)   t/integer........ok 850/850# Looks like you failed 12 tests of 850.   t/integer........dubious   Test returned status 12 (wstat 3072\, 0xc00)   DIED. FAILED tests 30\, 80\, 85\, 90\, 110\, 115\, 200\, 250\, 255\, 260\, 280\, 285   Failed 12/850 tests\, 98.59% okay   t/interwork56....skipped   all skipped​: Your IVs are no larger than your longs   t/tied...........FAILED tests 5-6   Failed 2/22 tests\, 90.91% okay   t/tied_hook......FAILED test 6   Failed 1/25 tests\, 96.00% okay   t/utf8hash.......NOK 7# Failed test (t/utf8hash.t at line 85)   # got​: '193'   # expected​: '2334397761725687233'   t/utf8hash.......NOK 8# Failed test (t/utf8hash.t at line 85)   # got​: '193'   # expected​: '7527520986698050753'   t/utf8hash.......NOK 9# Failed test (t/utf8hash.t at line 85)   # got​: '12288'   # expected​: '4836904526431481856'   t/utf8hash.......NOK 10# Failed test (t/utf8hash.t at line 85)   # got​: '12288'   # expected​: '7091318038165597952'   t/utf8hash.......NOK 81# Failed test (t/utf8hash.t at line 85)   # got​: '193'   # expected​: '144143176018777281'   t/utf8hash.......NOK 82# Failed test (t/utf8hash.t at line 85)   # got​: '193'   # expected​: '-9004755414490808127'   t/utf8hash.......NOK 83# Failed test (t/utf8hash.t at line 85)   # got​: '12288'   # expected​: '-6934576489821940992'   t/utf8hash.......NOK 84# Failed test (t/utf8hash.t at line 85)   # got​: '12288'   # expected​: '112202846679064320'   t/utf8hash.......ok 148/148# Looks like you failed 8 tests of 148.   t/utf8hash.......dubious   Test returned status 8 (wstat 2048\, 0x800)   DIED. FAILED tests 7-10\, 81-84   Failed 8/148 tests\, 94.59% okay   Failed Test Stat Wstat Total Fail Failed List of Failed   -------------------------------------------------------------------------------   t/dclone.t 10 1 10.00% 4   t/freeze.t 19 1 5.26% 5   t/integer.t 12 3072 850 12 1.41% 30 80 85 90 110 115 200 250 255   260 280 285   t/tied.t 22 2 9.09% 5-6   t/tied_hook.t 25 1 4.00% 6   t/utf8hash.t 8 2048 148 8 5.41% 7-10 81-84   1 test skipped.   Failed 6/22 test scripts\, 72.73% okay. 25/1806 subtests failed\, 98.62% okay.

-Olaf. -- ___ Olaf 'Rhialto' Seibert -- The evil eye is caused by the black \X/ rhialto/at/xs4all.nl -- tongue - Tom Poes\, "Het boze oog"\, 4456.

Perl Info ``` Flags: category=core severity=medium 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. Site configuration information for perl v5.6.1: Configured by rhialto at Sun Nov 11 19:29:28 CET 2001. Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration: Platform: osname=netbsd, osvers=1.5.1_beta, archname=alpha-netbsd uname='netbsd azenomei.falu.nl 1.5.1_beta netbsd 1.5.1_beta (azenomei) #0: sun apr 22 00:38:14 cest 2001 rhialto@azenomei.falu.nl:vol1rhialtocvsnetbsd-1-5syssrcsysarchalphacompileazenomei alpha ' config_args='-sde -Dprefix=/usr/pkg -Dscriptdir=/usr/pkg/bin -Darchname=alpha-netbsd -Doptimize=-O2 -Dcc=cc -Uusemymalloc -Uinstallusrbinperl -Dlibswanted=m crypt -Duseshrplib' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef use64bitint=define use64bitall=define uselongdouble=undef Compiler: cc='cc', ccflags ='-fno-strict-aliasing -I/usr/pkg/include', optimize='-O2', cppflags='-fno-strict-aliasing -I/usr/pkg/include' ccversion='', gccversion='egcs-2.91.66 19990314 (egcs-1.1.2 release)', gccosandvers='' intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8 ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, usemymalloc=n, prototype=define Linker and Libraries: ld='cc', ldflags ='-Wl,-R/usr/pkg/lib -L/usr/pkg/lib' libpth=/usr/pkg/lib /usr/lib libs=-lm -lcrypt perllibs=-lm -lcrypt libc=/usr/lib/libc.so, so=so, useshrplib=true, libperl=libperl.so Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-whole-archive -lgcc -Wl,-no-whole-archive -Wl,-E -Wl,-R/lib -Wl,-R/usr/pkg/lib/perl5/5.6.1/alpha-netbsd/CORE' cccdlflags='-DPIC -fPIC ', lddlflags='--whole-archive -shared -Wl,-R/usr/pkg/lib -L/usr/pkg/lib' Locally applied patches: @INC for perl v5.6.1: /usr/pkg/lib/perl5/5.6.1/alpha-netbsd /usr/pkg/lib/perl5/5.6.1 /usr/pkg/lib/perl5/site_perl/5.6.1/alpha-netbsd /usr/pkg/lib/perl5/site_perl/5.6.1 /usr/pkg/lib/perl5/site_perl . Environment for perl v5.6.1: HOME=/home/rhialto LANG (unset) LANGUAGE (unset) LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=/home/rhialto/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/pkg/bin:/usr/pkg/sbin:/usr/pkg/cross/bin:/usr/X11R6/bin:/usr/games:. PERL_BADLANG (unset) SHELL=/usr/pkg/bin/bash ```
p5pRT commented 22 years ago

From @nwc10

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

p5pRT commented 22 years ago

From rhialto@azenomei.knuffel.net

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@&#8203;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.

p5pRT commented 22 years ago

From rhialto@azenomei.knuffel.net

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.

p5pRT commented 22 years ago

From @jhi

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@&#8203;iki\.fi http​://www.iki.fi/jhi/ "There is this special biologist word we use for 'stable'. It is 'dead'." -- Jack Cohen

p5pRT commented 22 years ago

From @jhi

How does one in netbsd/alpha find out easily that one is in in alpha? uname -m?

-- Jarkko Hietaniemi \jhi@&#8203;iki\.fi http​://www.iki.fi/jhi/ "There is this special biologist word we use for 'stable'. It is 'dead'." -- Jack Cohen

p5pRT commented 22 years ago

From @jhi

Could you try the below patch on the box with gcc the 2.91.66?

Inline Patch ```diff --- hints/netbsd.sh.dist 2002-09-14 07:48:58.000000000 +0300 +++ hints/netbsd.sh 2002-09-14 08:03:59.000000000 +0300 @@ -144,3 +144,27 @@ done ;; esac + +case `uname -m` in +alpha) + echo 'int main() {}' > try.c + gcc=`cc -v -c try.c 2>&1|grep 'gcc version 2'` + case "$gcc" in + '' | "gcc version 2.95."[3-9]) ;; # 2.95.3 or better okay + *) cat >&4 < http://www.iki.fi/jhi/ "There is this special biologist word we use for 'stable'. It is 'dead'." -- Jack Cohen ```
p5pRT commented 22 years ago

From rhialto@azenomei.knuffel.net

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.

Inline Patch ```diff --- hints/netbsd.sh.orig Sat Jun 1 19:03:12 2002 +++ hints/netbsd.sh Sat Sep 14 17:26:54 2002 @@ -144,3 +144,28 @@ done ;; esac + +case `uname -m` in +alpha) + echo 'int main() {}' > try.c + gcc=`${cc:-cc} -v -c try.c 2>&1|grep 'gcc version egcs-2'` + case "$gcc" in + '' | "gcc version egcs-2.95."[3-9]*) ;; # 2.95.3 or better okay + *) cat >&4 <
p5pRT commented 22 years ago

From @jhi

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@&#8203;iki\.fi http​://www.iki.fi/jhi/ "There is this special biologist word we use for 'stable'. It is 'dead'." -- Jack Cohen

p5pRT commented 22 years ago

From @jhi

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@&#8203;iki\.fi http​://www.iki.fi/jhi/ "There is this special biologist word we use for 'stable'. It is 'dead'." -- Jack Cohen

p5pRT commented 22 years ago

From @jhi

Inline Patch ```diff --- hints/netbsd.sh.orig Sat Jun 1 19:03:12 2002 +++ hints/netbsd.sh Sat Sep 14 17:26:54 2002 @@ -144,3 +144,28 @@ done ;; esac + +case `uname -m` in +alpha) + echo 'int main() {}' > try.c + gcc=`${cc:-cc} -v -c try.c 2>&1|grep 'gcc version egcs-2'` + case "$gcc" in + '' | "gcc version egcs-2.95."[3-9]*) ;; # 2.95.3 or better okay + *) cat >&4 <
p5pRT commented 22 years ago

From @rgs

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.

p5pRT commented 22 years ago

@rgs - Status changed from 'new' to 'resolved'