Certain prepared geometry predicates fail with an exception and result in a memory leak: within, contains, overlaps, crosses, touches, covers, covered by, contains properly.
First detected in pygeos (pygeos/pygeos#434).
Test to reproduce.
geom1 = GEOSGeomFromWKT("LINESTRING(0 0, 1 NaN)");
geom2 = GEOSGeomFromWKT("POINT(0 0)");
prepGeom1 = GEOSPrepare(geom1);
GEOSPreparedTouches(prepGeom1, geom2);
Note that I'm not advocating that coordinates with NaN be supported here; rather, that is useful simply for demonstrating the issue. However, it is worth noting that some but not all of the prepared geometry predicates raise an exception for this input: the memory leak appears related to the exception, but it may be that the predicates should all return false without raising an exception.
PR with test case to reproduce the memory leak on CI coming up momentarily.
Certain prepared geometry predicates fail with an exception and result in a memory leak: within, contains, overlaps, crosses, touches, covers, covered by, contains properly.
First detected in pygeos (pygeos/pygeos#434).
Test to reproduce.
Note that I'm not advocating that coordinates with NaN be supported here; rather, that is useful simply for demonstrating the issue. However, it is worth noting that some but not all of the prepared geometry predicates raise an exception for this input: the memory leak appears related to the exception, but it may be that the predicates should all return false without raising an exception.
PR with test case to reproduce the memory leak on CI coming up momentarily.