Successful test results with recent additions. Still need Windows Phone, WIndows Store and MinGW

7 views
Skip to first unread message

Jeffrey Walton

unread,
May 17, 2017, 11:53:51 AM5/17/17
to Crypto++ Users
Hi Everyone,

Initial testing of recent changes (variable block sizes, Kalyna and Threefish) completed successfully. It takes a couple of days for ARM and MIPS devices to grind through cryptest.sh, so they are always lagging.

We still need Windows Phone, WIndows Store and MinGW tested. If anyone specializes in the platforms, then please make a testing pass using master. I know Windows Phone and Store compiles; I just don't know if it passes self tests.

Jeff

Marcel Raad

unread,
May 18, 2017, 5:03:35 AM5/18/17
to Crypto++ Users
Hi Jeff,

2017-05-17 17:53 GMT+02:00 Jeffrey Walton <nolo...@gmail.com>:
> We still need Windows Phone, WIndows Store and MinGW tested. If anyone
> specializes in the platforms, then please make a testing pass using master.

With MinGW32, I got this in all 16 debug configurations:
Testing Compressors and Decompressors...
passed: filenames, filetimes and comments
passed: 128 zips and unzips
Assertion failed: zinflate.cpp(560): DecodeBody
ERROR: failed to execute validation suite

Which is this assert:
// TODO: this surfaced during fuzzing. What do we do???
CRYPTOPP_ASSERT(m_distance < COUNTOF(distanceExtraBits));
if (m_distance >= COUNTOF(distanceExtraBits))
throw BadDistanceErr();

MinGW64 and MSYS are still running.

I had build problems for Windows Store/Phone that I'm going to look
into today if I find enough time. Do you only need Store/Phone or also
Windows Universal App builds?

Marcel

Marcel Raad

unread,
May 18, 2017, 12:51:06 PM5/18/17
to Jeffrey Walton, Crypto++ Users
2017-05-18 14:38 GMT+02:00 Jeffrey Walton <nolo...@gmail.com>:
> It can be sidestepped with:
>
> CXXFLAGS="-DNDEBUG -g2 -O2 -DCRYPTOPP_COVERAGE" make

Thanks, the MinGW32 tests passed with this.

MinGW64 had this additional failure:
Testing: X86 SHA code generation
g++ -DNDEBUG -g2 -O2 -msse -msse2 -march=native -pipe -c sha.cpp
ERROR: failed to generate sha1rnds4 instruction
ERROR: failed to generate sha1nexte instruction
ERROR: failed to generate sha1msg1 instruction
ERROR: failed to generate sha1msg2 instruction
ERROR: failed to generate sha256rnds2 instruction
ERROR: failed to generate sha256msg1 instruction
ERROR: failed to generate sha256msg2 instruction

And this assertion in the Debug C++03/11/14/17 builds:
Testing RoundUpToMultipleOf/RoundDownToMultipleOf...
passed: RoundUpToMultipleOf, byte, no overflow
passed: RoundUpToMultipleOf, byte, no overflow
passed: RoundUpToMultipleOf, byte, no overflow
passed: RoundUpToMultipleOf, byte, no overflow
passed: RoundUpToMultipleOf, byte, no overflow
passed: RoundUpToMultipleOf, byte, overflow
passed: RoundUpToMultipleOf, word16, no overflow
passed: RoundUpToMultipleOf, word16, no overflow
passed: RoundUpToMultipleOf, word16, no overflow
passed: RoundUpToMultipleOf, word16, no overflow
passed: RoundUpToMultipleOf, word16, no overflow
passed: RoundUpToMultipleOf, word16, overflow
passed: RoundUpToMultipleOf, word32, no overflow
passed: RoundUpToMultipleOf, word32, no overflow
passed: RoundUpToMultipleOf, word32, no overflow
passed: RoundUpToMultipleOf, word32, no overflow
passed: RoundUpToMultipleOf, word32, no overflow
passed: RoundUpToMultipleOf, word32, overflow
passed: RoundUpToMultipleOf, word64, no overflow
passed: RoundUpToMultipleOf, word64, no overflow
passed: RoundUpToMultipleOf, word64, no overflow
passed: RoundUpToMultipleOf, word64, no overflow
passed: RoundUpToMultipleOf, word64, no overflow
passed: RoundUpToMultipleOf, word64, overflow
Assertion failed: misc.h(981): RoundUpToMultipleOf
ERROR: failed to execute validation suite

And MSYS had these errors:

Testing: X86 AES-NI code generation
g++ -DNDEBUG -g2 -O2 -msse -msse2 -D_XOPEN_SOURCE=700 -fPIC -m64 -pipe
-c rijndael.cpp
ERROR: failed to generate aesenc instruction
ERROR: failed to generate aesenclast instruction
ERROR: failed to generate aesdec instruction
ERROR: failed to generate aesdeclast instruction
ERROR: failed to generate aesimc instruction
ERROR: failed to generate aeskeygenassist instruction
************************************
Testing: X86 carryless multiply code generation
g++ -DNDEBUG -g2 -O2 -msse -msse2 -D_XOPEN_SOURCE=700 -fPIC -m64 -pipe
-c gcm.cpp
ERROR: failed to generate pclmullqhq instruction
ERROR: failed to generate pclmullqlq instruction
************************************
Testing: X86 RDRAND and RDSEED code generation
g++ -DNDEBUG -g2 -O2 -msse -msse2 -D_XOPEN_SOURCE=700 -fPIC -m64 -pipe
-c rdrand.cpp
Verified rdrand and rdseed machine instructions
************************************
Testing: X86 CRC32 code generation
g++ -DNDEBUG -g2 -O2 -msse -msse2 -D_XOPEN_SOURCE=700 -fPIC -m64 -pipe
-c crc.cpp
ERROR: failed to generate crc32l instruction
ERROR: failed to generate crc32b instruction
************************************
Testing: X86 SHA code generation
g++ -DNDEBUG -g2 -O2 -msse -msse2 -D_XOPEN_SOURCE=700 -fPIC -m64 -pipe
-c sha.cpp
ERROR: failed to generate sha1rnds4 instruction
ERROR: failed to generate sha1nexte instruction
ERROR: failed to generate sha1msg1 instruction
ERROR: failed to generate sha1msg2 instruction
ERROR: failed to generate sha256rnds2 instruction
ERROR: failed to generate sha256msg1 instruction
ERROR: failed to generate sha256msg2 instruction
************************************

> OK thanks. Try this before you spend time on it:
> https://github.com/weidai11/cryptopp/commit/ddcd70b152964db5

Thanks, 9dcb72f9e5309b19fd72fcf14672a652bbd63b83 fixed the build.

Marcel

Jeffrey Walton

unread,
May 18, 2017, 8:55:40 PM5/18/17
to Crypto++ Users

2017-05-17 17:53 GMT+02:00 Jeffrey Walton <nolo...@gmail.com>:
> We still need Windows Phone, WIndows Store and MinGW tested. If anyone
> specializes in the platforms, then please make a testing pass using master.

With MinGW32, I got this in all 16 debug configurations:
Testing Compressors and Decompressors...
passed: filenames, filetimes and comments
passed: 128 zips and unzips
Assertion failed: zinflate.cpp(560): DecodeBody
ERROR: failed to execute validation suite

Yeah, it sounds like MinGW uses Posix assert, not out CRYPTOPP_ASSERT. I think the problem is with signals. We can't install the SIGTRAP handler.
 
Which is this assert:
// TODO: this surfaced during fuzzing. What do we do???
CRYPTOPP_ASSERT(m_distance < COUNTOF(distanceExtraBits));
if (m_distance >= COUNTOF(distanceExtraBits))
  throw BadDistanceErr();

MinGW64 and MSYS are still running.

I had build problems for Windows Store/Phone that I'm going to look
into today if I find enough time. Do you only need Store/Phone or also
Windows Universal App builds?

I believe it should but I don't have a test device.

Jeff

Jeffrey Walton

unread,
May 18, 2017, 8:58:20 PM5/18/17
to Crypto++ Users, nolo...@gmail.com


On Thursday, May 18, 2017 at 12:51:06 PM UTC-4, Marcel Raad wrote:
2017-05-18 14:38 GMT+02:00 Jeffrey Walton <nolo...@gmail.com>:
> It can be sidestepped with:
>
>   CXXFLAGS="-DNDEBUG -g2 -O2 -DCRYPTOPP_COVERAGE" make

Thanks, the MinGW32 tests passed with this.

MinGW64 had this additional failure:
Testing: X86 SHA code generation
g++ -DNDEBUG -g2 -O2 -msse -msse2 -march=native -pipe -c sha.cpp
ERROR: failed to generate sha1rnds4 instruction
ERROR: failed to generate sha1nexte instruction
ERROR: failed to generate sha1msg1 instruction
ERROR: failed to generate sha1msg2 instruction
ERROR: failed to generate sha256rnds2 instruction
ERROR: failed to generate sha256msg1 instruction
ERROR: failed to generate sha256msg2 instruction

This is probably due to an old linker. We are trying to generate aes, sha and friends, but the linker does not produce the instructions.
 

Oh, that's interesting.... With _DNDEBUG, you should not see an assert.
 

OK< this could be an old linker, too. Or, MinGW could genuinely be having trouble.

Let me look at the code.

Jeff
Reply all
Reply to author
Forward
0 new messages