Ticket #1734 (closed defect: fixed)

Opened 14 months ago

Last modified 14 months ago

Crash in GiST index with NULL item on inserting geography Point

Reported by: realityexists Owned by: strk
Priority: critical Milestone: PostGIS 2.0.0
Component: postgis Version: trunk
Keywords: Cc:

Description

When I run my application against PostGIS r9575 it crashes when inserting a perfectly ordinary geography Point (with a GiST index defined on the column). The point is specified as

ST_GeomFromEWKT('SRID=4326;POINT(-2.7546111 8.0365000)')::geography

and the stack trace is attached.

This happens on 32-bit Linux on a newly created database. PostgreSQL 9.1.3.

Attachments

GiST insert crash.txt Download (3.2 KB) - added by realityexists 14 months ago.

Change History

Changed 14 months ago by realityexists

Changed 14 months ago by strk

Could you please provide a complete script from table creation to crash ?

I can't reproduce with this:

create table test (g geography);
create index gt on test using gist (g);
INSERT INTO test (g) select 'SRID=4326;POINT(-2.7546111 8.0365000)'::geography from generate_series(1,1024);

Can you ?

Changed 14 months ago by realityexists

Just insert a single NULL first and then it crashes, ie.

create table test (g geography);
create index gt on test using gist (g);
INSERT INTO test(g) VALUES (NULL);
INSERT INTO test (g) select 'SRID=4326;POINT(-2.7546111 8.0365000)'::geography from generate_series(1,1024);

Changed 14 months ago by strk

  • summary changed from Crash in GiST index on inserting geography Point to Crash in GiST index with NULL item on inserting geography Point

confirmed !

Changed 14 months ago by strk

  • owner changed from pramsey to strk
  • status changed from new to assigned

I've a patch, before committing I'll need to include regression testing

Changed 14 months ago by strk

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

Fixed in r9577 (calls for RC2)

Note: See TracTickets for help on using tickets.