This is the mail archive of the gcc-bugs@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]

Problem passing exceptions between static libraries


Hello,

I've the following scenario:
    - gcc 2.95.2, Debian Linux potato. Using autotools o generate
makefiles.

    - A shared library, LIB1, written in C++ that throws exceptions
    - A shared library, LIB1Py, created from a .cpp file, made by SWIG
    - A shared library, LIB2, written in C++ that throws exceptions, and

uses LIB1
    - A shared library, LIB2Py, created from a .cpp file, made by SWIG
    - A python test.py program that imports LIB1Py and LIB2Py

    - A class member function, fun1, from LIB1 throws an exception when
called with an invalid argument
    - A class member function, fun2, from LIB2 calls LIB1's fun1, and if

it catches the exception then it throws it again

Then:
    - If from test.py I call fun1 with an invalid argument I receive the

exception. That's ok. (Shared lib LIB1 has thrown an exception, shared
lib LIB1PY has catched it and has propagate it to test.py).

But fails when from test.py calls fun2 with the invalid arg.
What happens is:
    - test1.py calls LIB2PY that calls LIB2 that calls LIB1
    - LIB1 throws an exception.
    - LIB2 aborts

I'm working with gcc 2.95.2

Anybody has some idea of possible causes of the error?
Thanks in advance

Josep L. Colom




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