[SCM] PostGIS branch stable-3.2 updated. 3.2.10-95-g2031dfeff0

git at osgeo.org git at osgeo.org
Tue Jul 28 09:11:31 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, stable-3.2 has been updated
       via  2031dfeff00afb8454a9057f01bc097e5233c535 (commit)
       via  398ed2f02bbe948d25e36d11facd24f73e63b2ea (commit)
      from  681f80ec75d22a1b6f3c9288a84d5bcb2ce4547b (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 2031dfeff00afb8454a9057f01bc097e5233c535
Merge: 681f80ec75 398ed2f02b
Author: Darafei Praliaskouski <komzpa at gmail.com>
Date:   Tue Jul 28 09:11:30 2026 -0700

    Merge pull request 'Initialize GSERIALIZED peek test fixtures on stable-3.2' (!612) from Komzpa/postgis:fix/gserialized-peek-valgrind-stable-3.2-20260728 into stable-3.2
    
    This backports the master fixture initialization from https://gitea.osgeo.org/postgis/postgis/pulls/569 to stable-3.2.
    
    The safety backport made the GSERIALIZED peek code validate payload bounds using the serialized size. The CUnit fixtures were manually allocated and then filled from the payload onward, leaving the header size and SRID bytes uninitialized. Valgrind therefore reported uninitialized reads in the unit test fixture even though the bounds-checking code is doing the right thing.
    
    The fix initializes the handcrafted GSERIALIZED header before writing the payload, matching master. The stable-3.2 NEWS entry cites GT-569, the master pull request number.
    
    Tested with `make -C liblwgeom check-unit CUNIT_WITH_VALGRIND=YES CUNIT_VALGRIND_FLAGS='--leak-check=full --error-exitcode=1'`. This local run was configured with `--without-pgconfig` because the installed `pg_config` is PostgreSQL 18 while stable-3.2 supports PostgreSQL 9.6 through 15; the Valgrind-checked target is the liblwgeom CUnit suite.
    
    Reviewed-on: https://gitea.osgeo.org/postgis/postgis/pulls/612


commit 398ed2f02bbe948d25e36d11facd24f73e63b2ea
Author: Darafei Praliaskouski <me at komzpa.net>
Date:   Tue Jul 28 02:24:34 2026 +0400

    Initialize GSERIALIZED peek test fixtures

diff --git a/NEWS b/NEWS
index 3255741318..06e740541d 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,8 @@ PostGIS 3.2.11
 
 * Bug Fixes *
 
+ - GT-569, Initialize GSERIALIZED peek test fixtures so check-unit stays
+   clean under Valgrind (Darafei Praliaskouski)
  - GT-575, Scope interrupt regression timeouts to the statements being
    canceled (Darafei Praliaskouski)
  - GT-522, Reject malformed GSERIALIZED payload counts before deserializing
diff --git a/liblwgeom/cunit/cu_gserialized1.c b/liblwgeom/cunit/cu_gserialized1.c
index 4afe2294c7..29a760cfb4 100644
--- a/liblwgeom/cunit/cu_gserialized1.c
+++ b/liblwgeom/cunit/cu_gserialized1.c
@@ -1183,10 +1183,13 @@ static void test_gserialized1_peek_gbox_p_fails_for_unsupported_cases(void)
 		GSERIALIZED* gser = lwalloc(expected_size);
 		uint8_t* ptr = (uint8_t*) gser;
 
-		ptr += 8; // Skip header
-		gserialized1_from_lwgeom_any(geom, ptr);
+		gser->size = expected_size << 2;
+		gserialized1_set_srid(gser, geom->srid);
 		gser->gflags = lwflags_get_g1flags(geom->flags);
 
+		ptr += 8; /* Skip header */
+		gserialized1_from_lwgeom_any(geom, ptr);
+
 		CU_ASSERT_FALSE(gserialized1_has_bbox(gser));
 		CU_ASSERT_EQUAL(LW_FAILURE, gserialized1_peek_gbox_p(gser, &box));
 
diff --git a/liblwgeom/cunit/cu_gserialized2.c b/liblwgeom/cunit/cu_gserialized2.c
index 3dc36a09a4..9cf758029a 100644
--- a/liblwgeom/cunit/cu_gserialized2.c
+++ b/liblwgeom/cunit/cu_gserialized2.c
@@ -449,10 +449,13 @@ static void test_gserialized2_peek_gbox_p_fails_for_unsupported_cases(void)
 		GSERIALIZED* gser = lwalloc(expected_size);
 		uint8_t* ptr = (uint8_t*) gser;
 
-		ptr += 8; // Skip header
-		gserialized2_from_lwgeom_any(geom, ptr);
+		LWSIZE_SET(gser->size, expected_size);
+		gserialized2_set_srid(gser, geom->srid);
 		gser->gflags = lwflags_get_g2flags(geom->flags);
 
+		ptr += 8; /* Skip header */
+		gserialized2_from_lwgeom_any(geom, ptr);
+
 		CU_ASSERT_FALSE(gserialized2_has_bbox(gser));
 		CU_ASSERT_EQUAL(LW_FAILURE, gserialized2_peek_gbox_p(gser, &box));
 

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

Summary of changes:
 NEWS                              | 2 ++
 liblwgeom/cunit/cu_gserialized1.c | 7 +++++--
 liblwgeom/cunit/cu_gserialized2.c | 7 +++++--
 3 files changed, 12 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list