Open Quuxplusone opened 13 years ago
Attached GNUmakefile
(6296 bytes, application/octet-stream): Replacement Makefile (uses clang instead of gcc)
Forgot to add - it is sufficient that the file 'panama.cpp' be compiled with -O0; all the other files can be compiled with higher optimization levels, and the tests will still pass.
Even a not-so-reduced example that's a single file which can be compiled/run would be nice.
Please include the output of clang -v.
Hi Marshall,
I know you just *love* digging into Crypto++, but this bug report isn't
actionable as is, please reduce a testcase. Thanks!
Attached 9524-mtc.cpp
(1298 bytes, text/plain): Small program demonstrating the problem
Ok, here's a smaller test case.
To reproduce:
1) Build the cryptoPP library using the modified makefile that I originally
attached.
2) Build this program thusly:
clang++ 9524-mtc.cpp cryptopp/panama.cpp -DCRYPTOPP_DISABLE_ASM -I cryptopp cryptopp/libcryptopp.a -o 9524-mtc
3) Run it, and see no output. ;-)
4) Build again at -O2
clang++ 9524-mtc.cpp cryptopp/panama.cpp -DCRYPTOPP_DISABLE_ASM -I cryptopp cryptopp/libcryptopp.a -O2 -o 9524-mtc
5) Run again, and see failures.
$ ./9524-mtc
Digest test failed!
Expected: AA0CC954D757D7AC7779CA3342334CA471ABD47D5952AC91ED837ECD5B16922B
Got: 44EA5D0D580269214377E9DD29200B881BBBC762E4E9106E9CF8184B803322B7
Digest test failed!
Expected: 5F5CA355B90AC622B0AA7E654EF5F27E9E75111415B48B8AFE3ADD1C6B89CBA1
Got: EAD74CD9DF2DE0250D228F9D9D034B1A8BFCC13CC9032CCD8BC3A0F94F1AD9A9
[ This was done on a Mac Pro, running Mac OS X 10.6.7 ]
Note that when you build this program, one of the cryptoPP files gets
recompiled, too.
Attached 9524-v.txt
(3116 bytes, text/plain): Output from clang++ -v when building 9524-mtc.cpp
Attached 9524.o
(290108 bytes, application/x-object): Single file test case
This bug still exists with today's TOT.
GNUmakefile
(6296 bytes, application/octet-stream)9524-mtc.cpp
(1298 bytes, text/plain)9524-v.txt
(3116 bytes, text/plain)9524.o
(290108 bytes, application/x-object)