[geos-devel] Exception Issues
Norman Vine
nhv at cape.com
Tue May 27 12:46:38 EDT 2003
David Blasby writes:
>
> 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).
This should be easily solved by modifying the Postgresql link step
to link as C++ instead of 'C'.
This is allowable in that C++ is by the 'standard' defined as a
superset of C
Note I believe that this should only be necessary for the PostGIS
DLL
Norman
More information about the geos-devel
mailing list