[geos-devel] [GEOS] #232: Static string in WKBReader causes glibc errors when Geos is statically linked

GEOS geos-trac at osgeo.org
Thu Feb 26 09:36:16 EST 2009


#232: Static string in WKBReader causes glibc errors when Geos is statically
linked
------------------------+---------------------------------------------------
 Reporter:  yvesdaemen  |       Owner:  geos-devel at lists.osgeo.org
     Type:  defect      |      Status:  new                       
 Priority:  major       |   Milestone:  3.1.0                     
Component:  Default     |     Version:  3.0.3                     
 Severity:  Unassigned  |    Keywords:                            
------------------------+---------------------------------------------------
 I am statically linking Geos against my own C program. This program runs
 without problems, except until the very end when a glibc errors occurs.

 I have traced this back to the static string BAD_GEOM_TYPE_MSG. When I
 remove the static modifier and initialise the string inside the
 constructor, everything goes well.

 I did not get this error when linking dynamically, but Valgrind complained
 about an invalid free. This is probably the same thing, only my program
 did not crash on it.

-- 
Ticket URL: <http://trac.osgeo.org/geos/ticket/232>
GEOS <http://geos.refractions.net/>
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).


More information about the geos-devel mailing list