0

Good day,

I'm compiling some C++ examples using "Cryptopp 8.2.0" and "Mingw-w64" on Windows 7 (x64) and all crash when executing. The examples are "Crypto++ GCM Test" (from Cryptopp site) and others that I have found here on Stack. All compile OK. The strange thing is that I tested this same setup 2 weeks ago (before a full OS reinstall) and I didn't experience crashes.

Cryptopp 8.2.0 Downloaded this build and used "libcryptopp.a" https://packages.msys2.org/package/mingw-w64-x86_64-crypto++

Mingw-w64 gcc-10.2.0-mingw-w64-8.0.0-r1

Windows 7 Crash Log Problem Event Name: APPCRASH Application Name: a.exe Application Version: 0.0.0.0 Application Timestamp: 5f77518e Fault Module Name: StackHash_dbce Fault Module Version: 6.1.7601.24384 Fault Module Timestamp: 5c6e245d Exception Code: c0000374 Exception Offset: 00000000000bf302 OS Version: 6.1.7601.2.1.0.256.1 Locale ID: 1033 Additional Information 1: dbce Additional Information 2: dbce16d62f50f2b2931f8e5692998f10 Additional Information 3: 8f4d Additional Information 4: 8f4dc2cb1c713a0218de25ff7b749f7d

Also tested with gcc-10.1 (previous version but same crashes). I appreciate the help. Thanks

Edit

  • This example cryptopp.com/wiki/GCM_Mode#AEAD (Only crashes no output)
  • This example Example of AES using Crypto++ (Shows output but then crashes)
  • Compiling OK like this: g++ Driver.cpp -lcryptopp
  • Tested the same setup Mingw64+Cryptopp on Win 8 and had the same crash.
Mike
  • 11
  • 2
  • Which example are you exactly trying to compile/execute? How are you compiling it? Please add all necessary information in your question. "code found here on stack overflow" is a totally vague term. Edit : The c0000374 error code indicates memory corruption -- the application is trying to use or access memory it doesn't have access to. – brc-dd Oct 03 '20 at 18:13
  • Post relevant code here. – chux - Reinstate Monica Oct 03 '20 at 18:17
  • @brc-dd One of the examples is https://www.cryptopp.com/wiki/GCM_Mode#AEAD Downloaded the ZIP and just compiled. I researched and tested several things but nothing works. Compiling OK like this: g++ Driver.cpp -lcryptopp Thanks – Mike Oct 03 '20 at 18:50
  • @brc-dd Forgot to add that I also tested the same setup (Mingw64+Cryptopp) on Win 8 and had same crash. Thanks – Mike Oct 03 '20 at 18:59
  • @Mike Are you getting anything as output? In my case I am getting this as output : `Decrypted and Verified data. Ready for use. adata length: 16 pdata length: 16 cipher text: CEA7403D4D606B6E 074EC5D3BAF39D18 AE9B1771DBA9CF62 B39BE017940330B4 recovered adata length: 16 recovered pdata length: 16` I believe this is the expected output. Although: I am on windows 10, but I don't think that should matter as version of `g++` and `crypto++` are same. I am getting core dump and an exit code of `127`, but that is not affecting program output nor printing anything on `stderr`. – brc-dd Oct 03 '20 at 19:18
  • @brc-dd On cryptopp.com/wiki/GCM_Mode#AEAD I dont get ouput, just crash. But testing an example found here for AES-CBS I get output and then crashes. – Mike Oct 03 '20 at 19:18
  • @Mike Yeah, same is happening with me. It prints output then crashes. Sometimes crashes even without printing any output. It appears to me more or less a msys bug. Have you tried manually installing cryptopp (without using msys package)? As far as I remember, when one manually builds it then after running `make`, there a script is run which tests code for all possible encryption methods. I think you should try doing that. If any error is pointed during that test script then the bug is with cryptopp library itself (I hardly doubt that). – brc-dd Oct 03 '20 at 19:24
  • @brc-dd I did not build manually because I was having difficulties and lack experience with make. I will re-try and see how it goes. Thanks. – Mike Oct 03 '20 at 19:33
  • 1
    @brc-dd I successfully built the library using MSYS+MINGW64+MAKE. Its not crashing anymore. Thanks for the input. – Mike Oct 07 '20 at 15:59

0 Answers0