Opened 11 years ago

Closed 11 years ago

#2191 closed defect (fixed)

PostGIS Segfault with "GEOMETRYCOLLECTION EMPTY"

Reported by: dkleinealbers Owned by: pramsey
Priority: critical Milestone: PostGIS 1.5.9
Component: postgis Version: 1.5.X
Keywords: Cc:

Description

The following query leads to a segfault in PostGIS (using 1.5.8 on Postgres 9.1): SELECT box(Envelope(Transform(GeomFromText('GEOMETRYCOLLECTION EMPTY',4326),4326)));

The stacktrace of the core dump is as follows: (gdb) bt #0 0x00007f303e80edf0 in box3d_to_box_p () from /usr/lib/postgresql/9.1/lib/postgis-1.5.so #1 0x00007f303e808e2b in LWGEOM_to_BOX () from /usr/lib/postgresql/9.1/lib/postgis-1.5.so #2 0x0000000000576505 in ?? () #3 0x0000000000577508 in ExecEvalExprSwitchContext () #4 0x00000000005e983d in ?? () #5 0x00000000005eb455 in ?? () #6 0x00000000005ebfef in ?? () #7 0x00000000005a527b in expression_tree_mutator () #8 0x00000000005ebda4 in ?? () #9 0x00000000005a58ea in expression_tree_mutator () #10 0x00000000005ebda4 in ?? () #11 0x00000000005ed7df in eval_const_expressions () #12 0x00000000005dc78d in ?? () #13 0x00000000005df528 in subquery_planner () #14 0x00000000005dfa09 in standard_planner () #15 0x000000000064036e in pg_plan_query () #16 0x0000000000640454 in pg_plan_queries () #17 0x00000000006422b2 in PostgresMain () #18 0x0000000000603203 in ?? () #19 0x0000000000603c71 in PostmasterMain () #20 0x000000000045a4e0 in main ()

The error is perfectly reproducible on multiple machines. Please let me know if you need any further information.

Change History (3)

comment:1 by dkleinealbers, 11 years ago

Stacktrace in better formatting:

(gdb) bt
#0 0x00007f303e80edf0 in box3d_to_box_p () from /usr/lib/postgresql/9.1/lib/postgis-1.5.so
#1 0x00007f303e808e2b in LWGEOM_to_BOX () from /usr/lib/postgresql/9.1/lib/postgis-1.5.so
#2 0x0000000000576505 in ?? ()
#3 0x0000000000577508 in ExecEvalExprSwitchContext ()
#4 0x00000000005e983d in ?? ()
#5 0x00000000005eb455 in ?? ()
#6 0x00000000005ebfef in ?? ()
#7 0x00000000005a527b in expression_tree_mutator ()
#8 0x00000000005ebda4 in ?? ()
#9 0x00000000005a58ea in expression_tree_mutator ()
#10 0x00000000005ebda4 in ?? ()
#11 0x00000000005ed7df in eval_const_expressions ()
#12 0x00000000005dc78d in ?? ()
#13 0x00000000005df528 in subquery_planner ()
#14 0x00000000005dfa09 in standard_planner ()
#15 0x000000000064036e in pg_plan_query ()
#16 0x0000000000640454 in pg_plan_queries ()
#17 0x00000000006422b2 in PostgresMain ()
#18 0x0000000000603203 in ?? ()
#19 0x0000000000603c71 in PostmasterMain ()
#20 0x000000000045a4e0 in main ()

comment:2 by pramsey, 11 years ago

Priority: mediumcritical

Confirmed, crashes 1.5 on OSX. Does not crash 2.0, so the future is safe.

comment:3 by pramsey, 11 years ago

Resolution: fixed
Status: newclosed

Fixed at r11524, thanks!

Note: See TracTickets for help on using tickets.