Skip to content

Memory leak in from_shapely #160

@caspervdw

Description

@caspervdw

Found in #159

__________________________ test_from_shapely_error[x] __________________________
[VALGRIND LEAK]

Valgrind has detected a memory leak:

**1** 
**1** **********************************************************************
**1** pygeos/test/test_io.py::test_from_shapely_error[x]
**1** **********************************************************************
==1== 3,288 (+1,096) bytes in 3 (+1) blocks are definitely lost in loss record 17,540 of 18,378
==1==    at 0x4C2C21F: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==1==    by 0xE5F5DFF: GEOS_init_r (in /usr/lib/x86_64-linux-gnu/libgeos_c.so.1.9.1)
==1==    by 0xE3D9BF2: from_shapely_func (ufuncs.c:1292)
==1==    by 0xF3DACE6: trivial_two_operand_loop (ufunc_object.c:1329)
==1==    by 0xF3E0E33: execute_legacy_ufunc_loop (ufunc_object.c:1645)
==1==    by 0xF3E3491: PyUFunc_GenericFunction (ufunc_object.c:3239)
==1==    by 0xF3E430D: ufunc_generic_call (ufunc_object.c:4701)
==1==    by 0x4F3A5A6: PyObject_Call (abstract.c:2261)
==1==    by 0x4FAE90B: do_call_core (ceval.c:5120)
==1==    by 0x4FAE90B: _PyEval_EvalFrameDefault (ceval.c:3404)
==1==    by 0x4FB3AE7: _PyEval_EvalCodeWithName (ceval.c:4166)
==1==    by 0x4FB3AE7: fast_function (ceval.c:4992)
==1==    by 0x4FB360A: call_function (ceval.c:4872)
==1==    by 0x4FACA4E: _PyEval_EvalFrameDefault (ceval.c:3335)
==1== 
==1== LEAK SUMMARY:
==1==    definitely lost: 3,560 (+1,096) bytes in 5 (+1) blocks
==1==    indirectly lost: 41 (+0) bytes in 3 (+0) blocks
==1==      possibly lost: 9,561,635 (+260) bytes in 87,989 (-1) blocks
==1==    still reachable: 20,318,587 (+4,166) bytes in 159,604 (+21) blocks
==1==                       of which reachable via heuristic:
==1==                         newarray           : 867 (+0) bytes in 43 (+0) blocks
==1==                         multipleinheritance: 24,320 (+0) bytes in 409 (+0) blocks
==1==         suppressed: 0 (+0) bytes in 0 (+0) blocks
==1== Reachable blocks (those to which a pointer was found) are not shown.
==1== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==1== 
**1** 
**1** **********************************************************************

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions