Skip Menu |

This queue is for tickets about the String-CRC-Cksum CPAN distribution.

Report information
The Basics
Id: 6692
Status: resolved
Priority: 0/
Queue: String-CRC-Cksum

People
Owner: Nobody in particular
Requestors: manfred.schubert [...] chello.at
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: (no value)
Fixed in: (no value)



Subject: CRC32 failed to : make test
Hallo! Unfortunately I have no idea, why this version would nor work. (it did not pass the test on OSX either (perl 5.8.3) ------------------------------------------------------------- perl:This is perl, v5.8.0 built for alpha-dec_osf machine:OSF1 acas09 V5.1 2650 alpha OS: TRUE64 schubert@acas09:/home/schubert/String-CRC-Cksum-0.03> make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/1....Use of uninitialized value in bitwise xor (^) at /home/schubert/String-CRC-Cksum-0.03/blib/lib/String/CRC/Cksum.pm line 73, <DATA> line 12. Use of uninitialized value in bitwise xor (^) at /home/schubert/String-CRC-Cksum-0.03/blib/lib/String/CRC/Cksum.pm line 73, <DATA> line 12. Use of uninitialized value in bitwise xor (^) at /home/schubert/String-CRC-Cksum-0.03/blib/lib/String/CRC/Cksum.pm line 73, <DATA> line 12. Use of uninitialized value in bitwise xor (^) at /home/schubert/String-CRC-Cksum-0.03/blib/lib/String/CRC/Cksum.pm line 73, <DATA> line 12. Us Use of uninitialized value in bitwise xor (^) at /home/schubert/String-CRC-Cksum-0.03/blib/lib/String/CRC/Cksum.pm line 114, <DATA> line 12. Use of uninitialized value in bitwise xor (^) at /home/schubert/String-CRC-Cksum-0.03/blib/lib/String/CRC/Cksum.pm line 114, <DATA> line 12. t/1....NOK 8# Failed test (t/1.t at line 69) Use of uninitialized value in bitwise xor (^) at /home/schubert/String-CRC-Cksum-0.03/blib/lib/String/CRC/Cksum.pm line 73. Use of uninitialized value in bitwise xor (^) at /home/schubert/String-CRC-Cksum-0.03/blib/lib/String/CRC/Cksum.pm line 73. Use of uninitialized value in bitwise xor (^) at /home/schubert/String-CRC-Cksum-0.03/blib/lib/String/CRC/Cksum.pm line 73. # Failed test (t/1.t at line 74) # Looks like you failed 7 tests of 10. t/1....dubious Test returned status 7 (wstat 1792, 0x700) DIED. FAILED tests 3-5, 7-10 Failed 7/10 tests, 30.00% okay Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------------- t/1.t 7 1792 10 7 70.00% 3-5 7-10 Failed 1/1 test scripts, 0.00% okay. 7/10 subtests failed, 30.00% okay. *** Exit 2 Stop.
[guest - Mon Jun 21 06:57:43 2004]: Show quoted text
> Hallo! > > Unfortunately I have no idea, why this version would nor work. > (it did not pass the test on OSX either (perl 5.8.3) > ------------------------------------------------------------- > > perl:This is perl, v5.8.0 built for alpha-dec_osf > machine:OSF1 acas09 V5.1 2650 alpha > OS: TRUE64 > > schubert@acas09:/home/schubert/String-CRC-Cksum-0.03> make test
I know why - that's an old version !-) A few months ago, someone reported a problem with 64bit OS (might have been Alpha) so we dealt with it and the version number is now 0.90 since there's probably nothing more to do. Actually, an XS version of the module with the critical loop written in C would be desirable since this perl-only version is a few times slower than it could be. If you are using the module for light duties, then the performance is not an issue, but if you wish to checksum megabytes of data very quickly, then you'll probably be disappointed with the speed. If I do an XS version then I will probably add _XS to the name. I thought I put the new bundle onto CPAN but I cannot find it, so I might have to submit it again. I am also having trouble finding out how to make the module appear on the "All Modules" list - it's still not appearing. I'll e-mail you when I've downloaded the 0.90 bundle. Please contact me at ahamm@sanderson.net.au for further discussion. If you can e-mail just to let me know your address I will be able to notify you a little bit faster. Thanks for trying the module.
From: tim.stephens [...] motorola.com
On Wed Jun 23 20:48:39 2004, AHAMM wrote: Show quoted text
> [guest - Mon Jun 21 06:57:43 2004]: >
> > Hallo! > > > > Unfortunately I have no idea, why this version would nor work. > > (it did not pass the test on OSX either (perl 5.8.3) > > ------------------------------------------------------------- > > > > perl:This is perl, v5.8.0 built for alpha-dec_osf > > machine:OSF1 acas09 V5.1 2650 alpha > > OS: TRUE64 > > > > schubert@acas09:/home/schubert/String-CRC-Cksum-0.03> make test
> > I know why - that's an old version !-) > > A few months ago, someone reported a problem with 64bit OS (might have > been Alpha) so we dealt with it and the version number is now 0.90 > since there's probably nothing more to do. > > Actually, an XS version of the module with the critical loop written in > C would be desirable since this perl-only version is a few times slower > than it could be. If you are using the module for light duties, then > the performance is not an issue, but if you wish to checksum megabytes > of data very quickly, then you'll probably be disappointed with the > speed. If I do an XS version then I will probably add _XS to the name. > > I thought I put the new bundle onto CPAN but I cannot find it, so I > might have to submit it again. I am also having trouble finding out how > to make the module appear on the "All Modules" list - it's still not > appearing. > > I'll e-mail you when I've downloaded the 0.90 bundle. Please contact me > at ahamm@sanderson.net.au for further discussion. If you can e-mail > just to let me know your address I will be able to notify you a little > bit faster. > > Thanks for trying the module.
The attached patch should correct the problem. I emailed this to the author. -Tim
$ diff -u Cksum.pm ~/Cksum.pm --- Cksum.pm 2003-10-27 22:04:41.000000000 -0700 +++ /cygdrive/d/Profiles/mgi1634/My Documents/Cksum.pm 2007-03-29 11:21:35.4227 17800 -0700 @@ -70,7 +70,7 @@ for(my $i = 0; $i < $n; ++$i) { my $c = unpack 'C', substr $_[0], $i, 1; - $cksum = ($cksum << 8) ^ $crctab[($cksum >> 24) ^ $c]; + $cksum = ($cksum << 8) ^ $crctab[(($cksum >> 24) ^ $c) & 0xFF]; ++$size; } @@ -111,9 +111,9 @@ while($size != 0) { my $c = $size & 0377; $size >>= 8; - $cksum = ($cksum << 8) ^ $crctab[($cksum >> 24) ^ $c]; + $cksum = ($cksum << 8) ^ $crctab[(($cksum >> 24) ^ $c) & 0xFF]; } - $cksum = ~ $cksum; + $cksum = (~ $cksum) & 0xFFFFFFFF; no integer; my $crc = $cksum;
this is a replicant of the other bug report. all solved.