Re: [PATCH] Fix memory leak in SWIG Python bindings

2012-01-24 Thread Daniel Shahaf
Trent Nelson wrote on Tue, Jan 24, 2012 at 10:17:24 -0500: > On Tue, Jan 24, 2012 at 03:44:04AM -0800, Daniel Shahaf wrote: > > Trent Nelson wrote on Mon, Jan 23, 2012 at 15:07:20 -0500: > > > Index: subversion/bindings/swig/python/tests/mergeinfo.py > > > ==

Re: [PATCH] Fix memory leak in SWIG Python bindings

2012-01-24 Thread Trent Nelson
On Tue, Jan 24, 2012 at 03:44:04AM -0800, Daniel Shahaf wrote: > Trent Nelson wrote on Mon, Jan 23, 2012 at 15:07:20 -0500: > > Index: subversion/bindings/swig/python/tests/mergeinfo.py > > === > > --- subversion/bindings/swig/python/t

Re: [PATCH] Fix memory leak in SWIG Python bindings

2012-01-24 Thread Daniel Shahaf
Daniel Shahaf wrote on Tue, Jan 24, 2012 at 13:36:07 +0200: > Trent Nelson wrote on Mon, Jan 23, 2012 at 15:07:20 -0500: > > Fix a memory leak in convert_rangelist by *always* Py_DECREF'ing the object > > returned by convert_to_swigtype (a SWIG wrapper around svn_merge_range_t) > > once we've estab

Re: [PATCH] Fix memory leak in SWIG Python bindings

2012-01-24 Thread Daniel Shahaf
A few comments on the testsuite part of the patch. First, I intend to test the patch using the attached pastebin script by Trent, in addition to 'make check'. Second: Trent Nelson wrote on Mon, Jan 23, 2012 at 15:07:20 -0500: > Index: subversion/bindings/swig/python/tests/mergeinfo.py >

Re: [PATCH] Fix memory leak in SWIG Python bindings

2012-01-24 Thread Daniel Shahaf
Trent Nelson wrote on Mon, Jan 23, 2012 at 15:07:20 -0500: > Fix a memory leak in convert_rangelist by *always* Py_DECREF'ing the object > returned by convert_to_swigtype (a SWIG wrapper around svn_merge_range_t) > once we've established it's not NULL. > > This is required because PyList_Append ta

Re: [PATCH] Fix memory leak in SWIG Python bindings

2012-01-24 Thread Hyrum K Wright
On Tue, Jan 24, 2012 at 5:58 AM, Trent Nelson wrote: > > On Jan 24, 2012, at 12:11 AM, Daniel Shahaf wrote: > >> Trent Nelson wrote on Mon, Jan 23, 2012 at 15:07:20 -0500: >>> Fix a memory leak in convert_rangelist by *always* Py_DECREF'ing the object >>> returned by convert_to_swigtype (a SWIG wr

Re: [PATCH] Fix memory leak in SWIG Python bindings

2012-01-23 Thread Trent Nelson
On Jan 24, 2012, at 12:11 AM, Daniel Shahaf wrote: > Trent Nelson wrote on Mon, Jan 23, 2012 at 15:07:20 -0500: >> Fix a memory leak in convert_rangelist by *always* Py_DECREF'ing the object >> returned by convert_to_swigtype (a SWIG wrapper around svn_merge_range_t) >> once we've established it'

Re: [PATCH] Fix memory leak in SWIG Python bindings

2012-01-23 Thread Daniel Shahaf
Trent Nelson wrote on Mon, Jan 23, 2012 at 15:07:20 -0500: > Fix a memory leak in convert_rangelist by *always* Py_DECREF'ing the object > returned by convert_to_swigtype (a SWIG wrapper around svn_merge_range_t) > once we've established it's not NULL. > > This is required because PyList_Append ta

[PATCH] Fix memory leak in SWIG Python bindings

2012-01-23 Thread Trent Nelson
Well, after a week of blood, sweat and tears, I finally tracked down the memory leak that's been slowly chipping away at my sanity for the past year. It's a pretty severe leak that affects the Python SWIG bindings: once allocated, an svn_merge_range_t object can never be freed.