Checksum calculation in tarfilter.pike on Linux/x86 broken.
Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=7057
Reported by @grubba
From Distmaker:
Building export Pike-v7.8.844-Linux-2.6.18-348.12.1.el5-i686 Finalizing: lib/master.pike.in Finalizing: lib/master.pike.in done CHECKSUM ERROR on input (got 0, expected 8859(021233? ))! 50 69 6b 65 2d 76 37 2e 38 2e 38 34 34 2d 4c 69 6e 75 78 2d 32 2e 36 2e 31 38 2d 33 34 38 2e 31 32 2e 31 2e 65 6c 35 2d 69 36 38 36 2e 64 69 72 2f 62 69 6e 2f 69 6e 73 74 61 6c 6c 2e 70 69 6b 65 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 30 30 30 30 36 36 34 00 30 30 31 31 36 32 31 00 30 30 31 31 36 32 31 00 30 30 30 30 30 32 33 35 34 30 36 00 31 32 32 34 33 34 31 34 34 36 31 00 20 20 20 20 20 20 20 20 30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 75 73 74 61 72 20 20 00 64 69 73 74 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 64 69 73 74 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 make: *** [bin_export] Error 1
*** pike.rhel5_x86 FAILED ***
The above seems to bre triggered from the following code fragment in bin/tarfilter.pike:
s=s[..147]+" "+s[156..];
if(`+(@values(s[..511])) != csum) {
werror("CHECKSUM ERROR on input (got %d, expected %d(%s))!\n",
`+(@values(s[..511])), csum, a[6]);
werror("%{ %{%02x %}\n%}", ({(((array)s)/16)[*]}));
exit(1);
}
Some simple checks in a working Pike give that the checksum in the file was correct:
Pike v7.8 release 481 running Hilfe v3.5 (Incremental Pike Frontend)
> 021233;
(1) Result: 8859
> string s = "50 69 6b 65 2d 76 37 2e 38 2e 38 34 34 2d 4c 696e 75 78 2d 32 2e 36 2e 31 38 2d 33 34 38 2e 3132 2e 31 2e 65 6c 35 2d 69 36 38 36 2e 64 69 72 2f 62 69 6e 2f 69 6e 73 74 61 6c 6c 2e 70 69 6b6530 30 30 30 36 36 34 00 30 30 31 3136 32 31 00 30 30 31 31 36 32 31 00 30 30 30 3030 32 33 35 34 30 36 00 31 32 32 34 33 34 31 3434 36 31 00 20 20 20 20 20 20 20 20 30 00 75 73 74 61 72 20 20 00 64 69 73 74 00 00 0000 00 00 00 00 00 00 00 00 64 69 73 74 00 00 00 " - " ";
> string s2 = Gmp.bignum(s, 16)->digits(256);
> s2;
(2) Result: "Pike-v7.8.844-Linux-2.6.18-348.12.1.el5-i686.dir/bin/install.pike0000664\0""0011621\0""0011621\0""00000235406\0""12243414461\0 0\0ustar \0dist\0\0\0\0\0\0\0\0\0\0\0\0dist\0\0\0"
> `+(0, @values(s2));
(3) Result: 8859
So a reasonable conclusion is that the splice operator is broken.