Ticket #232 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

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

Changed 4 years ago by mloskot

yvesdaemen,

Isn't it a duplicate of ticket #231 ?

Changed 4 years ago by yvesdaemen

Yes,

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

Changed 4 years ago by pramsey

  • milestone changed from 3.1.0 to 3.0.4

Changed 4 years ago by pramsey

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.

Changed 4 years ago by pramsey

If I receive a patch, I will apply it.

Changed 4 years ago by mwtoews

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

Changed 4 years ago by pramsey

  • 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.

Changed 4 years ago by strk

  • status changed from new to closed
  • resolution set to worksforme

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

Changed 4 years ago by pramsey

  • status changed from closed to reopened
  • resolution worksforme deleted

Changed 4 years ago by pramsey

  • cc dfuhry@… added
  • status changed from reopened to closed
  • resolution set to fixed
  • milestone changed from 3.0.4 to 3.2.0

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.