Opened 16 years ago
Closed 16 years ago
#169 closed defect (fixed)
geos::operation::valid::IsValidOp::isValid() leak
Reported by: | sgillies | Owned by: | warmerdam |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | Core | Version: | 3.0.0 |
Severity: | Significant | Keywords: | memory leak |
Cc: | denise.macleod@… |
Description
Output of valgrind:
==14421== 84 bytes in 3 blocks are definitely lost in loss record 59 of 110 ==14421== at 0x4021B59: operator new(unsigned) (vg_replace_malloc.c:163) ==14421== by 0x5069BB5: geos::operation::valid::IsValidOp::checkConsistentArea(geos::geomgraph::GeometryGraph*) (IsValidOp.cpp:301) ==14421== by 0x506AC20: geos::operation::valid::IsValidOp::checkValid(geos::geom::Polygon const*) (IsValidOp.cpp:191) ==14421== by 0x506B0B5: geos::operation::valid::IsValidOp::checkValid(geos::geom::Geometry const*) (IsValidOp.cpp:124) ==14421== by 0x506B448: geos::operation::valid::IsValidOp::isValid() (IsValidOp.cpp:83) ==14421== by 0x4F72FB5: GEOSisValid (geos_c.cpp:363) ==14421== by 0x4F66A16: ffi_call_SYSV (sysv.S:60) ==14421== by 0x4F668A3: ffi_call (ffi.c:221) ==14421== by 0x4F61203: _CallProc (callproc.c:668) ==14421== by 0x4F5AC99: CFuncPtr_call (_ctypes.c:3362) ==14421== by 0x8058BB6: PyObject_Call (abstract.c:1795) ==14421== by 0x80B5C02: PyEval_EvalFrame (ceval.c:3776)
Attachments (2)
Change History (6)
comment:1 by , 16 years ago
Cc: | added |
---|
comment:2 by , 16 years ago
Keywords: | memory leak added |
---|---|
Owner: | set to |
Denise, do you happen to have a small test program to demonstrate the problem and the fix? I tried running some of the unit tests in 3.0 branch and they don't seem to demonstrate the leak.
by , 16 years ago
Attachment: | test_issue169.cpp added |
---|
by , 16 years ago
Attachment: | test_polygon.wkt added |
---|
comment:3 by , 16 years ago
Test program is attached, and an invalid polygon in WKT.
Compile: gcc test_issue169.cpp -lgdal -o test_issue169
Test command (with valgrind): valgrind --leak-check=full ./test_issue169 test_polygon.wkt
comment:4 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Here's what was causing the leak:
The fix:
I did not originally download the svn trunk version, so I can't create a proper patch, but here is my diff from the geos-3.0.0 version that I downloaded in Sept. The change is on line 129.