Opened 15 years ago

Closed 15 years ago

#232 closed defect (fixed)

Static string in WKBReader causes glibc errors when Geos is statically linked

Reported by: yvesdaemen Owned by: strk
Priority: major Milestone: 3.2.0
Component: Default Version: 3.0.3
Severity: Unassigned Keywords:
Cc: dfuhry@…

Description

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.

Change History (10)

comment:1 by mloskot, 15 years ago

yvesdaemen,

Isn't it a duplicate of ticket #231 ?

comment:2 by yvesdaemen, 15 years ago

Yes,

I've had some problems submitting the report. Sorry for the duplicate, you can reject one of them ;-)

comment:3 by pramsey, 15 years ago

Milestone: 3.1.03.0.4

comment:4 by pramsey, 15 years ago

Can you attach a test program? Otherwise it is unlikely anyone will take the time to first create an example program before working up a general solution. Even better, attach a general purpose patch.

comment:5 by pramsey, 15 years ago

If I receive a patch, I will apply it.

comment:6 by Mike Taves, 15 years ago

I think this bug also affects the python bindings. See: http://lists.osgeo.org/pipermail/geos-devel/2009-May/004174.html

comment:7 by pramsey, 15 years ago

Owner: changed from geos-devel@… to strk

strk, any chance you can take a look at this one? If you fix in trunk I'll pull the patch back.

comment:8 by strk, 15 years ago

Resolution: worksforme
Status: newclosed

I can build GEOS trunk statically. If anyone has problem and time to give feedback feel free to reopen.

comment:9 by pramsey, 15 years ago

Resolution: worksforme
Status: closedreopened

comment:10 by pramsey, 15 years ago

Cc: dfuhry@… added
Milestone: 3.0.43.2.0
Resolution: fixed
Status: reopenedclosed

Fixed in 3.0 at r2614

Fixed in 3.1 at r2615

Fixed in trunk at r2616

Note: See TracTickets for help on using tickets.