Bug #65562 [Opn]: memory leak in zend_parse_arg

From: Date: Tue, 27 Aug 2013 20:06:56 +0000
Subject: Bug #65562 [Opn]: memory leak in zend_parse_arg
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-181248@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=65562&edit=1 ID: 65562 Updated by: aharvey@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: With my doc hat on, I'm personally not too concerned if we have a debug build only function — we can cross that bridge when we get to it, and I don't think anyone relies particularly heavily on the prototype extraction scripts anyway. With my php-src hat on, would it be better to consider adding a debug extension (say ext/debug) that wraps ZE functions where appropriate so we can start writing PHPT tests for them, rather than doing this as a one off? Previous Comments: ------------------------------------------------------------------------ [2013-08-27 09:42:17] nikic@php.net @johannes: Does this really need a test? The change is rather obvious after all. Introducing debug-only functions for this seems like overkill. ------------------------------------------------------------------------ [2013-08-26 23:15:59] johannes@php.net A cleaner patch might pass the quiet argument to zend_parse_arg_impl, this would safe the allocation in there. This also seems to be limited to C and f modifiers which, in PHP itself, aren't used in combination with ZEND_PARSE_PARAMS_QUIET. So for adding a test we might need a deug-build-only functionin zend_builtin_functions.c. This might need coordination with docs and their function detection scripts. And sorry if I'm a bit harsh, but 99% of the internal API bugs we get are user errors and this bug was sparse on information. ------------------------------------------------------------------------ [2013-08-26 23:14:26] sixd@php.net Waiting feedback on the patch ------------------------------------------------------------------------ [2013-08-26 23:07:33] rrh at newrelic dot com I will test the patch, and in the future come up with patches for your review. ------------------------------------------------------------------------ [2013-08-26 23:02:38] yohgaki@php.net I suspect you have pointer issue. Valgrind does not handle ***(pointer to pointer to pointer) well. Check your hash handling code carefully, it may help. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=65562 -- Edit this bug report at https://bugs.php.net/bug.php?id=65562&edit=1

« previous php.bugs (#181248) next »