Closed p5pRT closed 4 years ago
This is a bug report for perl from alian@cpan.org\, generated with the help of perlbug 1.34 running under perl v5.8.0.
----------------------------------------------------------------- There seems to be some problem with gcc before version 3 on sparc Config used for test: 1/ 1.6 i386 /gcc 2.95.3 2/ 1.6.1 sparc/gcc 2.95.5 3/ 1.6.1 sparc/gcc 3.2.1 4/ 1.5.3 sparc/gcc 2.91
There is problem with 2/ and 4/. So only sparc and gcc-2.something. Last 2 major version of NetBSD affected
Here error on make test\, all config: t/op/pack............................FAILED at test 187
and the test die some secs after due to an illegal div 0.
There is another failure with thread (only without debugging): ext/IO/t/io_xs.......................FAILED at test 0
There seems to be some problem with gcc before version 3 on sparc Config used for test: 1/ 1.6 i386 /gcc 2.95.3 2/ 1.6.1 sparc/gcc 2.95.5 3/ 1.6.1 sparc/gcc 3.2.1 4/ 1.5.3 sparc/gcc 2.91
There is problem with 2/ and 4/. So only sparc and gcc-2.something. Last 2 major version of NetBSD affected
Here error on make test\, all config: t/op/pack............................FAILED at test 187
Last success: @19201. First failure: @19254. Don't affect perl-5.8.0\, only blead\, may be 5.8.1
and the test die some secs after due to an illegal div 0.
Attached patch for continue test.
There is another failure with thread (only without debugging): ext/IO/t/io_xs.......................FAILED at test 0
Last success: @19254 First failure: @19330
On Wed\, Aug 20\, 2003 at 01:11:36PM -0000\, Alain wrote:
There seems to be some problem with gcc before version 3 on sparc Config used for test: 1/ 1.6 i386 /gcc 2.95.3 2/ 1.6.1 sparc/gcc 2.95.5 3/ 1.6.1 sparc/gcc 3.2.1 4/ 1.5.3 sparc/gcc 2.91
There is problem with 2/ and 4/. So only sparc and gcc-2.something. Last 2 major version of NetBSD affected
Here error on make test\, all config: t/op/pack............................FAILED at test 187
and the test die some secs after due to an illegal div 0.
There is another failure with thread (only without debugging):
So the pack failure occurs both with and without debugging? Is compiler optimisation turned on all the time?
pack.t's tests are really really hard to work back from the number to the line. This helps. It's somewhere in the 'c' numbers test. Not worked out precisely what yet.
Nicholas Clark
On Wed\, Aug 20\, 2003 at 01:11:36PM -0000\, Alain wrote:
# New Ticket Created by Alain # Please include the string: [perl #23463] # in the subject line of all future correspondence about this issue. # \<URL: http://rt.perl.org/rt2/Ticket/Display.html?id=23463 >
This is a bug report for perl from alian@cpan.org\, generated with the help of perlbug 1.34 running under perl v5.8.0.
----------------------------------------------------------------- There seems to be some problem with gcc before version 3 on sparc Config used for test: 1/ 1.6 i386 /gcc 2.95.3 2/ 1.6.1 sparc/gcc 2.95.5 3/ 1.6.1 sparc/gcc 3.2.1 4/ 1.5.3 sparc/gcc 2.91
There is problem with 2/ and 4/. So only sparc and gcc-2.something. Last 2 major version of NetBSD affected
Here error on make test\, all config: t/op/pack............................FAILED at test 187
and the test die some secs after due to an illegal div 0.
Do you know which line this is? I infer that it's in &numbers_with_total with $format 'c' and $_ 53
and it's somewhere after
ok(defined $sum);
ie in the big block of maths that starts with the comment
# Our problem with testing this portably is that the checksum code in # pp_unpack is able to cast signed to unsigned\, and do modulo 2**n # arithmetic in unsigned ints\, which perl has no operators to do.
And there's more than one division in there.
Nicholas Clark
There seems to be some problem with gcc before version 3 on sparc Config used for test: 1/ 1.6 i386 /gcc 2.95.3 2/ 1.6.1 sparc/gcc 2.95.5 3/ 1.6.1 sparc/gcc 3.2.1 4/ 1.5.3 sparc/gcc 2.91
There is problem with 2/ and 4/. So only sparc and gcc-2.something. Last 2 major version of NetBSD affected
Here error on make test\, all config: t/op/pack............................FAILED at test 187
and the test die some secs after due to an illegal div 0.
Do you know which line this is?
not ok 187 # Failed at t/op/pack.t line 474 # For list (-128\, -1\, 0\, 1\, 127) (total -1) packed with c unpack '%53c' gave 9.00719925474099e+15\, expected 0 ok 188 ok 189 Illegal division by zero at t/op/pack.t line 448. # Looks like you planned 5852 tests but ran 189.
And there's more than one division in there.
Yes but there is only one that cause trouble here. I submit a patch to fail the test without stop\,
http://nntp.x.perl.org/group/perl.perl5.porters/80600
Nicholas Clark (via RT) wrote:
On Wed\, Aug 20\, 2003 at 01:11:36PM -0000\, Alain wrote:
There seems to be some problem with gcc before version 3 on sparc Config used for test: 1/ 1.6 i386 /gcc 2.95.3 2/ 1.6.1 sparc/gcc 2.95.5 3/ 1.6.1 sparc/gcc 3.2.1 4/ 1.5.3 sparc/gcc 2.91
There is problem with 2/ and 4/. So only sparc and gcc-2.something. Last 2 major version of NetBSD affected
Here error on make test\, all config: t/op/pack............................FAILED at test 187
and the test die some secs after due to an illegal div 0.
There is another failure with thread (only without debugging):
So the pack failure occurs both with and without debugging? Is compiler optimisation turned on all the time?
pack.t's tests are really really hard to work back from the number to the line. This helps. It's somewhere in the 'c' numbers test. Not worked out precisely what yet.
Result of your patch of pack test: http://www.alianwebserver.com/tmp/pack.t.log.txt
On Sat\, Aug 23\, 2003 at 01:10:02PM +0200\, alian wrote:
Result of your patch of pack test: http://www.alianwebserver.com/tmp/pack.t.log.txt
Thanks. Looks like the perl arithmetic is going wrong earlier. It seems that $max_p1 ends up as 0 from this code:
my $max = 1 + 2 * (int (2 ** ($len-1))-1); # The max possible checksum my $max_p1 = $max + 1;
Could you try runing this (with 53 as @ARGV) and see what it prints?
use Devel::Peek; use strict;
foreach my $len (@ARGV) { print "Length $len:\n"; my $max = 1 + 2 * (int (2 ** ($len-1))-1); my $max_p1 = $max + 1;
Dump $max; Dump $max_p1; } __END__
I see:
$ perl sparcmax.pl 53 Length 53: SV = NV(0x38180) at 0x29fe4 REFCNT = 1 FLAGS = (PADBUSY\,PADMY\,NOK\,pNOK) NV = 9.00719925474099e+15 SV = NV(0x38190) at 0x39fd8 REFCNT = 1 FLAGS = (PADBUSY\,PADMY\,NOK\,pNOK) NV = 9.00719925474099e+15
Thanks
Nicholas Clark
Could you try runing this (with 53 as @ARGV) and see what it prints?
use Devel::Peek; use strict;
foreach my $len (@ARGV) { print "Length $len:\n"; my $max = 1 + 2 * (int (2 ** ($len-1))-1); my $max_p1 = $max + 1;
Dump $max; Dump $max_p1; } __END__
I see:
$ perl sparcmax.pl 53 Length 53: SV = NV(0x38180) at 0x29fe4 REFCNT = 1 FLAGS = (PADBUSY\,PADMY\,NOK\,pNOK) NV = 9.00719925474099e+15 SV = NV(0x38190) at 0x39fd8 REFCNT = 1 FLAGS = (PADBUSY\,PADMY\,NOK\,pNOK) NV = 9.00719925474099e+15
Thanks
Nicholas Clark
Two try\, one with perl-5.8.0\, one with blead:
centaure:\~/soft/perl-current$ ./perl -Ilib -Iext ~/sparcmax.pl 53 Length 53: SV = IV(0x14ed14) at 0x14e934 REFCNT = 1 FLAGS = (PADMY\,IOK\,pIOK) IV = -1 SV = IV(0x14ed1c) at 0x18329c REFCNT = 1 FLAGS = (PADMY\,IOK\,pIOK) IV = 0
centaure:\~/soft/perl-current$ perl ~/sparcmax.pl 53 Length 53: SV = PVNV(0x13c5b8) at 0x12de30 REFCNT = 1 FLAGS = (PADBUSY\,PADMY\,NOK\,pIOK\,pNOK\,IsUV) UV = 4294967295 NV = 9.00719925474099e+15 PV = 0 SV = NV(0x139028) at 0x14c7a4 REFCNT = 1 FLAGS = (PADBUSY\,PADMY\,NOK\,pNOK) NV = 9.00719925474099e+15 centaure:\~/soft/perl-current$ more .patch 20856 centaure:\~/soft/perl-current$ perl -v
This is perl\, v5.8.0 built for sparc-netbsd
Copyright 1987-2002\, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the GNU General Public License\, which may be found in the Perl 5 source kit.
Complete documentation for Perl\, including FAQ lists\, should be found on this system using `man perl' or `perldoc perl'. If you have access to the Internet\, point your browser at http://www.perl.com/\, the Perl Home Page.
On Sat\, Aug 23\, 2003 at 05:59:28PM +0200\, alian wrote:
Could you try runing this (with 53 as @ARGV) and see what it prints?
I see:
$ perl sparcmax.pl 53 Length 53: SV = NV(0x38180) at 0x29fe4 REFCNT = 1 FLAGS = (PADBUSY\,PADMY\,NOK\,pNOK) NV = 9.00719925474099e+15 SV = NV(0x38190) at 0x39fd8 REFCNT = 1 FLAGS = (PADBUSY\,PADMY\,NOK\,pNOK) NV = 9.00719925474099e+15
Er. That was silly of me. That was 5.6.1. With patchlevel 20858 I see:
Length 53: SV = PVNV(0x1387b8) at 0x11fa6c REFCNT = 1 FLAGS = (PADBUSY\,PADMY\,NOK\,pIOK\,pNOK\,IsUV) UV = 4294967295 NV = 9.00719925474099e+15 PV = 0 SV = NV(0x124188) at 0x133e80 REFCNT = 1 FLAGS = (PADBUSY\,PADMY\,NOK\,pNOK) NV = 9.00719925474099e+15
(Debian sparc. Shouldn't be any different from Debian anything else\, but as I have access to a sparc box\, I thought I'd try it there)
Two try\, one with perl-5.8.0\, one with blead:
I take it that this is blead:
centaure:\~/soft/perl-current$ ./perl -Ilib -Iext ~/sparcmax.pl 53 Length 53: SV = IV(0x14ed14) at 0x14e934 REFCNT = 1 FLAGS = (PADMY\,IOK\,pIOK) IV = -1 SV = IV(0x14ed1c) at 0x18329c REFCNT = 1 FLAGS = (PADMY\,IOK\,pIOK) IV = 0
And this is the installed 5.8.0
centaure:\~/soft/perl-current$ perl ~/sparcmax.pl 53 Length 53: SV = PVNV(0x13c5b8) at 0x12de30 REFCNT = 1 FLAGS = (PADBUSY\,PADMY\,NOK\,pIOK\,pNOK\,IsUV) UV = 4294967295 NV = 9.00719925474099e+15 PV = 0 SV = NV(0x139028) at 0x14c7a4 REFCNT = 1 FLAGS = (PADBUSY\,PADMY\,NOK\,pNOK) NV = 9.00719925474099e+15
centaure:\~/soft/perl-current$ more .patch 20856
Mmmm. That arithmetic has gone very wrong. What happens if you run this with your blead?
use Devel::Peek; use strict;
foreach my $len (@ARGV) { print "Length $len:\n"; my $a = $len - 1; Dump $a; my $b = 2 ** $a; Dump $b; my $c = int $b; Dump $b; Dump $c; my $d = $c - 1; Dump $d; my $e = 2 * $d; Dump $e; my $max = 1 + $e; Dump $max;
my $max_p1 = $max + 1;
Dump $max; Dump $max_p1; } __END__
Nicholas Clark
I can give you ssh access to this/my host/lan if you want. You will find a sparc linux on Debian too :-) http://62.212.98.196:8080/mrtg/
Mmmm. That arithmetic has gone very wrong. What happens if you run this with your blead?
use Devel::Peek; use strict;
foreach my $len (@ARGV) { print "Length $len:\n"; my $a = $len - 1; Dump $a; my $b = 2 ** $a; Dump $b; my $c = int $b; Dump $b; Dump $c; my $d = $c - 1; Dump $d; my $e = 2 * $d; Dump $e; my $max = 1 + $e; Dump $max;
my $max_p1 = $max + 1;
Dump $max; Dump $max_p1; } __END__
centaure:\~/soft/perl-current$ ./perl -Ilib -Iext ~/sparcmax2.pl 53 Length 53: SV = IV(0x14ecf8) at 0x14e934 REFCNT = 1 FLAGS = (PADMY\,IOK\,pIOK) IV = 52 SV = PVNV(0x174e00) at 0x14ea00 REFCNT = 1 FLAGS = (PADMY\,NOK\,pIOK\,pNOK\,IsUV) UV = 4294967295 NV = 4.5035996273705e+15 PV = 0 SV = PVNV(0x174e00) at 0x14ea00 REFCNT = 1 FLAGS = (PADMY\,NOK\,pIOK\,pNOK\,IsUV) UV = 4294967295 NV = 4.5035996273705e+15 PV = 0 SV = NV(0x157818) at 0x1832c0 REFCNT = 1 FLAGS = (PADMY\,NOK\,pNOK) NV = 0.5 SV = NV(0x157820) at 0x14ea78 REFCNT = 1 FLAGS = (PADMY\,NOK\,pNOK) NV = -0.5 SV = NV(0x157828) at 0x185224 REFCNT = 1 FLAGS = (PADMY\,NOK\,pNOK) NV = -1 SV = IV(0x14ecd0) at 0x185260 REFCNT = 1 FLAGS = (PADMY\,IOK\,pIOK) IV = 0 SV = IV(0x14ecd0) at 0x185260 REFCNT = 1 FLAGS = (PADMY\,IOK\,pIOK) IV = 0 SV = IV(0x14ed10) at 0x18529c REFCNT = 1 FLAGS = (PADMY\,IOK\,pIOK) IV = 1
(Debian sparc. Shouldn't be any different from Debian anything else\, but as I have access to a sparc box\, I thought I'd try it there)
my debian sparc pass this test on linux with blead: http://nntp.x.perl.org/group/perl.daily-build.reports/7944
The failure on ext/IO/t/io_multihomed.t is just a timeout. (limited to 3s\, pass in 4s\, something like this).
On Sat\, Aug 23\, 2003 at 06:43:59PM +0200\, alian wrote:
I can give you ssh access to this/my host/lan if you want. You will find a sparc linux on Debian too :-) http://62.212.98.196:8080/mrtg/
oooh. and the sparc openbsd machine.
Mmmm. That arithmetic has gone very wrong. What happens if you run this with your blead?
use Devel::Peek; use strict;
foreach my $len (@ARGV) { print "Length $len:\n"; my $a = $len - 1; Dump $a; my $b = 2 ** $a; Dump $b; my $c = int $b; Dump $b; Dump $c;
centaure:\~/soft/perl-current$ ./perl -Ilib -Iext ~/sparcmax2.pl 53 Length 53: SV = IV(0x14ecf8) at 0x14e934 REFCNT = 1 FLAGS = (PADMY\,IOK\,pIOK) IV = 52 SV = PVNV(0x174e00) at 0x14ea00 REFCNT = 1 FLAGS = (PADMY\,NOK\,pIOK\,pNOK\,IsUV) UV = 4294967295 NV = 4.5035996273705e+15 PV = 0 SV = PVNV(0x174e00) at 0x14ea00 REFCNT = 1 FLAGS = (PADMY\,NOK\,pIOK\,pNOK\,IsUV) UV = 4294967295 NV = 4.5035996273705e+15 PV = 0 SV = NV(0x157818) at 0x1832c0 REFCNT = 1 FLAGS = (PADMY\,NOK\,pNOK) NV = 0.5
Nice. :-)
So you'd be seeing 0.5 as the output from ./perl -le 'print int (2**52)' ?
If so\, I think we have our troublemaker here. And I was tempted to think that it was actually the ** operator\, as pp_pow has been tweaked.
Nicholas Clark
I can give you ssh access to this/my host/lan if you want. You will find a sparc linux on Debian too :-) http://62.212.98.196:8080/mrtg/
oooh. and the sparc openbsd machine.
Yep. The-machine-who-hang-one-smoke-on-15-and-I-don't-know-why.
Nice. :-)
So you'd be seeing 0.5 as the output from ./perl -le 'print int (2**52)' ?
If so\, I think we have our troublemaker here. And I was tempted to think that it was actually the ** operator\, as pp_pow has been tweaked.
I really don't know what is it. Only one thing: this is something between @19201 and @19254. Period of configure/perl.h update for modfl & co.
Always 2 tests: one with 5.8.0\, one with blead:
centaure:\~/soft/perl-current$ perl -MDevel::Peek -le '$a = int (2**52); print $a\,"\n"; Dump($a)' 4.5035996273705e+15
SV = PVNV(0x1500a0) at 0x12de3c REFCNT = 1 FLAGS = (NOK\,POK\,pIOK\,pNOK\,pPOK\,IsUV) UV = 4294967295 NV = 4.5035996273705e+15 PV = 0x133a30 "4.5035996273705e+15"\0 CUR = 19 LEN = 35
centaure:\~/soft/perl-current$ ./perl -Ilib -Iext -MDevel::Peek -le '$a = int (2**52); print $a\,"\n"; Dump($a)' 0
SV = PVNV(0x172c68) at 0x14cd10 REFCNT = 1 FLAGS = (NOK\,POK\,pNOK\,pPOK) IV = 0 NV = 0 PV = 0x13ce08 "0"\0 CUR = 1 LEN = 35
On Sat\, Aug 23\, 2003 at 10:25:37PM +0200\, alian wrote:
I can give you ssh access to this/my host/lan if you want. You will find a sparc linux on Debian too :-) http://62.212.98.196:8080/mrtg/
oooh. and the sparc openbsd machine.
Yep. The-machine-who-hang-one-smoke-on-15-and-I-don't-know-why.
Nice. :-)
So you'd be seeing 0.5 as the output from ./perl -le 'print int (2**52)' ?
If so\, I think we have our troublemaker here. And I was tempted to think that it was actually the ** operator\, as pp_pow has been tweaked.
I really don't know what is it. Only one thing: this is something between @19201 and @19254. Period of configure/perl.h update for modfl & co.
I'm afraid that I couldn't work out how to make the test smoke viewer at http://cpanplus.keradel.com/cgi-bin/smoke_db.cgi tell me this information\, but it seems that the last pass was at 19174:
http://www.mail-archive.com/daily-build-reports@perl.org/msg03908.html
And the first recorded fail at 19622:
http://www.mail-archive.com/daily-build-reports@perl.org/msg03668.html
I suspect that the culprit is this patch:
http://public.activestate.com/cgi-bin/perlbrowse?patch=19218
which rearranges the innards of pp_int
Nicholas Clark
I'm afraid that I couldn't work out how to make the test smoke viewer at http://cpanplus.keradel.com/cgi-bin/smoke_db.cgi tell me this information\,
Go to "filter" page. Select os => netbsd\, archi => sparc and all others fields "All". Submit. Then select "last failures" page.
but it seems that the last pass was at 19174:
http://www.mail-archive.com/daily-build-reports@perl.org/msg03908.html
If you browse "last failures" page with these filters\, you will find 19201 as last success\, and 19254 as first failure for pack.
I think that the appended patch to t/op/int.t will fail on netbsd until we get this problem fixed\, and pass everywhere else. However\, it's a lot less obscure a failure than something in the bowels of pack.
On Sat\, Aug 23\, 2003 at 10:25:37PM +0200\, alian wrote:
I really don't know what is it. Only one thing: this is something between @19201 and @19254. Period of configure/perl.h update for modfl & co.
Could you try the attached patch\, which should back out the change to pp.c only\, and see if that fixes it.
Nicholas Clark
On Sun Aug 24 07:58:08 2003\, nicholas wrote:
I think that the appended patch to t/op/int.t will fail on netbsd until we get this problem fixed\, and pass everywhere else. However\, it's a lot less obscure a failure than something in the bowels of pack.
On Sat\, Aug 23\, 2003 at 10:25:37PM +0200\, alian wrote:
I really don't know what is it. Only one thing: this is something between @19201 and @19254. Period of configure/perl.h update for modfl & co.
Could you try the attached patch\, which should back out the change to pp.c only\, and see if that fixes it.
Nicholas Clark
--- t/op/int.t.orig 2002-07-20 00:50:10.000000000 +0100 +++ t/op/int.t 2003-08-24 15:30:13.000000000 +0100 @@ -5\,7 +5\,7 @@ BEGIN { @INC = '../lib'; }
-print "1..14\n"; +print "1..16\n";
# compile time evaluation
@@ -96\,3 +96\,20 @@ if ($y == 4745162525730) { print "not ok 14 # int(279964589018079/59) is $y\, not 4745162525730\n" }
+$x = 2**53; +$y = int ($x); + +if ($x == $y) { + print "ok 15\n" +} else { + print "not ok 15 # int($x) is $y\, not $x\n" +} + +$x = -$x; +$y = int ($x); + +if ($x == $y) { + print "ok 16\n" +} else { + print "not ok 16 # int($x) is $y\, not $x\n" +}
Six years without a response from the original poster. This bug is stalled.
Steve
@smpeters - Status changed from 'open' to 'stalled'
From @smpeters
On Sun Aug 24 07β:58β:08 2003, nicholas wroteβ:
I think that the appended patch to t/op/int.t will fail on netbsd until we get this problem fixed, and pass everywhere else. However, it's a lot less obscure a failure than something in the bowels of pack. On Sat, Aug 23, 2003 at 10β:25β:37PM +0200, alian wroteβ:
I really don't know what is it. Only one thingβ: this is something between @β19201 and @β19254. Period of configure/perl.h update for modfl & co.
Could you try the attached patch, which should back out the change to pp.c only, and see if that fixes it. Nicholas Clark --- t/op/int.t.orig 2002-07-20 00β:50β:10.000000000 +0100 +++ t/op/int.t 2003-08-24 15β:30β:13.000000000 +0100 @β@β -5,7 +5,7 @β@β BEGIN { @βINC = '../lib'; } -print "1..14\n"; +print "1..16\n";
compile time evaluation
@β@β -96,3 +96,20 @β@β if ($y == 4745162525730) { print "not ok 14 # int(279964589018079/59) is $y, not 4745162525730\n" } +$x = 2**53; +$y = int ($x); + +if ($x == $y) {
- print "ok 15\n" +} else {
- print "not ok 15 # int($x) is $y, not $x\n" +}
+$x = -$x; +$y = int ($x);
+if ($x == $y) {
- print "ok 16\n" +} else {
- print "not ok 16 # int($x) is $y, not $x\n" +}
Six years without a response from the original poster. This bug is stalled.
Steve
10-1/2 years more without a response. Closing.
Migrated from rt.perl.org#23463 (status was 'stalled')
Searchable as RT23463$