Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TopologyPreservingSimplifier to remove ring endpoints safely #1110

Merged
merged 5 commits into from
Jun 14, 2024

Conversation

dr-jts
Copy link
Contributor

@dr-jts dr-jts commented Jun 13, 2024

Fixes TopologyPreservingSimplifier to remove ring endpoints safely (avoiding use-after-free errors). It ensures that discarded line segments adjacent to ring endpoints are removed from spatial indexes, and modified line segments are reindexed.

Fixes #1107.

@dr-jts dr-jts added the Bug label Jun 13, 2024
@pramsey
Copy link
Member

pramsey commented Jun 13, 2024

Is it possible to add the triggering test case into one of the unit tests, so we get that sweet ASAN/valgrind automation from the CI on that code path?

@dr-jts
Copy link
Contributor Author

dr-jts commented Jun 13, 2024

Is it possible to add the triggering test case into one of the unit tests?

Yes, would be nice. Maybe can slim the failure case down a bit.

@dr-jts dr-jts requested a review from dbaston June 14, 2024 16:40
@dr-jts dr-jts merged commit 50ae3bd into libgeos:main Jun 14, 2024
29 checks passed
@dr-jts dr-jts deleted the fix-tpsimplify-remove-endpoint branch June 14, 2024 16:58
@eglaser77
Copy link

Is this the issue referred to in the 3.12.0 release notes as "GEOSIntersects: Fix crash with empty point inputs (#1110, Dan Baston)" listed here: https://github.com/libgeos/geos/blob/3.12.2/NEWS.md#changes-in-3120? That description doesn't seem to match.

@dbaston
Copy link
Member

dbaston commented Aug 2, 2024

The issue referenced in the 3.12.0 release notes is Trac ticket 1110: https://trac.osgeo.org/geos/ticket/1110

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Geometry produced by ST_SimplifyPreserveTopology is not stable across multiple runs
4 participants