Opened 13 years ago

Closed 13 years ago

#1061 closed defect (fixed)

[raster] Using a CTE causes process to fail

Reported by: dustymugs Owned by: pracine
Priority: blocker Milestone: PostGIS 2.0.0
Component: raster Version: master
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 (4)

comment:1 by dustymugs, 13 years ago

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

comment:2 by dustymugs, 13 years ago

Message received on abort is:

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

comment:3 by dustymugs, 13 years ago

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

comment:4 by dustymugs, 13 years ago

Resolution: fixed
Status: newclosed

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

Note: See TracTickets for help on using tickets.