[SCM] PostGIS branch master updated. 3.7.0rc1-35-g17189b294
git at osgeo.org
git at osgeo.org
Mon Sep 7 06:23:55 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 "PostGIS".
The branch, master has been updated
via 17189b294f0094a60546c3f94973de6658f2db0b (commit)
via e150cb8d27447ab20a793bf783e4b9c64e072871 (commit)
via df26a094f342442572ea7132874a4a5c2a41670f (commit)
via e1cabf91a2c80a8dbc32a88391b10dc404415dad (commit)
from 3ad40ec15db646e492a730c5d9fa40567b82706a (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 17189b294f0094a60546c3f94973de6658f2db0b
Merge: 3ad40ec15 e150cb8d2
Author: Darafei Praliaskouski <komzpa at gmail.com>
Date: Mon Sep 7 06:23:53 2026 -0700
Merge pull request 'Guard absent selectivity operands before reading node tags' (!771) from Komzpa/postgis:codex/postgis-1175-review-20260907 into master
Prevent `gserialized_sel_internal` from passing an absent `other` node to
PostgreSQL's `IsA` macro. Release `VariableStatData` and return the existing
default selectivity before checking the node tag; the existing `Const` NULL
path remains unchanged.
This defensive check does not change the handling of SQL NULL values.
Original patch by Maksim Korotkov <m.korotkov at postgrespro.ru>.
Closes https://github.com/postgis/postgis/pull/1175
Reviewed-on: https://gitea.osgeo.org/postgis/postgis/pulls/771
commit e150cb8d27447ab20a793bf783e4b9c64e072871
Author: Darafei Praliaskouski <me at komzpa.net>
Date: Mon Sep 7 17:13:18 2026 +0400
Document defensive selectivity operand check in NEWS
diff --git a/NEWS b/NEWS
index e9da6cc3c..069a05a2d 100644
--- a/NEWS
+++ b/NEWS
@@ -132,6 +132,9 @@ To take advantage of all postgis_sfcgal extension features SFCGAL 2.3+ is needed
* Bug Fixes *
+ - GH-1175, Guard missing operands before reading node tags in
+ spatial selectivity estimation (Maksim Korotkov)
+
- #6118, Reject empty geometry type modifiers without an out-of-bounds read
(Egor Ivkov)
- Fix WKB and TWKB parser resource exhaustion on malformed input
commit df26a094f342442572ea7132874a4a5c2a41670f
Merge: e1cabf91a 3ad40ec15
Author: Darafei Praliaskouski <me at komzpa.net>
Date: Mon Sep 7 16:43:30 2026 +0400
Merge commit '3ad40ec15db646e492a730c5d9fa40567b82706a' into codex/postgis-1175-review-20260907
commit e1cabf91a2c80a8dbc32a88391b10dc404415dad
Author: Maksim Korotkov <m.korotkov at postgrespro.ru>
Date: Sun Aug 23 11:52:29 2026 +0300
Make selectivity NULL-argument guard NULL-safe
get_restriction_variable() can return true with *other NULL when
estimate_expression_value() folds an expression to NULL (e.g. NULLIF
or a NULL Const). The existing guard relied on IsA(other, Const),
which dereferences other; a NULL other would hit nodeTag(NULL) and
crash before the check ever ran.
Fixes: c84b3f996e2eaea3ba3afeecb783113ab16f0982
Signed-off-by: Maksim Korotkov <m.korotkov at postgrespro.ru>
diff --git a/postgis/gserialized_estimate.c b/postgis/gserialized_estimate.c
index 15791f382..c29df1b0c 100644
--- a/postgis/gserialized_estimate.c
+++ b/postgis/gserialized_estimate.c
@@ -2052,6 +2052,13 @@ gserialized_sel_internal(PlannerInfo *root, List *args, int varRelid, int mode)
return DEFAULT_ND_SEL;
}
+ if (other == NULL)
+ {
+ ReleaseVariableStats(vardata);
+ POSTGIS_DEBUGF(2, "%s: no other argument, returning default selectivity %g", __func__, DEFAULT_ND_SEL);
+ return DEFAULT_ND_SEL;
+ }
+
if (!IsA(other, Const))
{
ReleaseVariableStats(vardata);
@@ -2060,7 +2067,7 @@ gserialized_sel_internal(PlannerInfo *root, List *args, int varRelid, int mode)
}
otherConst = (Const*)other;
- if ((!otherConst) || otherConst->constisnull)
+ if (otherConst->constisnull)
{
ReleaseVariableStats(vardata);
POSTGIS_DEBUGF(2, "%s: constant argument is NULL", __func__);
-----------------------------------------------------------------------
Summary of changes:
NEWS | 3 +++
postgis/gserialized_estimate.c | 9 ++++++++-
2 files changed, 11 insertions(+), 1 deletion(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list