Debian Bug report logs - #517619
tthsum: bad BIG_ENDIAN test. wrong hashes on big-endian arch.

version graph

Package: tthsum; Maintainer for tthsum is Hector Oron <zumbi@debian.org>; Source for tthsum is src:tthsum.

Reported by: Alan Curry <pacman@kosh.dhis.org>

Date: Sat, 28 Feb 2009 22:00:02 UTC

Severity: important

Found in version tthsum/1.1.0-1

Fixed in version tthsum/1.3.1-1

Done: Hector Oron <zumbi@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, RISKO Gergely <risko@debian.org>:
Bug#517619; Package tthsum. (Sat, 28 Feb 2009 22:00:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Alan Curry <pacman@kosh.dhis.org>:
New Bug report received and forwarded. Copy sent to RISKO Gergely <risko@debian.org>. (Sat, 28 Feb 2009 22:00:05 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Alan Curry <pacman@kosh.dhis.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: tthsum: bad BIG_ENDIAN test. wrong hashes on big-endian arch.
Date: Sat, 28 Feb 2009 16:57:24 -0500
Package: tthsum
Version: 1.1.0-1
Severity: important


<endian.h> defines BIG_ENDIAN to 4321 and LITTLE_ENDIAN to 1234, then defines
BYTE_ORDER to one or the other. The correct way to test them is like
  #if BYTE_ORDER == BIG_ENDIAN
tthsum does some other crazy stuff with those macros, and compiles the wrong
code at least on ppc and probably others too.

Try tthsum /dev/null on various machines.
VHBBPL5M64JQVJTIGMJTFTMHVO3FDFFIJELTBNY is the wrong answer.
LWPNACQDBZRYXW3VHJVCJ64QBZNGHOHHHZWCLNQ is the right answer.
The wrong answer is what I get on Debian stable ppc.

-- System Information:
Debian Release: 5.0
  APT prefers stable
  APT policy: (99, 'stable')
Architecture: powerpc (ppc)

Kernel: Linux 2.6.28.2
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash

Versions of packages tthsum depends on:
ii  libc6                         2.7-18     GNU C Library: Shared libraries

tthsum recommends no packages.

tthsum suggests no packages.

-- no debconf information




Information forwarded to debian-bugs-dist@lists.debian.org, RISKO Gergely <risko@debian.org>:
Bug#517619; Package tthsum. (Thu, 09 Apr 2009 08:42:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Walter 'Wallie' Doekes" <walter@wjd.nu>:
Extra info received and forwarded to list. Copy sent to RISKO Gergely <risko@debian.org>. (Thu, 09 Apr 2009 08:42:02 GMT) Full text and rfc822 format available.

Message #10 received at 517619@bugs.debian.org (full text, mbox):

From: "Walter 'Wallie' Doekes" <walter@wjd.nu>
To: 517619@bugs.debian.org
Cc: walter@wjd.nu
Subject: accepted
Date: Thu, 9 Apr 2009 10:40:12 +0200 (CEST)
I've accepted your bug. I'll work on it as soon as I find some time. (I'll
also fix the broken -march-option, the unecessary double-EOF needed for
stdin input and some code cleanup.)




Information forwarded to debian-bugs-dist@lists.debian.org, RISKO Gergely <risko@debian.org>:
Bug#517619; Package tthsum. (Thu, 28 May 2009 23:39:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Walter 'Wallie' Doekes" <walter@wjd.nu>:
Extra info received and forwarded to list. Copy sent to RISKO Gergely <risko@debian.org>. (Thu, 28 May 2009 23:39:02 GMT) Full text and rfc822 format available.

Message #15 received at 517619@bugs.debian.org (full text, mbox):

From: "Walter 'Wallie' Doekes" <walter@wjd.nu>
To: 517619@bugs.debian.org
Cc: walter+tthsum@wjd.nu
Subject: tthsum 1.2.0 released
Date: Fri, 29 May 2009 01:37:27 +0200 (CEST)
Please try version 1.2.0 and see if it works for you:
http://tthsum.devs.nu/pkg/tthsum-1.2.0.tar.gz ( http://tthsum.devs.nu/ )

Any feedback is gladly accepted.

Cheers,
Walter Doekes




Information forwarded to debian-bugs-dist@lists.debian.org, RISKO Gergely <risko@debian.org>:
Bug#517619; Package tthsum. (Tue, 05 Oct 2010 11:15:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Hector Oron <hector.oron@gmail.com>:
Extra info received and forwarded to list. Copy sent to RISKO Gergely <risko@debian.org>. (Tue, 05 Oct 2010 11:15:03 GMT) Full text and rfc822 format available.

Message #20 received at 517619@bugs.debian.org (full text, mbox):

From: Hector Oron <hector.oron@gmail.com>
To: walter@wjd.nu
Cc: 517619@bugs.debian.org
Subject: tthsum: Little endian check fails on longs
Date: Tue, 5 Oct 2010 12:11:32 +0100
Hello,

  While trying to solve #598370, which seems to be related to tthsum.
I tried 1.2.0 version you posted, but I get a failure on little endian
test on `armel' (ARM EABI 32 bit Architecture)


(sid)zumbi@abel:~/tthsum-1.2.0$ make
gcc -DNDEBUG -D_FILE_OFFSET_BITS=64 -DUSE_TEXTS  -fomit-frame-pointer
-O3  -Wall  -c tthsum.c -o obj-unix/tthsum.o
gcc -DNDEBUG -D_FILE_OFFSET_BITS=64 -DUSE_TEXTS  -fomit-frame-pointer
-O3  -Wall  -c base32.c -o obj-unix/base32.o
gcc -DNDEBUG -D_FILE_OFFSET_BITS=64 -DUSE_TEXTS  -fomit-frame-pointer
-O3  -Wall  -c escape.c -o obj-unix/escape.o
gcc -DNDEBUG -D_FILE_OFFSET_BITS=64 -DUSE_TEXTS  -fomit-frame-pointer
-O3  -Wall  -c getopt.c -o obj-unix/getopt.o
gcc -DNDEBUG -D_FILE_OFFSET_BITS=64 -DUSE_TEXTS  -fomit-frame-pointer
-O3  -Wall  -c read.c -o obj-unix/read.o
gcc -DNDEBUG -D_FILE_OFFSET_BITS=64 -DUSE_TEXTS  -fomit-frame-pointer
-O3  -Wall  -c texts.c -o obj-unix/texts.o
gcc -DNDEBUG -D_FILE_OFFSET_BITS=64 -DUSE_TEXTS  -fomit-frame-pointer
-O3  -Wall  -c thex.c -o obj-unix/thex.o
gcc -DNDEBUG -D_FILE_OFFSET_BITS=64 -DUSE_TEXTS  -fomit-frame-pointer
-O3  -Wall  -c tiger.c -o obj-unix/tiger.o
gcc -DNDEBUG -D_FILE_OFFSET_BITS=64 -DUSE_TEXTS  -fomit-frame-pointer
-O3  -Wall  -c utf8.c -o obj-unix/utf8.o
gcc -DNDEBUG -D_FILE_OFFSET_BITS=64 -DUSE_TEXTS  -fomit-frame-pointer
-O3  -Wall  -c main.c -o obj-unix/main.o
gcc -O3 -Wall  obj-unix/tthsum.o obj-unix/base32.o obj-unix/escape.o
obj-unix/getopt.o obj-unix/read.o obj-unix/texts.o obj-unix/thex.o
obj-unix/tiger.o obj-unix/utf8.o obj-unix/main.o   -o obj-unix/tthsum
gzip -9 -c tthsum.1 > share/tthsum.1.gz
gcc -DNDEBUG -D_FILE_OFFSET_BITS=64 -DUSE_TEXTS  -fomit-frame-pointer
-O3  -Wall  -c test.c -o obj-unix/test.o
gcc -DNDEBUG -D_FILE_OFFSET_BITS=64 -DUSE_TEXTS  -fomit-frame-pointer
-O3  -Wall  -c base32_test.c -o obj-unix/base32_test.o
gcc -DNDEBUG -D_FILE_OFFSET_BITS=64 -DUSE_TEXTS  -fomit-frame-pointer
-O3  -Wall  -c endian_test.c -o obj-unix/endian_test.o
gcc -DNDEBUG -D_FILE_OFFSET_BITS=64 -DUSE_TEXTS  -fomit-frame-pointer
-O3  -Wall  -c escape_test.c -o obj-unix/escape_test.o
gcc -DNDEBUG -D_FILE_OFFSET_BITS=64 -DUSE_TEXTS  -fomit-frame-pointer
-O3  -Wall  -c getopt_test.c -o obj-unix/getopt_test.o
gcc -DNDEBUG -D_FILE_OFFSET_BITS=64 -DUSE_TEXTS  -fomit-frame-pointer
-O3  -Wall  -c read_test.c -o obj-unix/read_test.o
gcc -DNDEBUG -D_FILE_OFFSET_BITS=64 -DUSE_TEXTS  -fomit-frame-pointer
-O3  -Wall  -c texts_test.c -o obj-unix/texts_test.o
gcc -DNDEBUG -D_FILE_OFFSET_BITS=64 -DUSE_TEXTS  -fomit-frame-pointer
-O3  -Wall  -c thex_test.c -o obj-unix/thex_test.o
gcc -DNDEBUG -D_FILE_OFFSET_BITS=64 -DUSE_TEXTS  -fomit-frame-pointer
-O3  -Wall  -c tiger_test.c -o obj-unix/tiger_test.o
gcc -DNDEBUG -D_FILE_OFFSET_BITS=64 -DUSE_TEXTS  -fomit-frame-pointer
-O3  -Wall  -c types_test.c -o obj-unix/types_test.o
gcc -DNDEBUG -D_FILE_OFFSET_BITS=64 -DUSE_TEXTS  -fomit-frame-pointer
-O3  -Wall  -c utf8_test.c -o obj-unix/utf8_test.o
gcc -O3 -Wall  obj-unix/test.o obj-unix/base32.o obj-unix/escape.o
obj-unix/getopt.o obj-unix/read.o obj-unix/texts.o obj-unix/thex.o
obj-unix/tiger.o obj-unix/tthsum.o obj-unix/utf8.o
obj-unix/base32_test.o obj-unix/endian_test.o obj-unix/escape_test.o
obj-unix/getopt_test.o obj-unix/read_test.o obj-unix/texts_test.o
obj-unix/thex_test.o obj-unix/tiger_test.o obj-unix/types_test.o
obj-unix/utf8_test.o   -o obj-unix/test
obj-unix/test
============================================
  RUNNING TESTS
--------------------------------------------
  Language
--------------------------------------------
>>> endian_test.c:90: Little endian check fails on longs
+ endian_test: ...F.
+ types_test: ....
--------------------------------------------
  Util
--------------------------------------------
+ base32_test: .......
+ escape_test: ......
+ getopt_test: ...
+ read_test: ...
+ utf8_test: ........
--------------------------------------------
  App
--------------------------------------------
+ texts_test: ...
+ tiger_test: ...
+ thex_test: .
--------------------------------------------
  Tests completed: 42 succeeded, 1 failed
============================================
make: *** [runtest] Error 1

I have also seen 1.2.1 release on site, which gives me (also on armel):

(sid)zumbi@abel:~/tthsum-1.2.1$ make
gcc -DNDEBUG -D_FILE_OFFSET_BITS=64 -DUSE_TEXTS  -march=native -O3
-Wall  -c tthsum.c -o obj-unix/tthsum.o
tthsum.c:1: error: bad value (native) for -march= switch
make: *** [obj-unix/tthsum.o] Error 1

Tweaking Makefile for -DNDEBUG -D_FILE_OFFSET_BITS=32 and also,
replacing "-march=native -O3"  by "-O2" fails on the same test.

Please see https://sourceforge.net/tracker/?func=detail&atid=897767&aid=3077470&group_id=181579

Best regards,
-- 
 Héctor Orón

"Our Sun unleashes tremendous flares expelling hot gas into the Solar
System, which one day will disconnect us."

-- Day DVB-T stop working nicely
Video flare: http://antwrp.gsfc.nasa.gov/apod/ap100510.html




Information forwarded to debian-bugs-dist@lists.debian.org, RISKO Gergely <risko@debian.org>:
Bug#517619; Package tthsum. (Tue, 05 Oct 2010 13:09:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Walter 'Wallie' Doekes" <walter@wjd.nu>:
Extra info received and forwarded to list. Copy sent to RISKO Gergely <risko@debian.org>. (Tue, 05 Oct 2010 13:09:03 GMT) Full text and rfc822 format available.

Message #25 received at 517619@bugs.debian.org (full text, mbox):

From: "Walter 'Wallie' Doekes" <walter@wjd.nu>
To: "Hector Oron" <hector.oron@gmail.com>
Cc: 517619@bugs.debian.org, walter+tthsum@wjd.nu
Subject: Re: tthsum: Little endian check fails on longs
Date: Tue, 5 Oct 2010 14:59:12 +0200 (CEST)
Hi Hector,

you're reporting three problems.

Problem #1:

>   While trying to solve #598370, which seems to be related to tthsum.
> I tried 1.2.0 version you posted, but I get a failure on little endian
> test on `armel' (ARM EABI 32 bit Architecture)

tthsum-1.0 was once upon a time based on the code from DC++ and was
therefore written in C++. tthsum-1.1 was mostly rewritten from scratch,
using the reference tiger.c implementation. It should bear little
resemblance to the DC++ original (as used in valknut/dclib).

I find it odd that the tiger_test and thex_test found in tthsum-1.2 would
return OK while the tthsum on dclib-0.3.23.tar.bz2 returns something other
than BRNGRD2NBXBLCJHRE27KNGK4CDFTTB65MNZIXHI. Did you really use
tthsum-1.2+ there? (Ok, the thex_test is limited to four very short bits
of data, so it's possible your problem is not caught.)


Problem #2:

> (sid)zumbi@abel:~/tthsum-1.2.0$ make
> gcc -DNDEBUG -D_FILE_OFFSET_BITS=64 -DUSE_TEXTS  -fomit-frame-pointer
> -O3  -Wall  -c tthsum.c -o obj-unix/tthsum.o
...
>>>> endian_test.c:90: Little endian check fails on longs
> + endian_test: ...F.
...
> + tiger_test: ...
> + thex_test: .

I would not expect a long to not be 32 bits on your ARM. Either that, or
the (char) is unsigned and the test fails for that reason.

In any case. The test is broken. Assuming that a long is 32-bits is wrong.
Removing the bad test fixes this problem :)


Problem #3:

> I have also seen 1.2.1 release on site, which gives me (also on armel):
>
> (sid)zumbi@abel:~/tthsum-1.2.1$ make
> gcc -DNDEBUG -D_FILE_OFFSET_BITS=64 -DUSE_TEXTS  -march=native -O3
> -Wall  -c tthsum.c -o obj-unix/tthsum.o
> tthsum.c:1: error: bad value (native) for -march= switch
> make: *** [obj-unix/tthsum.o] Error 1
>
> Tweaking Makefile for -DNDEBUG -D_FILE_OFFSET_BITS=32 and also,
> replacing "-march=native -O3"  by "-O2" fails on the same test.

Okay. This just means that the -march= native flag is not supported on
your gcc. Removing it from the Makefile is all there is to it.


Followup:

If you were using tthsum 1.2+ when you got the tthsum mismatch on
dclib-0.3.23.tar.bz2, please try
http://tthsum.devs.nu/pkg/hector517619.patch and report whether it gives
errors on the thex_test.


Regards,
Walter Doekes




Information forwarded to debian-bugs-dist@lists.debian.org, RISKO Gergely <risko@debian.org>:
Bug#517619; Package tthsum. (Tue, 05 Oct 2010 13:33:10 GMT) Full text and rfc822 format available.

Acknowledgement sent to Hector Oron <hector.oron@gmail.com>:
Extra info received and forwarded to list. Copy sent to RISKO Gergely <risko@debian.org>. (Tue, 05 Oct 2010 13:33:10 GMT) Full text and rfc822 format available.

Message #30 received at 517619@bugs.debian.org (full text, mbox):

From: Hector Oron <hector.oron@gmail.com>
To: "Walter 'Wallie' Doekes" <walter@wjd.nu>
Cc: 517619@bugs.debian.org, walter+tthsum@wjd.nu
Subject: Re: tthsum: Little endian check fails on longs
Date: Tue, 5 Oct 2010 14:28:50 +0100
Hello,

> Problem #1:
>
>>   While trying to solve #598370, which seems to be related to tthsum.
>> I tried 1.2.0 version you posted, but I get a failure on little endian
>> test on `armel' (ARM EABI 32 bit Architecture)
>
> tthsum-1.0 was once upon a time based on the code from DC++ and was
> therefore written in C++. tthsum-1.1 was mostly rewritten from scratch,
> using the reference tiger.c implementation. It should bear little
> resemblance to the DC++ original (as used in valknut/dclib).
>
> I find it odd that the tiger_test and thex_test found in tthsum-1.2 would
> return OK while the tthsum on dclib-0.3.23.tar.bz2 returns something other
> than BRNGRD2NBXBLCJHRE27KNGK4CDFTTB65MNZIXHI. Did you really use
> tthsum-1.2+ there? (Ok, the thex_test is limited to four very short bits
> of data, so it's possible your problem is not caught.)

No, I used tthsum version found in Debian (1.1.0-1) for libdc0 build
failure. Trying to find out wht was wrong brought me to tthsum checks
on 1.2.0 and 1.2.1, which I reported previously. I also did a check on
/dev/null which both systems (x86 and ARM) matched, but not when
trying the tarballs on any tthsum version.

> Problem #2:
>
>> (sid)zumbi@abel:~/tthsum-1.2.0$ make
>> gcc -DNDEBUG -D_FILE_OFFSET_BITS=64 -DUSE_TEXTS  -fomit-frame-pointer
>> -O3  -Wall  -c tthsum.c -o obj-unix/tthsum.o
> ...
>>>>> endian_test.c:90: Little endian check fails on longs
>> + endian_test: ...F.
> ...
>> + tiger_test: ...
>> + thex_test: .
>
> I would not expect a long to not be 32 bits on your ARM. Either that, or
> the (char) is unsigned and the test fails for that reason.

Yes, all (char) must be unsigned in ARM hardware.

(sid)zumbi@abel:~$ cat test.c
#include <stdio.h>
int main(void)
{
   char i = -1;
    printf("%d\n", i);
    return 0;
}
(sid)zumbi@abel:~$ gcc -o test test.c
(sid)zumbi@abel:~$ ./test
255

See http://www.arm.linux.org.uk/docs/faqs/signedchar.php

> In any case. The test is broken. Assuming that a long is 32-bits is wrong.
> Removing the bad test fixes this problem :)
>
>
> Problem #3:
>
>> I have also seen 1.2.1 release on site, which gives me (also on armel):
>>
>> (sid)zumbi@abel:~/tthsum-1.2.1$ make
>> gcc -DNDEBUG -D_FILE_OFFSET_BITS=64 -DUSE_TEXTS  -march=native -O3
>> -Wall  -c tthsum.c -o obj-unix/tthsum.o
>> tthsum.c:1: error: bad value (native) for -march= switch
>> make: *** [obj-unix/tthsum.o] Error 1
>>
>> Tweaking Makefile for -DNDEBUG -D_FILE_OFFSET_BITS=32 and also,
>> replacing "-march=native -O3"  by "-O2" fails on the same test.
>
> Okay. This just means that the -march= native flag is not supported on
> your gcc. Removing it from the Makefile is all there is to it.
>
>
> Followup:
>
> If you were using tthsum 1.2+ when you got the tthsum mismatch on
> dclib-0.3.23.tar.bz2, please try
> http://tthsum.devs.nu/pkg/hector517619.patch and report whether it gives
> errors on the thex_test.

(sid)zumbi@abel:~/tthsum-1.2.1$ patch -p0 < ../hector517619.patch
patching file thex_test.c
patching file endian_test.c
(sid)zumbi@abel:~/tthsum-1.2.1$ make
gcc -DNDEBUG -D_FILE_OFFSET_BITS=64 -DUSE_TEXTS  -march=native -O3
-Wall  -c endian_test.c -o obj-unix/endian_test.o
endian_test.c:1: error: bad value (native) for -march= switch
make: *** [obj-unix/endian_test.o] Error 1
(sid)zumbi@abel:~/tthsum-1.2.1$ vi Makefile
(sid)zumbi@abel:~/tthsum-1.2.1$ make
gcc -DNDEBUG -D_FILE_OFFSET_BITS=64 -DUSE_TEXTS  -O3  -Wall  -c
endian_test.c -o obj-unix/endian_test.o
gcc -DNDEBUG -D_FILE_OFFSET_BITS=64 -DUSE_TEXTS  -O3  -Wall  -c
thex_test.c -o obj-unix/thex_test.o
gcc -O3 -Wall  obj-unix/test.o obj-unix/base32.o obj-unix/escape.o
obj-unix/getopt.o obj-unix/read.o obj-unix/texts.o obj-unix/thex.o
obj-unix/tiger.o obj-unix/tthsum.o obj-unix/utf8.o
obj-unix/base32_test.o obj-unix/endian_test.o obj-unix/escape_test.o
obj-unix/getopt_test.o obj-unix/read_test.o obj-unix/texts_test.o
obj-unix/thex_test.o obj-unix/tiger_test.o obj-unix/types_test.o
obj-unix/utf8_test.o   -o obj-unix/test
obj-unix/test
============================================
  RUNNING TESTS
--------------------------------------------
  Language
--------------------------------------------
+ endian_test: .....
+ types_test: ....
--------------------------------------------
  Util
--------------------------------------------
+ base32_test: .......
+ escape_test: ......
+ getopt_test: ...
+ read_test: ...
+ utf8_test: ........
--------------------------------------------
  App
--------------------------------------------
+ texts_test: ...
+ tiger_test: ...
>>> thex_test.c:52: memcmp: mismatch on YWCGBHG5J26IDNFH3M55MR7674GYLSBXBWITCZA != LAVDEGOBOQOJSI5WHYARNNDIVO2NK7XPLNG5UVY: 582k3219m1741.9923l63o011.l468kll4n.7oop5l4nnk57
>>> thex_test.c:52: memcmp: mismatch on OQMPMBCCCTSJJSKNO3FGFZX4T636THZB57UT7HI != 2U6ZRJMXBSWPUUW2UD3HWPNMTJOHV2NEC2GLRVY: n53n98k5970mkmpk52nkk0p67l3nk..k5m7ko9k4168ml8n7
+ thex_test: .F
--------------------------------------------
  Tests completed: 43 succeeded, 1 failed
============================================
make: *** [runtest] Error 1


Looks like to me that this is related to signed/unsigned (char) matter.

Best regards,
-- 
 Héctor Orón

"Our Sun unleashes tremendous flares expelling hot gas into the Solar
System, which one day will disconnect us."

-- Day DVB-T stop working nicely
Video flare: http://antwrp.gsfc.nasa.gov/apod/ap100510.html




Information forwarded to debian-bugs-dist@lists.debian.org, RISKO Gergely <risko@debian.org>:
Bug#517619; Package tthsum. (Tue, 05 Oct 2010 15:39:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Walter 'Wallie' Doekes" <walter@wjd.nu>:
Extra info received and forwarded to list. Copy sent to RISKO Gergely <risko@debian.org>. (Tue, 05 Oct 2010 15:39:06 GMT) Full text and rfc822 format available.

Message #35 received at 517619@bugs.debian.org (full text, mbox):

From: "Walter 'Wallie' Doekes" <walter@wjd.nu>
To: "Hector Oron" <hector.oron@gmail.com>
Cc: "Walter 'Wallie' Doekes" <walter@wjd.nu>, 517619@bugs.debian.org
Subject: Re: tthsum: Little endian check fails on longs
Date: Tue, 5 Oct 2010 17:37:02 +0200 (CEST)
Hi,

> Do you mind if we CC to 517619@bugs.debian.org next time?

No I don't.

>> I have a couple of more tests you can try (append to the already patched
>> tthsum).
>>
>> http://tthsum.devs.nu/pkg/hector517619-2.patch
>
> It does not cleanly apply... but...

Oh, yes, I must've converted some tabs to spaces by accident.

> + tiger_test: ...
>>>> thex_test.c:52: memcmp: mismatch on
>>>> YWCGBHG5J26IDNFH3M55MR7674GYLSBXBWITCZA !=
>>>> LAVDEGOBOQOJSI5WHYARNNDIVO2NK7XPLNG5UVY:
>>>> 582k3219m1741.9923l63o011.l468kll4n.7oop5l4nnk57
>>>> thex_test.c:52: memcmp: mismatch on
>>>> OQMPMBCCCTSJJSKNO3FGFZX4T636THZB57UT7HI !=
>>>> 2U6ZRJMXBSWPUUW2UD3HWPNMTJOHV2NEC2GLRVY:
>>>> n53n98k5970mkmpk52nkk0p67l3nk..k5m7ko9k4168ml8n7

Above are the two failing tests from last time.

Here the tests start failing already when j (buffer size) hits 128.

>>>> thex_test.c:52: memcmp: mismatch on
>>>> X5C3YFVGM3EBIMALD7KQECMIFYHY6DZWJ24WHDI !=
>>>> 4677QGRJAEKBBQ5PAUWJ7TFRM5JZPWBV35777AA:
>>>> o7lpp8.k290114.0m3kp052m9pmml1675397n8.5np7ppp.0
...
they all fail
...
>>>> thex_test.c:52: memcmp: mismatch on
>>>> YVO7ZYXF2OBAKX33EL35FXUXXTLEFNK5N3BDAGQ !=
>>>> NWW2CWDTVTQWQJ27W5V5Y5APKAY4EA6F6VP7HIQ:
>>>> 6nk.k15873kmo168275pl76l.m740p5031m.03m5p55pp3k2
> + thex_test: .FF

.. up to the last, where j is 512k.

> Also -funsigned-char and -fsigned-char in the Makefile fails with same as
> above.

As expected.

> As a cosmetic thing, I am getting this warning:
> gcc -DNDEBUG -D_FILE_OFFSET_BITS=64 -DUSE_TEXTS  -funsigned-char
> -fomit-frame-pointer -O3  -Wall  -c thex_test.c -o
> obj-unix/thex_test.o
> thex_test.c: In function ‘test_longer_hashes’:
> thex_test.c:130: warning: left-hand operand of comma expression has no
> effect

Yes. That should've been "i < 20 || j <= buflen". 't was redundant, so it
didn't matter.


I'll try and think of something more to test in due time.


Regards,
Walter




Information forwarded to debian-bugs-dist@lists.debian.org, RISKO Gergely <risko@debian.org>:
Bug#517619; Package tthsum. (Fri, 08 Oct 2010 07:27:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Walter 'Wallie' Doekes" <walter@wjd.nu>:
Extra info received and forwarded to list. Copy sent to RISKO Gergely <risko@debian.org>. (Fri, 08 Oct 2010 07:27:07 GMT) Full text and rfc822 format available.

Message #40 received at 517619@bugs.debian.org (full text, mbox):

From: "Walter 'Wallie' Doekes" <walter@wjd.nu>
To: "Hector Oron" <hector.oron@gmail.com>
Cc: walter+tthsum@wjd.nu, 517619@bugs.debian.org
Subject: Re: Bug#517619: tthsum: Little endian check fails on longs
Date: Fri, 8 Oct 2010 09:24:29 +0200 (CEST)
Hi,

> I'll try and think of something more to test in due time.

Hah. I do spot an error in the BIG_ENDIAN code, I believe. But that
doesn't help you at all.

I'm still at a loss about what could cause the failures. And unfortunately
I do not have access to any ARM machines to debug this properly.


Regards,
Walter


For the record, a bug in the big endian code:

Index: thex.c
===================================================================
--- thex.c	(revision 91)
+++ thex.c	(working copy)
@@ -97,7 +97,7 @@
 		pos -= 3;
 		for (j = 0; j < 2*3*8; ++j)
 		    temp[j ^ 7] = ((uint8_t*)(data + pos))[j];
-		tiger_bp(0x01, &temp[0], 6 * sizeof(uint64_t), data);
+		tiger_bp(0x01, &temp[0], 6 * sizeof(uint64_t), data + pos);
 #else /* BYTE_ORDER != BIG_ENDIAN */
 		uint64_t temp[3];
 		pos -= 3;
@@ -137,7 +137,7 @@
 	    pos -= 3;
 	    for (j = 0; j < 2*3*8; ++j)
 		temp[j ^ 7] = ((const uint8_t*)(data + pos))[j];
-	    tiger_bp(0x01, &temp[0], 6 * sizeof(uint64_t), data);
+	    tiger_bp(0x01, &temp[0], 6 * sizeof(uint64_t), data + pos);
 #else /* BYTE_ORDER != BIG_ENDIAN */
 	    uint64_t temp[3];
 	    pos -= 3;







Reply sent to Hector Oron <zumbi@debian.org>:
You have taken responsibility. (Wed, 07 Mar 2012 03:06:03 GMT) Full text and rfc822 format available.

Notification sent to Alan Curry <pacman@kosh.dhis.org>:
Bug acknowledged by developer. (Wed, 07 Mar 2012 03:06:04 GMT) Full text and rfc822 format available.

Message #45 received at 517619-close@bugs.debian.org (full text, mbox):

From: Hector Oron <zumbi@debian.org>
To: 517619-close@bugs.debian.org
Subject: Bug#517619: fixed in tthsum 1.3.1-1
Date: Wed, 07 Mar 2012 03:03:31 +0000
Source: tthsum
Source-Version: 1.3.1-1

We believe that the bug you reported is fixed in the latest version of
tthsum, which is due to be installed in the Debian FTP archive:

tthsum_1.3.1-1.diff.gz
  to main/t/tthsum/tthsum_1.3.1-1.diff.gz
tthsum_1.3.1-1.dsc
  to main/t/tthsum/tthsum_1.3.1-1.dsc
tthsum_1.3.1-1_armel.deb
  to main/t/tthsum/tthsum_1.3.1-1_armel.deb
tthsum_1.3.1.orig.tar.gz
  to main/t/tthsum/tthsum_1.3.1.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 517619@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Hector Oron <zumbi@debian.org> (supplier of updated tthsum package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Mon, 05 Mar 2012 01:24:01 +0000
Source: tthsum
Binary: tthsum
Architecture: source armel
Version: 1.3.1-1
Distribution: unstable
Urgency: low
Maintainer: Hector Oron <zumbi@debian.org>
Changed-By: Hector Oron <zumbi@debian.org>
Description: 
 tthsum     - generates or checks TTH message digests
Closes: 517619 599173 644895
Changes: 
 tthsum (1.3.1-1) unstable; urgency=low
 .
   * New upstream release (Closes: #644895, #517619, #599173)
     - Fix buffer overrun in tiger tests. Reported by Edward Sheldrake.
     - Force alignment on platforms that need it using a compile-time test. Thanks
       go out to pavelch for providing failing test cases and to Zoiah for lending
       me an ARM ;-)
       (I added a minimal autoconf.c as a faster alternative to proper autconf.)
     - Fix a rather serious problem with the big endian code. Non-trivial files over
       1024 bytes would not have had proper hashes calculated. (Debian bug #517619)
     - New test cases and tweaks to existing tests.
     - Fix so compilation with -ansi works.
     - Fix another problem with alignment on an ARM with -O3 optimization. Thanks
       Hector Oron for hooking me up with access to the debian ARM box.
     - Fix problems with debian packaging. (Debian bug #599173 and CPPFLAGS
       override.)
     - Minor code and build system cleanup.
     - Changed -p output to print percentages instead of MiB counts.
     - Base32 decoding errors did not generate a valid error message. (Error code
       0 conflicted with SUCCESS.)
     - Fixed that ctrlesctostr accepted strange BASE36 escape sequences.
     - Made getopt for Windows more compatible with POSIX getopt.
     - Fixed that including the tthsum specific texts.c is optional.
     - Changed some header inclusions to be more compliant with C specs and made
       the source a bit more strict (ANSI C compatible, C++ compatible).
     - Added a test suite to detect stupid bugs at compile time. (Like the next
       bug.)
     - Endianness was not properly detected on various architectures (see debian
       bug 517619; thanks Alan Curry <pacman> for reporting).
     - Standardized UTF8 functions to behave as specified on Windows.
     - Corrected the need for a double EOF when reading from stdin.
     - Changed license from GPLv2 to GPLv3. Updated help texts (suggesting gmake
       on non-Linuxen, for instance).
     - Removed a bit of overhead on big endian platforms.
   * New maintainer.
   * Bump Standards-Version to 3.9.3
   * Bump debhelper compat version to 8
   * Add Homepage stanza
   * Add watch file
Checksums-Sha1: 
 3ec447170d16437d4608c130efb07742db7a4c26 1649 tthsum_1.3.1-1.dsc
 eb8aec9b9e47587332293baf3949a915e021d404 78989 tthsum_1.3.1.orig.tar.gz
 d688f5c066d7e2b7163b45fb174abe5592954425 2255 tthsum_1.3.1-1.diff.gz
 b0334f4a4b21eab5960c42c8296fda5e2170fa5d 35238 tthsum_1.3.1-1_armel.deb
Checksums-Sha256: 
 45f0d52b0f80a7b3dba7947dcc8a0e29a3d734e0cdb94c1f3232f034683fb6e5 1649 tthsum_1.3.1-1.dsc
 b141e585884144e90c4cc63872b0bfddc32db3d842a406d8b8a744db82736da5 78989 tthsum_1.3.1.orig.tar.gz
 88c7f0541455e80422ef1abc4a1f3f4f36cd2251c9d47e51e29ca887ba0f30c6 2255 tthsum_1.3.1-1.diff.gz
 e62db42074af6f916e81de815297684fce0eac22d97634a54693caaea1290f85 35238 tthsum_1.3.1-1_armel.deb
Files: 
 f2a82b13c1d36108b319a2035f8fc238 1649 utils optional tthsum_1.3.1-1.dsc
 b641a7cfc932a9515d33d10dfb60f5ff 78989 utils optional tthsum_1.3.1.orig.tar.gz
 b55b5c78f5e2cb3f17c41d66a70df0d4 2255 utils optional tthsum_1.3.1-1.diff.gz
 f8e6a74554a384d833976f4b5a5018a3 35238 utils optional tthsum_1.3.1-1_armel.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBCgAGBQJPVB1uAAoJEK8ig6p24qx7SeQP/3Ds3jsdan+v+tiGZgHDeccl
2Uh5sWJtdLyooYoXDAwgISj3LTleT9ieJvMbfEtansUrAOPbJJa0KHDTLY4rORIs
jaUE00cwbkVW47yhnkbXC+pQoLAvqecMUXtfYPSuLmf/YNancIbRjPHAhzeibXL7
uqMjy9d2/dzRSUNp/cnLMk2WrPPCLoI3B9V2Tw32Rk46n7HYf8hTUL6irk4oGsHE
OFv9X1kKCp+HeOhwHSh8VoM1lYVrI+S/K+YiIWGepbuM+ct6+A204FAWdarDQtYM
wsF2VbH5yfrd0TCm7tK3FxtLDzmsnsAKSkCsaYyvDfvWWzFIFGanjWqlypnV3BPz
NW3mQSuKj5vYT+yWe/t6lVGpvH4bXi08HE76tO0gqlzQFof5eRg17HraQi6e8x5z
AjNEGn2ls7Zx9N/R5gAS++QRAxoWKwMPPNE7h2XSAmc7S/RSCoVPTs+q7cFjaEyR
woQyWyPR52aO8EF6uks+BQ3B08mkl0zzspKyJ8K5AcWbx7McJUbT1hzNH1JfzX2j
mnqMjZ+qtlNLwbbmHHTMjQFdU2FnZEyMgmLIHzeatJIZv6ejvjs/K7D3tTESi83A
yvzqkk5fVmQbteTUuATA1SRuzoMSbSpnKFGMbdtZOeREUHa4SWhNFRecLezJdJD2
u20zBnOXByUiSVv317CV
=TNh4
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Mon, 03 Jun 2013 07:49:30 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Mon Apr 21 12:56:40 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.