Hello,

when I use the ECDH<ECP>::Domain class as a member property of a class an
call the contructor in the of ECDH<ECP>::Domain in the following way:

class TestClass {
public:
  // construction and destruction
  TestClass() : mecdh(CryptoPP::ASN1::secp224r1()) {
  } // TestClass()
  ~TestClass() {
  } // TestClass()

public:
  CryptoPP::ECDH<ECP>::Domain mecdh;
}; // TestClass()

TestClass tc;

Then there are occuring a application crash, when the object is defined. In
my case the object is defined globally in the application, so it crashs
immediately.

Im using MSVC/C++ 7.0 on WXP! With Crypto++ version < 5.0 and using the
successor of ECDH<ECP>::Domain ==>> ECDHC<ECP> this has worked.

Any hints or workarounds?
Alex

The error message is: 
Unhandled exception at 0x00797404 in cryptest.exe: 0xC0000005: Access
violation reading location 0x00000009.

The stack trace is:
*       cryptest.exe!strcmp()  Line 121 Asm
*       cryptest.exe!type_info::operator==(const type_info & rhs={...})  +
0x1a    C++
*
cryptest.exe!CryptoPP::AlgorithmParameters<CryptoPP::NullNameValuePairs,int
const *>::GetVoidValue(const char * name=0x007fb6e4, const type_info &
valueType={...}, void * pValue=0x00d24ccc)  Line 286 + 0xe      C++
*
cryptest.exe!CryptoPP::AlgorithmParameters<CryptoPP::AlgorithmParameters<Cry
ptoPP::NullNameValuePairs,int const *>,int>::GetVoidValue(const char *
name=0x007fb6e4, const type_info & valueType={...}, void *
pValue=0x00d24ccc)  Line 300    C++
*       cryptest.exe!CryptoPP::NameValuePairs::GetValue()  Line 241     C++
*       cryptest.exe!CryptoPP::NameValuePairs::GetRequiredParameter()  Line
272 + 0x10      C++
*       cryptest.exe!CryptoPP::BaseN_Decoder::IsolatedInitialize(const
CryptoPP::NameValuePairs & parameters={...})  Line 92   C++
*       cryptest.exe!CryptoPP::BaseN_Decoder::BaseN_Decoder(const int *
lookup=0x00886b10, int log2base=4, CryptoPP::BufferedTransformation *
attachment=0x00000000)  Line 43 + 0x6b  C++
*
cryptest.exe!CryptoPP::HexDecoder::HexDecoder(CryptoPP::BufferedTransformati
on * attachment=0x00000000)  Line 25 + 0x20     C++
*
cryptest.exe!CryptoPP::EcRecommendedParameters<CryptoPP::ECP>::NewEC()  Line
84 + 0x2d       C++
*
cryptest.exe!CryptoPP::DL_GroupParameters_EC<CryptoPP::ECP>::Initialize(cons
t CryptoPP::OID & oid={...})  Line 371 + 0x8    C++
*
cryptest.exe!CryptoPP::DL_GroupParameters_EC<CryptoPP::ECP>::DL_GroupParamet
ers_EC<CryptoPP::ECP>(const CryptoPP::OID & oid={...})  Line 36 + 0xf5  C++
*       cryptest.exe!TestClass::TestClass()  Line 39 + 0x60     C++
*       cryptest.exe!$E1()  Line 48 + 0x13      C++
*       cryptest.exe!_initterm(void (void)* * pfbegin=0x0087c368, void
(void)* * pfend=0x0087c52c)  Line 588   C
*       cryptest.exe!_cinit()  Line 206 + 0xf   C
*       cryptest.exe!mainCRTStartup()  Line 229 + 0x5   C
*       kernel32.dll!CreateProcessInternalW()  + 0x1177 


Reply via email to