Hello all,
I wrote a program using crypto++ and vc 2008 and got a error when
running my program like this:
Unhandled exception at 0x00d8f90a in NeuroNetworkAssemble.exe:
0xC0000005: Access violation reading location 0xfeeefeee.
The program is a two-thread communication program goes like the server
using Elgamal to generate a private key and a publickey, and send the
public key to the client, client uses that key to do some encryption
and then closes the client thread, then the server using the key to do
some encryption and decryption and then closes its thread.
Program crashes when the server thread is over.
I check the stack window, it points to a destruct function. According
to my guess, it seems like when the client thread ends, the system
would destruct all secure object like keys, integers in the memory. So
when the server thread ends, system will try to destruct those for
another time, therefore the exception occurs.
Could anyone give me some idea about this issue? If my guess is right,
how can i fix this? Thanks.
I call the stack window and locate the error, it shows that :
> NeuroNetworkAssemble.exe!std::_Destroy<CryptoPP::Integer>(CryptoPP::Integer * _Ptr=0x00256c68) Line 59 + 0xc bytes C++
NeuroNetworkAssemble.exe!
std::allocator<CryptoPP::Integer>::destroy(CryptoPP::Integer *
_Ptr=0x00256c68) Line 160 + 0x9 bytes C++
NeuroNetworkAssemble.exe!
std::_Destroy_range<std::allocator<CryptoPP::Integer>
>(CryptoPP::Integer * _First=0x00256c68, CryptoPP::Integer *
_Last=0x00256c7c, std::allocator<CryptoPP::Integer> & _Al={...},
std::_Nonscalar_ptr_iterator_tag __formal={...}) Line 234 + 0xc bytes
C++
NeuroNetworkAssemble.exe!
std::_Destroy_range<std::allocator<CryptoPP::Integer>
>(CryptoPP::Integer * _First=0x00256c68, CryptoPP::Integer *
_Last=0x00256c7c, std::allocator<CryptoPP::Integer> & _Al={...}) Line
225 + 0x2f bytes C++
NeuroNetworkAssemble.exe!
std::vector<CryptoPP::Integer,std::allocator<CryptoPP::Integer>
>::_Destroy(CryptoPP::Integer * _First=0x00256c68, CryptoPP::Integer *
_Last=0x00256c7c) Line 1124 + 0x14 bytes C++
NeuroNetworkAssemble.exe!
std::vector<CryptoPP::Integer,std::allocator<CryptoPP::Integer>
>::_Tidy() Line 1137 C++
NeuroNetworkAssemble.exe!
std::vector<CryptoPP::Integer,std::allocator<CryptoPP::Integer>
>::~vector<CryptoPP::Integer,std::allocator<CryptoPP::Integer> >()
Line 560 C++
NeuroNetworkAssemble.exe!
CryptoPP::DL_FixedBasePrecomputationImpl<CryptoPP::Integer>::~DL_FixedBasePrecomputationImpl<CryptoPP::Integer>()
+ 0x54 bytes C++
NeuroNetworkAssemble.exe!
CryptoPP::DL_PublicKeyImpl<CryptoPP::DL_GroupParameters_GFP_DefaultSafePrime>::~DL_PublicKeyImpl<CryptoPP::DL_GroupParameters_GFP_DefaultSafePrime>()
+ 0x57 bytes C++
NeuroNetworkAssemble.exe!
CryptoPP::DL_PublicKey_GFP<CryptoPP::DL_GroupParameters_GFP_DefaultSafePrime>::~DL_PublicKey_GFP<CryptoPP::DL_GroupParameters_GFP_DefaultSafePrime>()
+ 0x2b bytes C++
--
You received this message because you are subscribed to the "Crypto++ Users" Google Group.
To unsubscribe, send an email to
cryptopp-user...@googlegroups.com.
More information about Crypto++ and this group is available at
http://www.cryptopp.com.
Subscription settings:
http://groups.google.com/group/cryptopp-users/subscribe?hl=en