public inbox for [email protected]
help / color / mirror / Atom feedFrom: SCHOEMANS Maxime <[email protected]>
To: Bradford Boyle <[email protected]>
Cc: Christoph Berg <[email protected]>
Cc: [email protected] <[email protected]>
Cc: Esteban Zimanyi <[email protected]>
Subject: Re: Updated packaging for MobilityDB 1.1.0
Date: Thu, 18 Apr 2024 15:08:11 +0000
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAOMoQbSsynQR2LPFxSRzd+n9-hyVkVgTq6jhA-JccBktpULOYA@mail.gmail.com>
References: <CAOMoQbTOZ0ZLUnsu2Z8NJkS3JrjKDpbYgfWWn0KD_jGBJHnj6g@mail.gmail.com>
<[email protected]>
<[email protected]>
<CAOMoQbSx15rmheFUXH+8=ddXcpbFKhEFUfu7jd2=hbvaW1v6BQ@mail.gmail.com>
<[email protected]>
<[email protected]>
<CAOMoQbQS5b5i7ZAomy9ro9=xFVMLC-HcAB+ZDGxxueZFMK8UWg@mail.gmail.com>
<[email protected]>
<CAOMoQbSYKDLMjcb432zwpzyV5YbboQdtoRCVVtpHy=+7M1cXVQ@mail.gmail.com>
<[email protected]>
<CAOMoQbSsynQR2LPFxSRzd+n9-hyVkVgTq6jhA-JccBktpULOYA@mail.gmail.com>
Hi Bradford,
We have been wanting to avoid writing the config files in the source
tree for some time now, so the patch with the fixed for the build is
very much appreciated.
You are welcome to send a PR to the develop branch [1]on the mobilitydb
repository with these changes.
Concerning the failing tests, we indeed did not catch these as they only
appear when running postgres with debug enabled.
We will update our tests to avoid missing these in the future.
In the mean time, I have fixed the issues on our develop branch [2], so
we could produce a new bugfix release with these fixes and the build
patch if this is the only remaining blocker.
I am attaching the patch with the fixes so you can test it out before we
produce the release.
Let us know if there are any other issues or if we can assist you in
producing the PR with the build patch.
Best,
Maxime
[1]: https://github.com/MobilityDB/MobilityDB/tree/develop
[2]:
https://github.com/mobilityDB/MobilityDB/compare/942b10c47e7966f3d0b61a1d3a66e0400ee4769d...6e0e6572...
Attachments:
[text/x-patch] fix_memory_bugs.patch (3.3K, 2-fix_memory_bugs.patch)
download | inline diff:
diff --git a/meos/src/general/type_out.c b/meos/src/general/type_out.c
index c3cadb057..350ca30fe 100644
--- a/meos/src/general/type_out.c
+++ b/meos/src/general/type_out.c
@@ -848,7 +848,7 @@ tsequenceset_mfjson_size(const TSequenceSet *ss, bool isgeo, bool hasz,
size += ( isgeo ? sizeof("{'coordinates':[],") : sizeof("{'values':[],") ) * ss->count;
size += sizeof("'datetimes':[],'lower_inc':false,'upper_inc':false},") * ss->count;
if (isgeo)
- size = coordinates_mfjson_size(ss->totalcount, hasz, precision);
+ size += coordinates_mfjson_size(ss->totalcount, hasz, precision);
else
{
for (int i = 0; i < ss->count; i++)
diff --git a/mobilitydb/src/npoint/tnpoint_gin.c b/mobilitydb/src/npoint/tnpoint_gin.c
index d011aa535..de9441447 100644
--- a/mobilitydb/src/npoint/tnpoint_gin.c
+++ b/mobilitydb/src/npoint/tnpoint_gin.c
@@ -75,9 +75,9 @@ Tnpoint_gin_extract_value(PG_FUNCTION_ARGS)
Datum *elems = palloc(sizeof(Datum) * routes->count);
for (int i = 0; i < routes->count; i++)
elems[i] = Int64GetDatum(SET_VAL_N(routes, i));
- pfree(routes);
*nkeys = routes->count;
*nullFlags = NULL;
+ pfree(routes);
PG_FREE_IF_COPY(temp, 0);
PG_RETURN_POINTER(elems);
}
@@ -127,9 +127,9 @@ Tnpoint_gin_extract_query(PG_FUNCTION_ARGS)
elems = palloc(sizeof(Datum) * routes->count);
for (int i = 0; i < routes->count; i++)
elems[i] = Int64GetDatum(SET_VAL_N(routes, i));
- pfree(routes);
*nkeys = routes->count;
*searchMode = GIN_SEARCH_MODE_DEFAULT;
+ pfree(routes);
PG_FREE_IF_COPY(temp, 0);
break;
default:
diff --git a/postgis/liblwgeom/lwhomogenize.c b/postgis/liblwgeom/lwhomogenize.c
index 70c39e9ee..ac20ab7a7 100644
--- a/postgis/liblwgeom/lwhomogenize.c
+++ b/postgis/liblwgeom/lwhomogenize.c
@@ -101,7 +101,7 @@ lwcollection_build_buffer(const LWCOLLECTION *col, HomogenizeBuffer *buffer)
buffer->buf[geom->type] = bufcol;
}
/* Add sub-geom to buffer */
- lwcollection_add_lwgeom(buffer->buf[geom->type], lwgeom_clone(geom));
+ lwcollection_add_lwgeom(buffer->buf[geom->type], lwgeom_clone_deep(geom));
/* Increment count for this singleton type */
buffer->cnt[geom->type]++;
break;
@@ -217,7 +217,7 @@ lwgeom_homogenize(const LWGEOM *geom)
return lwcollection_as_lwgeom(lwcollection_construct_empty(geom->type, geom->srid, lwgeom_has_z(geom), lwgeom_has_m(geom)));
}
- return lwgeom_clone(geom);
+ return lwgeom_clone_deep(geom);
}
switch (geom->type)
@@ -231,7 +231,7 @@ lwgeom_homogenize(const LWGEOM *geom)
case TRIANGLETYPE:
case CURVEPOLYTYPE:
case POLYGONTYPE:
- return lwgeom_clone(geom);
+ return lwgeom_clone_deep(geom);
/* Process homogeneous geometries lightly */
case MULTIPOINTTYPE:
@@ -247,7 +247,6 @@ lwgeom_homogenize(const LWGEOM *geom)
/* Strip single-entry multi-geometries down to singletons */
if ( col->ngeoms == 1 )
{
- // hgeom = lwgeom_clone((LWGEOM*)(col->geoms[0])); // MobilityDB changed
hgeom = lwgeom_clone_deep((LWGEOM*)(col->geoms[0]));
hgeom->srid = geom->srid;
if (geom->bbox)
@@ -256,7 +255,7 @@ lwgeom_homogenize(const LWGEOM *geom)
}
/* Return proper multigeometry untouched */
- return lwgeom_clone(geom);
+ return lwgeom_clone_deep(geom);
}
/* Work on anonymous collections separately */
view thread (18+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: Updated packaging for MobilityDB 1.1.0
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox