Re: Commented: (MODPYTHON-172) Memory leak with util.fieldstorage using mod_python 3.2
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Apache Server configuration support > Apache Mod-Python > Re: Commented: (MODPYTHON-172) Memory leak with util.fieldstorage using mod_python 3.2




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Re: Commented: (MODPYTHON-172) Memory leak with util.fieldstorage using mod_python 3.2  
Harold Ship


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-07-06 12:11 AM

Hi Nicolas

Howcome I didn't see this post in JIRA? I added my comment there. I also did
n'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. W
e
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 g
oing
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 belo
w.

Thanks for your help,
Harold



### ============ 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
problem?

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);
Py_XDECREF(list_elem);
}

 ========================================











[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 04:00 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register