[postgis-tickets] [PostGIS] #3651: ST_Orientation crashes the backend

PostGIS trac at osgeo.org
Fri Dec 9 14:16:48 PST 2016


#3651: ST_Orientation crashes the backend
--------------------------+----------------------------
  Reporter:  postgispaul  |      Owner:  colivier
      Type:  defect       |     Status:  new
  Priority:  high         |  Milestone:  PostGIS SFCGAL
 Component:  sfcgal       |    Version:  2.3.x
Resolution:               |   Keywords:
--------------------------+----------------------------

Comment (by robe):

 That's my test against VC++ build.  My PostgreSQL mingw debug build gives:


 {{{
 #65175 0x000000006d36b325 in libSFCGAL!_ZN6SFCGAL7VersionEv ()
    from C:\ming64gcc48\projects\cgal\rel-
 sfcgal-1.3.0w64gcc48\bin\libSFCGAL.dll
 #65176 0x000000006d29ba2f in
 libSFCGAL!_ZN6SFCGAL9algorithm26isCounterClockWiseOrientedERKNS_10LineStringE
 ()
    from C:\ming64gcc48\projects\cgal\rel-
 sfcgal-1.3.0w64gcc48\bin\libSFCGAL.dll
 #65177 0x000000006d2b5eb8 in sfcgal_geometry_orientation ()
    from C:\ming64gcc48\projects\cgal\rel-
 sfcgal-1.3.0w64gcc48\bin\libSFCGAL.dll
 #65178 0x00000000633d9fd9 in sfcgal_orientation ()
    from
 C:\ming64gcc48\projects\postgresql\rel\pg9.6w64gcc48\lib\postgis-2.4.dll
 #65179 0x000000000058c94b in ExecMakeFunctionResultNoSets
 (fcache=0xe108ae0,
     econtext=0xe109390, isNull=0x29ae8bc "", isDone=<optimized out>)
     at execQual.c:2041
 #65180 0x0000000000591290 in ExecEvalExprSwitchContext (
     expression=expression at entry=0xe108ae0, econtext=<optimized out>,
     isNull=isNull at entry=0x29ae8bc "", isDone=isDone at entry=0x0)
     at execQual.c:4445
 #65181 0x0000000000622359 in evaluate_expr (expr=<optimized out>,
     result_type=result_type at entry=23,
 result_typmod=result_typmod at entry=-1,
     result_collation=result_collation at entry=0) at clauses.c:4670
 #65182 0x0000000000625353 in evaluate_function (func_tuple=0xe0ca8c8,
     context=0x29aed50, funcvariadic=0 '\000', args=0xe102c20,
 input_collid=0,
     result_collid=0, result_typmod=-1, result_type=23, funcid=36944)
     at clauses.c:4223
 #65183 simplify_function (funcid=36944, result_type=23, result_typmod=-1,
     result_collid=result_collid at entry=0,
 input_collid=input_collid at entry=0,
     args_p=args_p at entry=0x29aea98, funcvariadic=funcvariadic at entry=0
 '\000',
     process_args=process_args at entry=1 '\001',
     allow_non_const=allow_non_const at entry=1 '\001',
     context=context at entry=0x29aed50) at clauses.c:3862
 #65184 0x0000000000624586 in eval_const_expressions_mutator
 (node=0x2d1200,
     context=0x29aed50) at clauses.c:2535
 #65185 0x00000000005c9d29 in expression_tree_mutator (
     node=node at entry=0x2d0918,
     mutator=mutator at entry=0x623c60 <eval_const_expressions_mutator>,
     context=context at entry=0x29aed50) at nodeFuncs.c:2974
 #65186 0x0000000000624042 in eval_const_expressions_mutator
 (node=0x2d0918,
     context=0x29aed50) at clauses.c:3512
 #65187 0x00000000005c9bb9 in expression_tree_mutator (
     node=node at entry=0xe1029f0,
     mutator=mutator at entry=0x623c60 <eval_const_expressions_mutator>,
     context=context at entry=0x29aed50) at nodeFuncs.c:2869
 #65188 0x0000000000624042 in eval_const_expressions_mutator
 (node=0xe1029f0,
     context=context at entry=0x29aed50) at clauses.c:3512
 #65189 0x0000000000626242 in eval_const_expressions (
     root=root at entry=0xe108600, node=<optimized out>) at clauses.c:2377
 #65190 0x000000000060f0f6 in preprocess_expression (
     root=root at entry=0xe108600, expr=<optimized out>, kind=kind at entry=1)
     at planner.c:849
 #65191 0x00000000006131ad in subquery_planner (glob=glob at entry=0x2d0828,
     parse=parse at entry=0x2d02a0, parent_root=parent_root at entry=0x0,
     hasRecursion=hasRecursion at entry=0 '\000',
     tuple_fraction=tuple_fraction at entry=0) at planner.c:589
 #65192 0x0000000000614469 in standard_planner (parse=0x2d02a0,
     cursorOptions=256, boundParams=0x0) at planner.c:292
 #65193 0x00000000006af29c in pg_plan_query (querytree=0x2d02a0,
     cursorOptions=cursorOptions at entry=256,
 boundParams=boundParams at entry=0x0)
     at postgres.c:798
 #65194 0x00000000006af39b in pg_plan_queries (querytrees=<optimized out>,
     cursorOptions=cursorOptions at entry=256,
 boundParams=boundParams at entry=0x0)
     at postgres.c:857
 #65195 0x00000000006b1617 in exec_simple_query (
     query_string=0x100000000000000 <error: Cannot access memory at address
 0x100000000000000>) at postgres.c:1022
 #65196 PostgresMain (argc=<optimized out>, argv=argv at entry=0x27be60,
     dbname=0x18001700160015 <error: Cannot access memory at address
 0x18001700160015>, username=<optimized out>) at postgres.c:4070
 #65197 0x000000000064809d in BackendRun (port=0x29af400) at
 postmaster.c:4270
 #65198 SubPostmasterMain (argc=argc at entry=3, argv=argv at entry=0x257f80)
     at postmaster.c:4760
 #65199 0x0000000000804ac8 in main (argc=3, argv=0x257f80) at main.c:205

 }}}

--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3651#comment:13>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list