This is the mail archive of the
mailing list for the GCC project.
Re: Minimal GCC/Linux shared lib + EH bug example
- From: "David Abrahams" <david dot abrahams at rcn dot com>
- To: <c++std-ext at research dot att dot com>
- Cc: <c++std-ext at research dot att dot com>,<gcc at gcc dot gnu dot org>,"Ralf W. Grosse-Kunstleve" <rwgk at cci dot lbl dot gov>
- Date: Wed, 15 May 2002 10:11:15 -0500
- Subject: Re: Minimal GCC/Linux shared lib + EH bug example
- References: <200205151449.g4FEnC232866@boa.lbl.gov>
- Reply-to: "David Abrahams" <david dot abrahams at rcn dot com>
From: "Ralf W. Grosse-Kunstleve" <email@example.com>
> To: C++ extensions mailing list
> Message c++std-ext-5016
> > I think the message that can be understood by a wider audience is:
> > don't use C++ for Python extension modules.
> Surely You're Joking, Mr. Loewis!
> As it stands, Linux/gcc3 is the only platform that does not do what
> we want.
Well, to be fair... Linux/gcc3 doesn't do what you and I want for
exceptions with Boost.Python, but it appears that none of the Unices have a
reasonable behavior for many other parts of the C++ language. It seems as
though a better job could (and maybe should) be done by the compiler with
the parts it can handle (EH, RTTI), but the deep problem lies elsewhere.
> Are you sure it is helpful to tell people to "go away"?
This part I agree with you on, but I think that Martin was just using a
shorthand for "If you're not prepared to think about some interesting
details of how the loader works, don't use C++ for Python extension
modules". IOW, I'm guessing Martin thinks the wider audience isn't prepared
to think about those details... and I bet he's right.
> - Is the situation different if python is compiled and linked with a C++
> compiler (--with-cxx)?
> - More generally: What are the issues when using dlopen in any C++
It appears that if two dlopened libraries link to a common shared library,
one of them will disagree with the common library about the identities of
all weakly-linked static data. If you need more explanation, give me a call
and I can talk you through the implications.