mace-opensaml-users - Core dump parsing an assertion
Subject: OpenSAML user discussion
List archive
- From: "Cameron Morris" <>
- To: <>
- Subject: Core dump parsing an assertion
- Date: Wed, 23 Jun 2004 14:49:41 -0600
This is a strange one. In my code I core dump when parsing an assertion.
At the bottom of this message is the code, nothing complex. It just initializes saml and constructs a SAMLAssertion. Attached is the assertion I'm parsing. The strange part is that I can successfully parse and verify this assertion with the signtest executible - so I must be doing something silly.
Here is the stack trace:
#0 0x4012d102 in (anonymous namespace)::g_config () from /opt/shibboleth/lib/libsaml.so.4
#1 0xbfffee98 in ?? ()
#2 0x40705443 in __dynamic_cast (from=0x4012d100 <(anonymous namespace)::g_config>,
to=0x40115154 <typeinfo for saml::SAMLConfig>, require_public=1074877880, address=0x0,
sub=0x4012accc <__JCR_LIST__+4>, subptr=0x40013280) at ../../gcc-2.95.2/gcc/cp/tinfo2.cc:282
#3 0x400c1c35 in saml::SAMLAssertion::fromDOM (this=0x80616a0, e=0x8087f28) at SAMLAssertion.cpp:192
#4 0x400c0c22 in SAMLAssertion (this=0x80616a0, in=@0xbfffefa0) at SAMLAssertion.cpp:101
#5 0x08050710 in main (argc=1, argv=0xbffff124) at UnitTest.cpp:29
It crashes on the line 192 of SAMLAssertion::fromDOM:
192 SAMLInternalConfig& conf=dynamic_cast<SAMLInternalConfig&>(SAMLConfig::getConfig());
Oh and here are my system details:
gcc=3.3.3
OpenSAML=version 1.0 tarball
Kernel=2.6
OS=SuSE Linux 9.1
Thanks,
Cameron Morris
Code:
#include <iostream>
#include <fstream>
#include <saml/saml.h>
using namespace std;
using namespace saml;
int main (int argc, char *argv[])
{
unsigned char *cert;
long certLen;
//saml setup:
int rc;
//Configure SAML libraries
SAMLConfig& samlConfig = SAMLConfig::getConfig();
samlConfig.schema_dir="/home/cmorris/work/build/opensaml/etc/opensaml";
if ( !samlConfig.init() )
{
cerr << "An error occured initializing the SAML environment" << endl;
return false;
}
ifstream in;
in.open("../test/sa.xml", ios::in);
SAMLAssertion *sert = new SAMLAssertion(in);
}
Attachment:
sa.xml
Description: Binary data
- Core dump parsing an assertion, Cameron Morris, 06/23/2004
- RE: Core dump parsing an assertion, Scott Cantor, 06/23/2004
- <Possible follow-up(s)>
- RE: Core dump parsing an assertion, Cameron Morris, 06/24/2004
- RE: Core dump parsing an assertion, Scott Cantor, 06/24/2004
Archive powered by MHonArc 2.6.16.