This is the mail archive of the 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

--On Sunday, May 12, 2002 08:48:42 PM +0200 "Martin v. Loewis" 
<> wrote:

> Mark Mitchell <> writes:
>> > I find this testcase somewhat persuasive, as the offending dlopen call
>> > is not in the C++ code.  What do others think?
>> I agree with your other statement: RTLD_LOCAL and C++ don't really make
>> sense.
> The issue is that Python *must* use RTLD_LOCAL to load its extension
> modules, or else unrelated extension modules might crash due to
> conflicting symbols.

I understand.  I'm actually a Python devotee. :-)

And, of course, this applies to C++ modules too: I don't want your
module catching my exceptions just because we both happen to have
a type with the same name.  Or maybe I do, but I'm not sure unless
I know what your module is, and whether it means the same thing by
that type that I do...

> Now, people want to use C++ for extension modules. So far, this has
> worked fine - except that it now stops working with g++ 3.x, if you
> want to throw exceptions in the extension module.
>> We will have given people a bigger bazooka, but it will be aimed at
>> their own feet.
> Since the alternative is not to allow writing exceptions in C++,
> people would be willing to accept restrictions, if they know what
> those restrictions are.

And here we hit the age-old debate, on which I am usually on the losing

My feeling is that a user interface like this is just not worth having.
It is true that these features can be useful to some people some of the
time, and that in careful hands can be deployed appropriately.  It's
just that we have a lot of problems in GCC due to our corner-case options;
we've tacked on options to let all kinds of people do all kinds of things.
But, we tend to break those options, and we tend to not document them
right, and people tend to use them in unintended ways, and so forth and
so on.  I don't think we serve our users in this way.

All that said, I'm surprised that throwing exceptions -- without crossing
DSO boundaries -- doesn't work.  I'd expect that would work almost by

Mark Mitchell      
CodeSourcery, LLC  

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