Opened 11 years ago

Closed 11 years ago

#1734 closed defect (fixed)

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: master
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 (1)

GiST insert crash.txt (3.2 KB ) - added by realityexists 11 years ago.

Download all attachments as: .zip

Change History (6)

by realityexists, 11 years ago

Attachment: GiST insert crash.txt added

comment:1 by strk, 11 years ago

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 ?

comment:2 by realityexists, 11 years ago

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);

comment:3 by strk, 11 years ago

Summary: Crash in GiST index on inserting geography PointCrash in GiST index with NULL item on inserting geography Point

confirmed !

comment:4 by strk, 11 years ago

Owner: changed from pramsey to strk
Status: newassigned

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

comment:5 by strk, 11 years ago

Resolution: fixed
Status: assignedclosed

Fixed in r9577 (calls for RC2)

Note: See TracTickets for help on using tickets.