mace-opensaml-users - RE: Core dump parsing an assertion
Subject: OpenSAML user discussion
List archive
- From: Scott Cantor <>
- To: 'Cameron Morris' <>,
- Subject: RE: Core dump parsing an assertion
- Date: Wed, 23 Jun 2004 17:53:45 -0600
- Organization: The Ohio State University
> It crashes on the line 192 of SAMLAssertion::fromDOM:
>
> 192 SAMLInternalConfig&
> conf=dynamic_cast<SAMLInternalConfig&>(SAMLConfig::getConfig());
Well, the crash is almost certainly a sign of a problem with the RTTI
implementation. g++ is still pretty raw, and I've been fairly sure a problem
like this could crop up somewhere. In this specific case, it's easy to fix;
just change the dynamic_cast to a static_cast, since there's no real
question about the class.
But the reason I stuck to dynamic was that if the runtime casts don't work,
the code will break in other places anyway, so it's a sanity check. You
really can't implement SAML properly without RTTI, so it's kind of a
catch-22.
The usual reason for this failing involves shared libraries, and was
especially common a few releases back when you dynamically loaded a shared
library into a process and then did a dynamic cast from outside it on a
pointer inside it. They had work arounds, but I never saw any that worked.
This of course is not that, since it's internal code inside the library, but
I still have my doubts about g++.
You might see if maybe there's a problem with the RTTI settings. Most C++
compilers let you turn it off, but the makefiles shouldn't be doing that.
It's possible though that there's a mixed environment, where libsaml is
built ok, but the surrounding process is interfering, I guess.
Anything strange about the way you're building your program?
-- Scott
- 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.