I have started a ticket, and have a fix in hand. https://trac.osgeo.org/postgis/ticket/6028
On Sat, Dec 13, 2025 at 6:28 PM Paul Ramsey <[email protected]> wrote: > First, thank you for a perfect minimal reproducer right up front. Very > helpful and I have confirmed a crash here too. I haven’t put it into the > debugger yet. Your empty polygon is pretty cool (as polygons tend to be) > since it is not a classic “polygon with no rings” empty polygon, it is a > “polygon with one ring that has no points” empty polygon. > > 01 // LITTLE ENDIAN. > 03000020 // POLYGON, WITH SRID > 97130000 // SRID 5015 > 01000000 // ONE RING > 00000000 // ZERO POINTS > > Why that causes a crash in the index code (or perhaps the bounding box > extraction code) is yet to be determined. > Anyways, very exciting to have a crasher, quite a rare defect these days. > ATB, > P. > > > On Dec 12, 2025, at 5:19 PM, Jorge Gustavo Rocha <[email protected]> wrote: > > TL;DR > > A GIST index on a EMPTY POLYGON (encoded by GDAL) crashes postgresql with > segmentation fault. > > drop table if exists fault; > create table fault (fid integer, geom geometry(Polygon,5015)); > INSERT INTO fault (fid, geom) VALUES (1, > '0103000020971300000100000000000000'::GEOMETRY); > CREATE INDEX fault_geom_index ON fault USING GIST (geom); > > >
