[C++-sig] crash with gcc 3.0.4

David Abrahams david.abrahams at rcn.com
Fri Apr 26 16:27:01 CEST 2002

----- Original Message -----
From: "Robert Andre" <randre at pppl.gov>

> I had previously posted a message which contained some problems I had
> been experiencing with boost/gcc/linux.  The suggestion of using the
> latest python 2.2 release fixed the pickle test failures - thanks.
> The other two problems are not boost related but irritating
>   1) exceptions sometimes loose their type information so error
>      messages are lost (weird).

It's a long-standing issue with Boost.Python that there is no
generalized mechanism for C++ -> Python exception translation. The only
way to be sure that /some/ information will be preserved is to derive
C++ exceptions from std::exception, and to make sure the what() string
gives you some useful information. I plan to address this problem for
Boost.Python v2 in Q3 of this year.

Shot in the dark: if you are having trouble with exceptions thrown
across shared library boundaries, it might help if the shared libs were
explicitly linked to one another.

>   2) segmentation fault in ostringstream called from boost when using
>      cross module support.
> I can't seem to reduce the first to a simple test case but the
> fault wasn't too hard.  It fails on both a linux mandrake kernel
2.2/gcc 3.0.4
> and linux redhat 7.1/gcc 3.0.2 (rpm), both dual processor machines.
> anybody who is interested in it I posted a small set of files on
> http://w3.pppl.gov/~randre/bomb.tgz  which builds two shared libraries
> two dynamic libraries.

?? What's the difference between a shared and a dynamic library ??

> You have to change a couple of lines in the makefile
> to reflect the location of your includes and library.  One python
script runs
> (ok.py) and the other crashes (bomb.py) depending on the order of
loading of
> the external modules.

The Boost.Python v1 cross-module support is somewhat ad-hoc, and
development is proceeding full-speed on Boost.Python v2. Rather than
trying to address this kind of problem in the v1 sources, I plan to
release v2 as a replacement for v1.


More information about the Cplusplus-sig mailing list