Opened 8 months ago

Closed 4 months ago

Last modified 4 months ago

#3704 closed defect (fixed)

ST_AsX3D returns random data / crashes client

Reported by: Mike Toews Owned by: robe
Priority: critical Milestone: PostGIS 2.3.3
Component: postgis Version: 2.3.x
Keywords: Cc:


Testing ST_AsX3D on various geometries gives varied and interesting results with PostGIS 2.3 on Windows. I think these are critical bugs, because they return random data or crash the client.

has unexpected behavior, often returning a zero-length string, or random junk like @ or 2.3.dll, but sometimes raising:

ERROR: invalid byte sequence for encoding "UTF8": 0xec 0xa3

kills the client:

server closed the connection unexpectedly

This probably means the server terminated abnormally before or while processing the request.

The connection to the server was lost. Attempting reset: Failed. !>

Non-critical bugs with other geometry types will be filed in the next bug report...

Change History (5)

comment:1 Changed 8 months ago by robe

Owner: changed from pramsey to robe

comment:2 Changed 5 months ago by robe

ah indeed. More concerning is why my garden test didn't pick this up as this would be one that should have been tested.

comment:3 Changed 4 months ago by robe

In 15444:

ST_AsX3D handle empty geometries
References #3704 for PostGIS 2.4 (trunk)

comment:4 Changed 4 months ago by robe

Resolution: fixed
Status: newclosed

In 15445:

ST_AsX3D handle empty geometries
Closes #3704 for PostGIS 2.3.3

comment:5 Changed 4 months ago by robe

okay figured out why garden test didn't pick this up. It was testing this:

SELECT ST_AsX3D(foo1.the_geom, 3, 5)  As result
							FROM ((SELECT ST_GeomFromText('POINT EMPTY',4326) As the_geom
			UNION ALL SELECT ST_GeomFromText('MULTIPOINT EMPTY',4326) As the_geom
			UNION ALL SELECT ST_GeomFromText('MULTIPOLYGON EMPTY',4326) As the_geom
			UNION ALL SELECT ST_GeomFromText('LINESTRING EMPTY',4326) As the_geom
			UNION ALL SELECT ST_GeomFromText('MULTILINESTRING EMPTY',4326) As the_geom ) ) As foo1 LIMIT 3;

Which because of the limit never got to testing LINESTRING EMPTY. Guess I got to increase the limit on this so covers the number of empties.

Note: See TracTickets for help on using tickets.