quetz-mod_python-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harold Ship <har...@giant-steps-networks.com>
Subject Re: Commented: (MODPYTHON-172) Memory leak with util.fieldstorage using mod_python 3.2.8 on apache 2.0.55
Date Thu, 06 Jul 2006 20:05:06 GMT
Hi Nicolas

Howcome I didn't see this post in JIRA? I added my comment there. I also didn't
get email. I just found it in Google.

Anyway, I have an application that was started over a year ago with 3.1.3. We 
switched to 3.2.8 because we had a requirement to upload files and there was a
problem that was fixed in that version.

I observed a memory leak in our application under 3.2.8, and found MODPYTHON-172
on Google. I ran the test program in my first comment on 3.2.8, then tried going
back to 3.1.3 to see if the leak was there too.

This leak seems to be in both 3.1.3 and 3.2.8.

I have added another comment regarding _apachemodule.c, which I include below.

Thanks for your help,

### ============ Begin Code ==============
Excuse me if this is a dumb question, but I don't know anything about the
Python-C interface.

Is it possible that the code in line 319 of _apachemodule.c (from 3.2.8) is the

The code is:

            if (key && val)
                PyList_Append(pairs, Py_BuildValue("(O,O)", key, val));

Does the object returned by Py_BuildValue() need to be dereferenced?
Something like:

            if (key && val) {
                PyObject * list_elem = Py_BuildValue("(O,O)", key, val);
                if (list_elem)
                    PyList_Append(pairs, list_elem);


View raw message