New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
compiler version on sparc/netbsd #6715
Comments
From alian@cpan.orgCreated by alian@cpan.orgThis is a bug report for perl from alian@cpan.org, ----------------------------------------------------------------- There is problem with 2/ and 4/. Here error on make test, all config: and the test die some secs after due to an illegal div 0. There is another failure with thread (only without debugging): Perl Info
|
From alian@cpan.org
Last success: @19201.
Attached patch for continue test.
Last success: @19254 |
From alian@cpan.orgpack.t.patch--- perl-current/t/op/pack.t~ Thu Jun 19 08:17:56 2003
+++ perl-current/t/op/pack.t Wed Aug 20 20:37:27 2003
@@ -445,7 +445,7 @@
} else {
$calc_sum = $total;
# Shift into range by some multiple of the total
- my $mult = int ($total / $max_p1);
+ my $mult = $max_p1 ? int ($total / $max_p1) : undef;
# Need this to make sure that -1 + (~0+1) is ~0 (ie still integer)
$calc_sum = $total - $mult;
$calc_sum -= $mult * $max;
|
From @nwc10On Wed, Aug 20, 2003 at 01:11:36PM -0000, Alain wrote:
So the pack failure occurs both with and without debugging? pack.t's tests are really really hard to work back from the number Nicholas Clark Inline Patch--- t/op/pack.t.orig 2003-08-06 15:45:20.000000000 +0100
+++ t/op/pack.t 2003-08-21 22:14:14.000000000 +0100
@@ -160,7 +160,7 @@ sub list_eq ($$) {
{
- # test exceptions
+ print "# test exceptions\n";
my $x;
eval { $x = unpack 'w', pack 'C*', 0xff, 0xff};
like($@, qr/^Unterminated compressed integer/);
@@ -225,8 +225,7 @@ sub list_eq ($$) {
}
-#
-# test the "p" template
+print "# test the 'p' template\n";
# literals
is(unpack("p",pack("p","foo")), "foo");
@@ -255,8 +254,8 @@ like(pack("p", undef), qr/^\0+/);
# see #ifdef __osf__ in pp.c pp_unpack
is((unpack("i",pack("i",-1))), -1);
-# test the pack lengths of s S i I l L
-# test the pack lengths of n N v V
+print "# test the pack lengths of s S i I l L n N v V\n";
+
my @lengths = qw(s 2 S 2 i -4 I -4 l 4 L 4 n 2 N 4 v 2 V 4);
while (my ($format, $expect) = splice @lengths, 0, 2) {
my $len = length(pack($format, 0));
@@ -270,7 +269,8 @@ while (my ($format, $expect) = splice @l
}
-# test unpack-pack lengths
+print "# test unpack-pack lengths\n";
+
my @templates = qw(c C i I s S l L n N v V f d q Q);
foreach my $t (@templates) {
@@ -367,7 +367,7 @@ foreach (
}
}
-# packing native shorts/ints/longs
+print "# packing native shorts/ints/longs\n";
is(length(pack("s!", 0)), $Config{shortsize});
is(length(pack("i!", 0)), $Config{intsize});
@@ -389,6 +389,7 @@ sub numbers_with_total {
$total += $_;
}
}
+ print "# numbers test for $format\n";
foreach (@_) {
SKIP: {
my $out = eval {unpack($format, pack($format, $_))};
@@ -522,7 +523,7 @@ numbers_with_total ('Q', sub {
0, 1,9223372036854775807, 9223372036854775808,
18446744073709551615);
-# pack nvNV byteorders
+print "# pack nvNV byteorders\n";
is(pack("n", 0xdead), "\xde\xad");
is(pack("v", 0xdead), "\xad\xde"); |
From @nwc10On Wed, Aug 20, 2003 at 01:11:36PM -0000, Alain wrote:
Do you know which line this is? I infer that it's in &numbers_with_total 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 And there's more than one division in there. Nicholas Clark |
From alian@cpan.org
not ok 187
Yes but there is only one that cause trouble here. I submit a patch to http://nntp.x.perl.org/group/perl.perl5.porters/80600 |
From alian@cpan.orgNicholas Clark (via RT) wrote:
Result of your patch of pack test: |
From @nwc10On Sat, Aug 23, 2003 at 01:10:02PM +0200, alian wrote:
Thanks. Looks like the perl arithmetic is going wrong earlier. It seems that my $max = 1 + 2 * (int (2 ** ($len-1))-1); # The max possible checksum Could you try runing this (with 53 as @ARGV) and see what it prints? use Devel::Peek; foreach my $len (@ARGV) { Dump $max; I see: $ perl sparcmax.pl 53 Thanks Nicholas Clark |
From alian@cpan.org
Two try, one with perl-5.8.0, one with blead: centaure:~/soft/perl-current$ ./perl -Ilib -Iext ~/sparcmax.pl 53 centaure:~/soft/perl-current$ perl ~/sparcmax.pl 53 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 Complete documentation for Perl, including FAQ lists, should be found on |
From @nwc10On Sat, Aug 23, 2003 at 05:59:28PM +0200, alian wrote:
Er. That was silly of me. That was 5.6.1. With patchlevel 20858 I see: Length 53: (Debian sparc. Shouldn't be any different from Debian anything else, but
I take it that this is blead:
And this is the installed 5.8.0
Mmmm. That arithmetic has gone very wrong. What happens if you run this use Devel::Peek; foreach my $len (@ARGV) { my $max_p1 = $max + 1; Dump $max; Nicholas Clark |
From alian@cpan.orgI can give you ssh access to this/my host/lan if you want. You will find
centaure:~/soft/perl-current$ ./perl -Ilib -Iext ~/sparcmax2.pl 53 |
From alian@cpan.org
my debian sparc pass this test on linux with blead: The failure on ext/IO/t/io_multihomed.t is just a timeout. (limited to |
From @nwc10On Sat, Aug 23, 2003 at 06:43:59PM +0200, alian wrote:
oooh. and the sparc openbsd machine.
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 Nicholas Clark |
From alian@cpan.org
Yep. The-machine-who-hang-one-smoke-on-15-and-I-don't-know-why.
I really don't know what is it. Only one thing: this is something Always 2 tests: one with 5.8.0, one with blead: centaure:~/soft/perl-current$ perl -MDevel::Peek -le '$a = int (2**52); SV = PVNV(0x1500a0) at 0x12de3c centaure:~/soft/perl-current$ ./perl -Ilib -Iext -MDevel::Peek -le '$a = SV = PVNV(0x172c68) at 0x14cd10 |
From @nwc10On Sat, Aug 23, 2003 at 10:25:37PM +0200, alian wrote:
I'm afraid that I couldn't work out how to make the test smoke viewer 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 |
From alian@cpan.org
Go to "filter" page.
If you browse "last failures" page with these filters, you will find |
From @nwc10I think that the appended patch to t/op/int.t will fail on netbsd until On Sat, Aug 23, 2003 at 10:25:37PM +0200, alian wrote:
Could you try the attached patch, which should back out the change to pp.c Nicholas Clark Inline Patch--- 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"
+} |
From @nwc10380-370.patch--- pp.c#380 Sun Aug 24 14:13:50 2003
+++ pp.c#379 Sun Aug 24 14:15:21 2003
@@ -1,4 +1,4 @@
-//depot/perl/pp.c#380 - edit change 19218 (text)
+//depot/perl/pp.c#379 - edit change 19163 (text)
/* pp.c
*
* Copyright (c) 1991-2003, Larry Wall
@@ -2891,14 +2891,24 @@ PP(pp_int)
SETu(U_V(value));
} else {
#if defined(SPARC64_MODF_WORKAROUND)
- (void)sparc64_workaround_modf(value, &value);
-#elif defined(HAS_MODFL_POW32_BUG)
-/* some versions of glibc split (i + d) into (i-1, d+1) for 2^32 <= i < 2^64 */
- NV offset = Perl_modf(value, &value);
- (void)Perl_modf(offset, &offset);
- value += offset;
+ (void)sparc64_workaround_modf(value, &value);
#else
- (void)Perl_modf(value, &value);
+# if defined(HAS_MODFL) || defined(LONG_DOUBLE_EQUALS_DOUBLE)
+# ifdef HAS_MODFL_POW32_BUG
+/* some versions of glibc split (i + d) into (i-1, d+1) for 2^32 <= i < 2^64 */
+ {
+ NV offset = Perl_modf(value, &value);
+ (void)Perl_modf(offset, &offset);
+ value += offset;
+ }
+# else
+ (void)Perl_modf(value, &value);
+# endif
+# else
+ double tmp = (double)value;
+ (void)Perl_modf(tmp, &tmp);
+ value = (NV)tmp;
+# endif
#endif
SETn(value);
}
@@ -2907,17 +2917,24 @@ PP(pp_int)
if (value > (NV)IV_MIN - 0.5) {
SETi(I_V(value));
} else {
-#if defined(SPARC64_MODF_WORKAROUND)
- (void)sparc64_workaround_modf(-value, &value);
-#elif defined(HAS_MODFL_POW32_BUG)
+#if defined(HAS_MODFL) || defined(LONG_DOUBLE_EQUALS_DOUBLE)
+# ifdef HAS_MODFL_POW32_BUG
/* some versions of glibc split (i + d) into (i-1, d+1) for 2^32 <= i < 2^64 */
- NV offset = Perl_modf(-value, &value);
- (void)Perl_modf(offset, &offset);
- value += offset;
-#else
+ {
+ NV offset = Perl_modf(-value, &value);
+ (void)Perl_modf(offset, &offset);
+ value += offset;
+ }
+# else
(void)Perl_modf(-value, &value);
+# endif
+ value = -value;
+#else
+ double tmp = (double)value;
+ (void)Perl_modf(-tmp, &tmp);
+ value = -(NV)tmp;
#endif
- SETn(-value);
+ SETn(value);
}
}
}
|
From @smpetersOn Sun Aug 24 07:58:08 2003, nicholas wrote:
Six years without a response from the original poster. This bug is stalled. Steve |
@smpeters - Status changed from 'open' to 'stalled' |
10-1/2 years more without a response. Closing. |
Migrated from rt.perl.org#23463 (status was 'stalled')
Searchable as RT23463$
The text was updated successfully, but these errors were encountered: