[postgis-tickets] [SCM] PostGIS branch stable-3.1 updated. 3.1.7-11-gd939bbf43

git at osgeo.org git at osgeo.org
Fri Oct 28 18:53:16 PDT 2022


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, stable-3.1 has been updated
       via  d939bbf43e6b854f9fa379f47e7e0134cb68ab5e (commit)
       via  7d0282b0a4a4e61ccc0f9686f125c03ebfc6656b (commit)
      from  b5bf4267be4001647ed949561b52d6f72c1eb6b7 (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 d939bbf43e6b854f9fa379f47e7e0134cb68ab5e
Author: Regina Obe <lr at pcorp.us>
Date:   Fri Oct 28 21:52:23 2022 -0400

    1. Have Berrie64 fail on first failure
    2. Have build postgis with lib-version so multiple can be installed in
    same cluster

diff --git a/ci/berrie64/postgis_regress.sh b/ci/berrie64/postgis_regress.sh
index 5182d845e..0d4876132 100644
--- a/ci/berrie64/postgis_regress.sh
+++ b/ci/berrie64/postgis_regress.sh
@@ -1,4 +1,5 @@
 #!/usr/bin/env bash
+set -e
 # Berrie64 is a 64-bit Rasberry Pi Arm managed by Bruce Rindahl
 ## BRANCH is passed in via jenkins which is set via gitea web hook
 #export BRANCH=618a67b1d6fc223dd5a4c0b02c824939f21dbd65
@@ -15,12 +16,13 @@ echo $PATH
 cd ${WORKSPACE}/PostGIS_Worker_Run/label/${label}/$BRANCH
 
 sh autogen.sh
-./configure --with-pgconfig=${PGPATH}/bin/pg_config --with-geosconfig=${GEOS_PATH}/bin/geos-config
+./configure --with-pgconfig=${PGPATH}/bin/pg_config --with-geosconfig=${GEOS_PATH}/bin/geos-config --with-library-minor-version
 #make clean
 make
 export err_status=0
 make check RUNTESTFLAGS="-v"
 make install
+
 make check RUNTESTFLAGS="-v --extension"
 err_status=$?
 

commit 7d0282b0a4a4e61ccc0f9686f125c03ebfc6656b
Author: Regina Obe <lr at pcorp.us>
Date:   Thu Oct 27 19:18:56 2022 -0400

    Fix crash in ST_SnapToGrid on Empties
    References #5241 for PostGIS 3.1.8

diff --git a/NEWS b/NEWS
index 6c04ffe2d..9d4a100fd 100644
--- a/NEWS
+++ b/NEWS
@@ -1,7 +1,7 @@
 PostGIS 3.1.8dev
 YYYY/MM/DD
 
-* Bug Fixes
+* Bug and Security Fixes
   - Add schema qual to upgrade util
   - #5240, ST_DumpPoints crash with empty polygon (Regina Obe)
   - #4648, Check function ownership at extension packaging time (Sandro Santilli)
diff --git a/liblwgeom/lwgeom.c b/liblwgeom/lwgeom.c
index a2d3d7f09..a3a39a698 100644
--- a/liblwgeom/lwgeom.c
+++ b/liblwgeom/lwgeom.c
@@ -2143,6 +2143,7 @@ void
 lwgeom_grid_in_place(LWGEOM *geom, const gridspec *grid)
 {
 	if (!geom) return;
+	if (lwgeom_is_empty(geom)) return;
 	switch ( geom->type )
 	{
 		case POINTTYPE:
diff --git a/regress/core/snaptogrid.sql b/regress/core/snaptogrid.sql
index 0b6f5bd97..ae12da4d9 100644
--- a/regress/core/snaptogrid.sql
+++ b/regress/core/snaptogrid.sql
@@ -19,3 +19,7 @@ WITH geom AS
     SELECT ST_SnapToGrid('POLYGON((0 0, 10 0, 10 10, 10.6 10, 10.5 10.5, 10 10, 0 10, 0 0))', 'POINT(0 0)', 10, 10, 10, 10) as g
 )
 Select ST_AsText(g) as geometry, postgis_getbbox(g) AS box from geom;
+
+-- #5241
+SELECT '#5241' AS t, ST_AsText(ST_SnapToGrid( ST_GeomFromText('MULTIPOLYGON (((9 9, 9 1, 1 1, 2 4, 7 7, 9 9)), EMPTY)', 4326),  20.1, 20.1, 20.1, 20.1));
+SELECT '#5241' AS t, ST_AsText(ST_SnapToGrid( ST_GeomFromText('MULTIPOLYGON (((9 9, 9 1, 1 1, 2 4, 7 7, 9 9)), EMPTY)', 4326), 0.2, 0.2, 0.2, 0.2));
diff --git a/regress/core/snaptogrid_expected b/regress/core/snaptogrid_expected
index 518c1734b..2e8f2b4ab 100644
--- a/regress/core/snaptogrid_expected
+++ b/regress/core/snaptogrid_expected
@@ -5,3 +5,5 @@ t
 t
 POLYGON((0 0,10 0,10 10,0 10,0 0))|BOX(0 0,10 10)
 POLYGON((0 0,10 0,10 10,0 10,0 0))|BOX(0 0,10 10)
+#5241|MULTIPOLYGON EMPTY
+#5241|MULTIPOLYGON(((9 9,9 1,1 1,2 4,7.000000000000001 7.000000000000001,9 9)))

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

Summary of changes:
 NEWS                             | 2 +-
 ci/berrie64/postgis_regress.sh   | 4 +++-
 liblwgeom/lwgeom.c               | 1 +
 regress/core/snaptogrid.sql      | 4 ++++
 regress/core/snaptogrid_expected | 2 ++
 5 files changed, 11 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list