[SCM] PostGIS branch stable-3.3 updated. 3.3.10-103-g4add825b2b
git at osgeo.org
git at osgeo.org
Tue Jul 28 09:11:25 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.3 has been updated
via 4add825b2b0dc97dcbe24b48efa39f86d46d9599 (commit)
via bfe56e94a295b6bdd5e4c8fa38a95d1d6c9f9c09 (commit)
from bb4330e17746e0f0ca433942f15b6f5e20c26bbd (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 4add825b2b0dc97dcbe24b48efa39f86d46d9599
Merge: bb4330e177 bfe56e94a2
Author: Darafei Praliaskouski <komzpa at gmail.com>
Date: Tue Jul 28 09:11:23 2026 -0700
Merge pull request 'Initialize GSERIALIZED peek test fixtures on stable-3.3' (!611) from Komzpa/postgis:fix/gserialized-peek-valgrind-stable-3.3-20260728 into stable-3.3
This backports the master fixture initialization from https://gitea.osgeo.org/postgis/postgis/pulls/569 to stable-3.3.
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.3 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/611
commit bfe56e94a295b6bdd5e4c8fa38a95d1d6c9f9c09
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 1e91175bdd..75203f7978 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,8 @@ PostGIS 3.3.11
* Bug Fixes and Enhancements *
+ - 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