Terminate called after throwing an instance of...
Jeffrey Walton
noloader@gmail.com
Sun Sep 4 22:50:00 GMT 2011
Hi All,
I'm seeing the following on a negative test case:
terminate called after throwing an instance of
'esapi::NoSuchAlgorithmException'
what(): Algorithm 'Foo' is not supported
Any ideas on what might cause the exception to pass uncaught? I am
familiar with http://gcc.gnu.org/faq.html#dso.
Jeff
$ nm -D --extern-only --defined-only lib/libesapi-c++.so | grep -i
NoSuchAlgorithmException
00091ec2 W _ZN5esapi24NoSuchAlgorithmExceptionC1ERKSs
00091ec2 W _ZN5esapi24NoSuchAlgorithmExceptionC2ERKSs
00091f4a W _ZN5esapi24NoSuchAlgorithmExceptionD0Ev
00091f02 W _ZN5esapi24NoSuchAlgorithmExceptionD1Ev
00091f02 W _ZN5esapi24NoSuchAlgorithmExceptionD2Ev
0023c2a4 V _ZTIN5esapi24NoSuchAlgorithmExceptionE
001a0b60 V _ZTSN5esapi24NoSuchAlgorithmExceptionE
0023c250 V _ZTVN5esapi24NoSuchAlgorithmExceptionE
The test case definitely tries to catch it (and it works on Windows):
$ gdb test/run_esapi_tests
(gdb) r
...
(gdb) where
...
#10 0x0806804d in VerifyMessageDigestArguments::test_method (this=0xbfffe5af)
at test/crypto/MessageDigestTest.cpp:59
...
$ cat MessageDigestTest.cpp
#include "errors/NoSuchAlgorithmException.h"
using esapi::NoSuchAlgorithmException;
...
try
{
MessageDigest md1("Foo"); <== Line 59
}
catch(NoSuchAlgorithmException&)
{
success = true;
}
catch (std::exception&)
{
cerr << "!!Caught exception" << endl;
}
catch(...)
{
cerr << "!!Caught unknown exception" << endl;
}
More information about the Gcc-help
mailing list