David Blasby <dblasby@refractions.net> writes:
> We are having trouble trapping exceptions thrown by the GEOS C++
> library. The library isworking very well in general, but when GEOS
> raises an exception that tries to leave the GEOS .so library, postgresql
> immediately dies (signal 6 - ABORT).
The redhat bugzilla entry you reference suggests that this should work
in Linux, given compatible (and recent) versions of gcc/glibc/glibc++.
Are you up to date on those?
But if you want a general cross-platform solution, you may be out of
luck. Since there is no C++ library in the standard backend, there
is nothing that would know to set up the C++ exception stack.
(It occurs to me that if it's still failing for you on recent Linux
releases, it might be because your code and GEOS are in separate shared
libs that can't even agree on a common location of the C++ exception
stack pointers.)
The only workaround I can think of is to build a nonstandard postgres
executable that contains libc++ as part of the main executable.
regards, tom lane