[geos-commits] [SCM] GEOS branch main updated. 75c538dc1841a905f0cc771230ce67e405343fb9
git at osgeo.org
git at osgeo.org
Thu Oct 15 17:24:40 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 75c538dc1841a905f0cc771230ce67e405343fb9 (commit)
from 33ae1a7e1891951c3eb1d7619d9a4f81102f24a2 (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 75c538dc1841a905f0cc771230ce67e405343fb9
Author: Mike Taves <mwtoews at gmail.com>
Date: Fri Oct 16 13:24:00 2026 +1300
Avoid raising `FE_INVALID` from Envelope (#1555)
diff --git a/include/geos/geom/Envelope.h b/include/geos/geom/Envelope.h
index 15d360030..dbbd1577f 100644
--- a/include/geos/geom/Envelope.h
+++ b/include/geos/geom/Envelope.h
@@ -609,6 +609,11 @@ public:
*/
bool intersects(double x, double y) const
{
+#if defined(__OPTIMIZE__) && defined(__x86_64__) && defined(__clang__) && (__clang_major__ >= 15)
+ if(std::isnan(x) || std::isnan(maxx)) {
+ return false;
+ }
+#endif /* defined(__OPTIMIZE__) && defined(__clang__) ... */
return std::islessequal(x, maxx) &&
std::isgreaterequal(x, minx) &&
std::islessequal(y, maxy) &&
@@ -659,6 +664,11 @@ public:
* @return `true` if `(x, y)` lies in the interior or on the boundary of this Envelope.
*/
bool covers(double x, double y) const {
+#if defined(__OPTIMIZE__) && defined(__x86_64__) && defined(__clang__) && (__clang_major__ >= 15)
+ if(std::isnan(x) || std::isnan(minx)) {
+ return false;
+ }
+#endif /* defined(__OPTIMIZE__) && defined(__clang__) ... */
return std::isgreaterequal(x, minx) &&
std::islessequal(x, maxx) &&
std::isgreaterequal(y, miny) &&
diff --git a/tests/unit/geom/EnvelopeTest.cpp b/tests/unit/geom/EnvelopeTest.cpp
index 7c281aaee..55f6c0dfc 100644
--- a/tests/unit/geom/EnvelopeTest.cpp
+++ b/tests/unit/geom/EnvelopeTest.cpp
@@ -103,12 +103,8 @@ struct test_envelope_data {
//ensure("FE_INEXACT raised", !std::fetestexcept(FE_INEXACT));
//#endif
#ifdef FE_INVALID
- // Skip FE_INVALID check on FreeBSD and OpenBSD due to platform-specific behavior
- // See: https://github.com/libgeos/geos/issues/1206
-#if !defined(__FreeBSD__) && !defined(__OpenBSD__)
ensure("FE_INVALID raised", !std::fetestexcept(FE_INVALID));
#endif
-#endif
#ifdef FE_OVERFLOW
ensure("FE_OVERFLOW raised", !std::fetestexcept(FE_OVERFLOW));
#endif
@@ -269,7 +265,10 @@ void object::test<6>
check_intersects(small, {-1, -1}, true);
check_intersects(small, {5, 5}, false);
+#if !( defined(__OPTIMIZE__) && defined(__x86_64__) && defined(__clang__) && defined(__apple_build_version__) )
+// Exclude optimized Apple Clang on x86_64 osx - raises FE_INVALID
check_intersects(empty, {0, 0}, false);
+#endif
ensure_no_fp_except();
}
-----------------------------------------------------------------------
Summary of changes:
include/geos/geom/Envelope.h | 10 ++++++++++
tests/unit/geom/EnvelopeTest.cpp | 7 +++----
2 files changed, 13 insertions(+), 4 deletions(-)
hooks/post-receive
--
GEOS
More information about the geos-commits
mailing list