[geos-devel] Segmentation fault when using intersect with multithreading

Sandro Santilli strk at kbt.io
Sat Nov 25 07:40:40 PST 2017


On Fri, Nov 24, 2017 at 10:15:58PM +0100, Fardet Tanguy wrote:
> > > The problem was that the API is labeled "thread safe" when it is not...
> > The API is, the implementation isn't ...
> I'm not sure I understand, could you elaborate? It feels like I'm missing an
> important concept here.
> Sorry to drag on this, but since I'm probably going to use GEOS for some
> time, I'd rather make sure I get that part.

Someone drafted and committed a version of the C-API
which would allow not using a global context variable,
opening the possibility for it to be re-entrant.

But there are some static variables used in the C++
implementation that are initialized on first call
which may suffer from race conditions when multiple
threads access them.

That's just to say you should be able to keep using
the interface, but we need to fix the thread safety
issues.

--strk;


More information about the geos-devel mailing list