[geos-devel] Exception Issues
David Blasby
dblasby at refractions.net
Tue May 27 12:09:31 EDT 2003
I'm not 100% sure of the exact nature of the problem, but
http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=37933
has some more technical details.
To summarize the article, the problem is not with the C++ exception
mechanism; it works just fine if you link your program to libc++. The
problem is when you link the main program to libc (which doesnt
understand c++ exception handling). When the c++ code throws and
exception that has to unwind the stack (ie. leave the function that
threw it) a problem occurs because the default unwind mechinism in
libc is SIGABRT (terminate the program).
If the same program were linked to libc++, then the default unwind
mechanism would handle the exception properly.
Anyways, read the article and see if my summary is accurate.
This isnt an issue in most program - a C program that is using libgeos
would link it in at compile time. This will cause it to link to libc++
not libc.
In postgresql, it is compiled and linked to libc. When it want to load
in postgis, it just openes up the .so at runtime (not compile time).
dave
More information about the geos-devel
mailing list