Skip to Content.
Sympa Menu

shibboleth-dev - Re: Linux update

Subject: Shibboleth Developers

List archive

Re: Linux update


Chronological Thread 
  • From: Derek Atkins <>
  • To: Scott Cantor <>
  • Cc:
  • Subject: Re: Linux update
  • Date: 11 Sep 2002 11:10:40 -0400

This implies that all uses of dynamic_cast<> are subject to
this bug, eh? That means I need to fix my code as well.

Where is it safe and where is it not safe to use C-casts?

-derek

Scott Cantor
<>
writes:

> > FTR, my dev platform is RH7.3/gcc-3.0.4... I'll let you know
> > if I have any problems...
>
> I ran it down at about 4:00am last night. There's a bug in just about
> every gcc that manifests on a lot of Linux versions, and causes
> dynamic_casts to fail when you're casting an object from a shared
> library, especially in another library that's been dlopen'd. mod_shib
> gets the AttributeStatement in the getAttributes() call with one.
>
> The bizarre thing is that it ought to be failing on shib1 and shib2, but
> there's no question about the problem, gdb traces the fault right to the
> dynamic_cast.
>
> It's practically impossible to do something like SAML or really any
> extendable XML vocabulary without casting down somewhere, so the issue
> boils down to whether you do it as though you were programming in C or
> older C++, where you have to basically implement your own private form
> of RTTI. I thought I could save myself some hassle and just use
> dynamic_cast, but I guess I was wrong. ;-(
>
> Anyway, I can code around the bug in mod_shib and reissue a working copy
> for now, just by using static_cast, but I'll have to actually build my
> own RTTI into OpenSAML later unless they have this bug fixed in the main
> gcc trunk.
>
> -- Scott
>

--
Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
Member, MIT Student Information Processing Board (SIPB)
URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH


PGP key available

------------------------------------------------------mace-shib-design-+
For list utilities, archives, subscribe, unsubscribe, etc. please visit the
ListProc web interface at

http://archives.internet2.edu/

------------------------------------------------------mace-shib-design--




Archive powered by MHonArc 2.6.16.

Top of Page