Re: Curl POST emalloc leak?
| From: | Rasmus Lerdorf | Date: | Sun, 18 May 2008 23:34:08 +0000 |
| Subject: | Re: Curl POST emalloc leak? | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-37713@lists.php.net to get a copy of this message | ||
Manuel Mausz wrote:
Rasmus Lerdorf wrote:Yeah, I noticed that as well as I was simplifying things down further and further. I have gotten to the point where my simplification has lost track of the real problem, I think. My original complicated code is leaking hundreds of K per iteration, and I assumed the smaller leak in the simplified version was representative of that, but I don't think it is. That would also why I haven't been able to find a bug in this curl code I have been looking at. -RasmusNote that you don't actually need to send the request. It looks like repeatedly doing: $ch = curl_init(); curl_setopt($ch, CURLOPT_POSTFIELDS, $args); curl_close($ch); Is enough to do it. Still looking at the code. Seems like zend_llist_clean(&ch->to_free.str); isn't doing the right thing somehow.Is this really related to curl? # php -n -r 'for($i=0;$i<10;$i++) { for($args="",$j=0;$j<75;$j++) $args .= "a=$j&"; unset($args); echo memory_get_usage()."\n"; }' 55872 56100 56172 56240 56304 56364 56420 56420 56420 56420