[SCM] PostGIS branch stable-3.6 updated. 3.6.4-100-g18c2f992bd

git at osgeo.org git at osgeo.org
Tue Jul 28 09:10:47 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.6 has been updated
       via  18c2f992bdea7ffd57ab90109247c00aacfead06 (commit)
       via  405117f0273bcc93221c7f28ee02db496f24e360 (commit)
      from  62cdbd58eb00a344fb1c606d220c8b9f123a7ec5 (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 18c2f992bdea7ffd57ab90109247c00aacfead06
Merge: 62cdbd58eb 405117f027
Author: Darafei Praliaskouski <komzpa at gmail.com>
Date:   Tue Jul 28 09:10:45 2026 -0700

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


commit 405117f0273bcc93221c7f28ee02db496f24e360
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 21b058ae9b..e720287762 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,8 @@ PostGIS 3.6.5
 
 * 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 fe5c2ca413..06ee820960 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 6ffdc5badc..44be675094 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