Bug in sha512 digest with -march=native -mtune=native -m64

David Shaw dshaw at jabberwocky.com
Tue Jun 18 16:41:51 CEST 2013


On Jun 18, 2013, at 10:24 AM, Remko van der Vossen <wich at yuugen.jp> wrote:

> On Tue, Jun 18, 2013 at 09:44:37AM -0400, David Shaw wrote:
>> On Jun 18, 2013, at 9:36 AM, Remko van der Vossen <wich at yuugen.jp> wrote:
>> 
>> 
>>> On Tue, Jun 18, 2013 at 01:56:39PM +0200, Werner Koch wrote:
>>>> On Tue, 18 Jun 2013 11:48, wich at yuugen.jp said:
>>>> 
>>>>> Ah, apologies for the ommission. I'm using gnupg release 1.4.13.
>>>> 
>>>> "make check" does not fail?  In particular mds.test does a known answer
>>>> test.  Well, that test is pretty limited and could be extended.
>>> 
>>> The make check fails, 1 of 27 tests (mds) fails.
>> 
>> 
>> Interesting.  What does "grep CFLAGS Makefile" from your build directory return?  Also, what happens if you try and build with -O0 in your CFLAGS?
> 
> CFLAGS = -march=native -mtune=native -m64 -pipe -O3 -Wall -Wno-pointer-sign
> 
> When I compile with -march=native -mtune=native -m64 -pipe -O0 -Wall -Wno-pointer-sign the mds check passes.
> 
> However, when I compile with -march=k8 -fPIC -DPIC -pipe -O3 -Wall -Wno-pointer-sign everything is fine.

I've seen something like this once before.  That one turned out to be a compiler issue with -O greater than 2, coincidentally also breaking the hashing code (it was TIGER if I recall).  I'm not saying your problem is a compiler issue, but out of curiosity, what happens if you compile with -O2 ?

David




More information about the Gnupg-devel mailing list