This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Minimal GCC/Linux shared lib + EH bug example



From: "Ralf W. Grosse-Kunstleve" <rwgk@cci.lbl.gov>


> 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.

> Questions:
>
> - Is the situation different if python is compiled and linked with a C++
>   compiler (--with-cxx)?

No.

> - More generally: What are the issues when using dlopen in any C++
>   program.

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.

-Dave




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]