[geos-commits] [SCM] GEOS branch main updated. 4226b5a034d249e64385d3dac7e69774ff30d6f3

git at osgeo.org git at osgeo.org
Fri Jun 19 06:59:52 PDT 2026


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GEOS".

The branch, main has been updated
       via  4226b5a034d249e64385d3dac7e69774ff30d6f3 (commit)
       via  b0689cbf1ac4f21c9370e8485aae39c8a55d9c47 (commit)
      from  cc58aad27d8e8d13fcfcfab00b1305944c6833e7 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 4226b5a034d249e64385d3dac7e69774ff30d6f3
Author: Daniel Baston <dbaston at gmail.com>
Date:   Thu Jun 18 12:49:34 2026 -0400

    KdTree: Disable optimizations in latest MSVC version
    
    References #1449

diff --git a/src/index/kdtree/KdTree.cpp b/src/index/kdtree/KdTree.cpp
index 2118165aa..e11626aed 100644
--- a/src/index/kdtree/KdTree.cpp
+++ b/src/index/kdtree/KdTree.cpp
@@ -226,6 +226,11 @@ KdTree::queryNode(KdNode* currentNode, const geom::Envelope& queryEnv, bool odd,
     }
 }
 
+#if defined(_MSC_VER) && _MSC_FULL_VER > 195035734
+// Avoid segfault with MSVC 19.51.36246.0
+// See https://github.com/libgeos/geos/issues/1449
+#pragma optimize("", off)
+#endif
 /*private*/
 KdNode*
 KdTree::queryNodePoint(KdNode* currentNode, const geom::Coordinate& queryPt, bool odd)
@@ -257,7 +262,9 @@ KdTree::queryNodePoint(KdNode* currentNode, const geom::Coordinate& queryPt, boo
     }
     return nullptr;
 }
-
+#if defined(_MSC_VER) && _MSC_FULL_VER > 195035734
+#pragma optimize("", on)
+#endif
 
 /*public*/
 void

commit b0689cbf1ac4f21c9370e8485aae39c8a55d9c47
Author: Daniel Baston <dbaston at gmail.com>
Date:   Fri Jun 19 09:24:45 2026 -0400

    KdTree: Add minimal test for #1449

diff --git a/tests/unit/index/kdtree/KdTreeTest.cpp b/tests/unit/index/kdtree/KdTreeTest.cpp
index 34ef8d8c6..ec8d238e7 100644
--- a/tests/unit/index/kdtree/KdTreeTest.cpp
+++ b/tests/unit/index/kdtree/KdTreeTest.cpp
@@ -189,6 +189,24 @@ void object::test<8> ()
     ensure(node->isRepeated());
 }
 
+template<>
+template<>
+void object::test<9>()
+{
+    set_test_name("query by point");
+    // minimal test for https://github.com/libgeos/geos/issues/1449
+
+    KdTree index;
+    ensure(index.query({ 6, 8 }) == nullptr);
+
+    const KdNode* node68 = index.insert({ 6, 8 });
+    ensure(node68);
+    ensure_equals(index.query({ 6, 8 }), node68);
+
+    const KdNode* node28 = index.insert({ 2, 8 });
+    ensure(node28);
+    ensure_equals(index.query({ 2, 8 }), node28);
+}
 
 
 

-----------------------------------------------------------------------

Summary of changes:
 src/index/kdtree/KdTree.cpp            |  9 ++++++++-
 tests/unit/index/kdtree/KdTreeTest.cpp | 18 ++++++++++++++++++
 2 files changed, 26 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list