[postgis-tickets] [PostGIS] #4720: Memory leak when using Geography

PostGIS trac at osgeo.org
Fri Sep 25 06:49:29 PDT 2020


#4720: Memory leak when using Geography
----------------------+------------------------------
  Reporter:  kthujvu  |      Owner:  pramsey
      Type:  defect   |     Status:  new
  Priority:  medium   |  Milestone:  PostGIS 3.0.3
 Component:  postgis  |    Version:  3.0.x
Resolution:           |   Keywords:  geography memory
----------------------+------------------------------

Comment (by Algunenano):

 I've modified ST_Distance to create its own memory context (per call) and
 that removes the memory leak, so the problem is definitely there.

 Since the function itself has 2 clear parts (geometry deserialization and
 lwgeom_mindistance2d call) I decided to narrow down the context change to
 the function call (after generating the geometries from the serialized
 buffers), and with that the leak was also gone, so lwgeom_mindistance2d
 might be allocating memory and not freeing it, which is odd since it's
 tested in liblwgeom under valgrind.

-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4720#comment:10>
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