[Fwd: Memory leak in domxml?]

From: Date: Fri, 22 Jun 2001 14:35:08 +0000
Subject: [Fwd: Memory leak in domxml?]
Groups: php.dev 
Request: Send a blank email to php-dev+get-57674@lists.php.net to get a copy of this message
After opening the bug at php.net, I was expecting it might have shown-up here, but it may not have due to the news server being down. Just in case, here it is. -- .tom Path: spln!rex!extra.newsguy.com!newsp.newsguy.com!news2 From: Thomas Gagne <tgagne@ix.netcom.com> Newsgroups: alt.php Subject: Memory leak in domxml? Date: Sun, 03 Jun 2001 15:15:31 -0400 Organization: eFinNet, Corp. Message-ID: <3B1A8CD2.8147041D@ix.netcom.com> Reply-To: tgagne@eFinNet.com NNTP-Posting-Host: p-812.newsdawg.com Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.14-5.0 i686) X-Accept-Language: en Xref: spln alt.php:16790 Has anyone noticed httpd children growing continuously with PHP scripts that use domxml? One of our programmers noticed this Friday. He's using the latest php (v *.5??). Maybe it's just us? -- .tom Path: spln!rex!extra.newsguy.com!newsp.newsguy.com!news2 From: Thomas Gagne <tgagne@ix.netcom.com> Newsgroups: alt.php Subject: Partial Fix: (was Re: Memory leak in domxml?) Date: Tue, 05 Jun 2001 20:19:50 -0400 Organization: eFinNet, Corp. Message-ID: <3B1D7725.911497E@ix.netcom.com> References: <3B1A8CD2.8147041D@ix.netcom.com> Reply-To: tgagne@eFinNet.com NNTP-Posting-Host: p-905.newsdawg.com Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.14-5.0 i686) X-Accept-Language: en Xref: spln alt.php:17061 I have a patch described in: http://www.php.net/bugs.php?id=11304 that fixes part of the memory leak. There's still another one in there but it doesn't leak nearly as bad. It's caused by the ->children() function (php_if_domxml_children). -- .tom Path: spln!rex!extra.newsguy.com!newsp.newsguy.com!news1 From: Thomas Gagne <tgagne@ix.netcom.com> Newsgroups: alt.php Subject: Re: Another memory leak fixed Date: Fri, 08 Jun 2001 00:18:27 -0400 Organization: eFinNet, Corp. Message-ID: <3B205213.70F61932@ix.netcom.com> References: <3B1A8CD2.8147041D@ix.netcom.com> Reply-To: tgagne@eFinNet.com NNTP-Posting-Host: p-790.newsdawg.com Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.14-5.0 i686) X-Accept-Language: en Xref: spln alt.php:17251 Another bug fixed. in php_domxml.c (4.0.5), PHP_FUNCTION(domxml_dumpmem), the memory allocated by xmlDocMemoryDump(), must be freed. Problem is, the RETURN_STRINGL macro defined in Zend/zend_API.h doesn't release the memory. We create another macro, identical to RETURN_STRINGL, except that it frees the memory pointer before returning. #define FREE_RETURN_STRINGL(s,l,duplicate) { \ char *__s=(s); int __l=l; \ return_value->value.str.len = __l; \ return_value->value.str.val = (duplicate?estrndup(__s,__l):__s); \ return_value->type = IS_STRING; \ free(s); \ return; \ } -- .tom

« previous php.dev (#57674) next »