[geos-devel] Exception Issues

Martin Davis mbdavis at VividSolutions.com
Tue May 27 12:18:54 EDT 2003

Thanks for the succinct summary, Dave.  I took a look at the bug report, but it makes my brain hurt wading thru all that stuff.

Sigh...  I guess we better start thinking about how to remap exceptions in GEOS into something non-offensive.

Martin Davis, Senior Technical Architect
Vivid Solutions Inc.
Suite #1A-2328 Government Street   Victoria, B.C.   V8T 5G5
Phone: (250) 385 6040    Fax: (250) 385 6046
EMail: mbdavis at vividsolutions.com  Web: www.vividsolutions.com

> -----Original Message-----
> From: David Blasby [mailto:dblasby at refractions.net]
> Sent: Tuesday, May 27, 2003 9:10 AM
> To: GEOS Development List
> Subject: Re: [geos-devel] Exception Issues
> 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
> _______________________________________________
> geos-devel mailing list
> geos-devel at geos.refractions.net
> http://geos.refractions.net/mailman/listinfo/geos-devel

More information about the geos-devel mailing list