Edit report at https://bugs.php.net/bug.php?id=65562&edit=1

 ID:                 65562
 Updated by:         yohg...@php.net
 Reported by:        rrh at newrelic dot com
 Summary:            memory leak in zend_parse_arg
 Status:             Open
 Type:               Bug
 Package:            Performance problem
 Operating System:   all
 PHP Version:        5.5.3
 Block user comment: N
 Private report:     N

 New Comment:

If you are certain, please provide short and complete module code that leaks 
memory. (i.e. full module code that compiles as module) It should be by using 
ext_skel shell script.


Previous Comments:
------------------------------------------------------------------------
[2013-08-26 21:21:52] rrh at newrelic dot com

I didn't provide code to show the issue because the issue is almost certainly 
independent of my module extension, and a quick inspection of the code looking 
at 
the control flow paths would show that efree isn't called on all paths leading 
to 
a return from the function.

------------------------------------------------------------------------
[2013-08-26 20:53:04] johan...@php.net

Please provide compilable code showing the issue. In general: We don't consider 
issues which can't be triggered by userspace code as bug but expect extension 
authors to provide patches to improve PHP.

------------------------------------------------------------------------
[2013-08-26 20:23:12] rrh at newrelic dot com

Description:
------------
Function zend_parse_arg leaks memory, as discovered when I ran valgrind with 
php test cases designed to exercise a module we wrote.

zend_parse_arg calls zend_parse_arg_impl.  Unfortunately, not all control flow 
paths to the return in zend_parse_arg call efree to free up the memory 
allocated by zend_parse_arg_impl to hold the error string.  In my case, quiet 
!= 0, so the lone efree (which has 2 additional guards) is not called.



------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=65562&edit=1

Reply via email to