[Python-Dev] Re: Minimal GCC/Linux shared lib + EH bug example
Jason Merrill
jason@redhat.com
Sun, 12 May 2002 11:09:38 +0100
>>>>> "David" == David Abrahams <david.abrahams@rcn.com> writes:
> FYI, Ralf Grosse-Kunstleve has reduced the exception-handling problem
> mentioned here
> http://mail.python.org/pipermail/c++-sig/2002-May/001021.html to a minimal
> example:
> http://cci.lbl.gov/~rwgk/tmp/gcc_dl_eh.tar.gz
> gunzip -c gcc_dl_eh.tar.gz | tar xvf -
> cd gcc_dl_eh
> more 0README
> The problem here is clearly a GCC/Linux interaction problem, *not* a Python
> bug. However, it does have an impact on anyone writing Python extension
> modules with g++ on Linux.
IMO, it is unreasonable to expect C++ to work with RTLD_LOCAL unless the
object so loaded is indeed self-contained (which precludes linking against
a common shared library, as in this case). Too many aspects of the
language depend on being able to merge duplicates coming from different
sources. In this case, the problem comes from std::type_info; the runtime
library expects to be able to compare type_info nodes by pointer
equivalence. Templates and static variables in inline functions would also
have trouble.
Jason