[Python-Dev] Problems with Python's default dlopen flags
Martin v. Loewis
05 May 2002 23:45:39 +0200
"Gordon McMillan" <firstname.lastname@example.org> writes:
> There is some strangeness to exceptions, Linux, gcc
> and linking. In scxx (my minimalist C++ / Python
> interface), there's no separate .so involved - the
> scxx code is compiled in with the extension. There
> are no statics involved, so C linkage works (you don't
> need a relinked Python). At a certain gcc release,
> exceptions thrown and caught at the top level stopped
> working (abort).
I think Tim's analysis is right: If it fails every time, there is some
conceptual problem somewhere - this one sounds like a bug in gcc,
which might fail to emit exception regions correctly or some such (I
think I recall one such bug in g++).
If it sometimes fails, sometimes "succeed", it rather sounds like
memory corruption. I can well imagine how memory corruption could
affect RTTI: either the vtable pointer in an object gets overwritten,
or the RTTI objects themselves get overwritten.