Ticket #1061 (closed defect: fixed)

Opened 23 months ago

Last modified 23 months ago

[raster] Using a CTE causes process to fail

Reported by: dustymugs Owned by: pracine
Priority: blocker Milestone: PostGIS 2.0.0
Component: raster Version: trunk
Keywords: Cc:

Description

The following query causes the postgresql process to abort.

WITH foo AS (
	SELECT
		ST_AddBand(
			ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
			, 1, '64BF', 0, 0
		)
	AS rast
)
SELECT rast FROM foo

The crash relates to the ST_AddBand as the following does not cause an abort.

WITH foo AS (
	SELECT
		ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
	AS rast
)
SELECT rast FROM foo

Change History

Changed 23 months ago by dustymugs

This appears to be directly related to setting the band pixel type to 64BF as any other pixel type does not cause the abort.

Changed 23 months ago by dustymugs

Message received on abort is:

postgres: rt_api.c:5040: rt_raster_deserialize: Assertion `!(((uintptr_t) ptr) % pixbytes)' failed.

Changed 23 months ago by dustymugs

This exception only affects 32-bit builds on both PostgreSQL 8.4 and 9.0.

Changed 23 months ago by dustymugs

  • status changed from new to closed
  • resolution set to fixed

Resolved in r7597. Expression in assertion tests changed to be "relative" rather than "absolute".

Note: See TracTickets for help on using tickets.