[postgis-devel] Failed assert in rt_raster_from_band
Jaime Casanova
jaime.casanova at 2ndquadrant.com
Thu Jun 4 10:33:53 PDT 2020
Hi,
I'm wrong on assuming this is simply a lack of check? something like
this should do:
--- a/raster/rt_pg/rtpg_mapalgebra.c
+++ b/raster/rt_pg/rtpg_mapalgebra.c
@@ -2897,7 +2897,11 @@ Datum RASTER_union_finalfn(PG_FUNCTION_ARGS)
}
}
else
+ {
_raster = iwr->bandarg[i].raster[0];
+ if (_raster == NULL)
+ continue;
+ }
/* first band, _rtn doesn't exist */
if (i < 1) {
On Thu, 4 Jun 2020 at 02:34, Jaime Casanova
<jaime.casanova at 2ndquadrant.com> wrote:
>
> Hi everyone,
>
> i was running sqlsmith on postgresql with postgis enabled and got
> failed assertion very quickly.
>
> postgres version
> --------------------------
> PostgreSQL 12.3 (Debian 12.3-1.pgdg100+1) on x86_64-pc-linux-gnu,
> compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit
>
> postgis full version
> --------------------------
> POSTGIS="2.5.4" [EXTENSION] PGSQL="120" GEOS="3.7.1-CAPI-1.11.1
> 27a5e771" PROJ="Rel. 5.2.0, September 15th, 2018" GDAL="GDAL 2.4.0,
> released 2018/12/14" LIBXML="2.9.4" LIBJSON="0.12.1"
> LIBPROTOBUF="1.3.1" RASTER
>
> btw, i was running this on a debian 10 machine
>
> attached are:
> - a script to create a single postgis enabled table with some data
> - the query that crashes
> - gdb "bt full" output
>
> Anything else I can do to help debug this?
>
> --
> Jaime Casanova www.2ndQuadrant.com
> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Jaime Casanova www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
More information about the postgis-devel
mailing list