[SCM] PostGIS branch stable-3.4 updated. 3.4.6-106-gec59a26b9f

git at osgeo.org git at osgeo.org
Tue Jul 28 09:11:20 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.4 has been updated
       via  ec59a26b9f35de7b2125aa40caac58dbd8116d14 (commit)
       via  0463e6035919099134f96bab1a4c66021412ce0f (commit)
      from  8531cb06162a51b7039953ff086995bdeecf7f32 (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 ec59a26b9f35de7b2125aa40caac58dbd8116d14
Merge: 8531cb0616 0463e60359
Author: Darafei Praliaskouski <komzpa at gmail.com>
Date:   Tue Jul 28 09:11:19 2026 -0700

    Merge pull request 'Initialize GSERIALIZED peek test fixtures on stable-3.4' (!610) from Komzpa/postgis:fix/gserialized-peek-valgrind-stable-3.4-20260728 into stable-3.4
    
    This backports the master fixture initialization from https://gitea.osgeo.org/postgis/postgis/pulls/569 to stable-3.4.
    
    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.4 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'`.
    
    Reviewed-on: https://gitea.osgeo.org/postgis/postgis/pulls/610


commit 0463e6035919099134f96bab1a4c66021412ce0f
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 a9742367e9..0c2d3d10a3 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,8 @@ PostGIS 3.4.7
  
 * 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