#34353 [Fbk->Csd]: func_get_arg(s) leak
ID: 34353 User updated by: devik at cdi dot cz Reported By: devik at cdi dot cz -Status: Feedback +Status: Closed Bug Type: Scripting Engine problem Operating System: Linux PHP Version: 5.1.0RC1 New Comment: Oh ok, sorry - I found it is already fixed in CVS. Previous Comments: [2005-09-02 23:29:40] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip I can not reproduce with latest CVS checkout of PHP_5_1 branch. [2005-09-02 22:55:29] devik at cdi dot cz Description: There is missing INIT_PZVAL(return_value); at end of zif_func_get_arg thus it is leaking data. Reproduce code: --- Expected result: 2/copy/build/php-5.1.0RC1/Zend/zend_vm_execute.h(167) : Freeing 0x08466324 (16 bytes), script=tst.php === Total 1 memory leaks detected === Actual result: -- 2 -- Edit this bug report at http://bugs.php.net/?id=34353&edit=1
#34353 [NEW]: func_get_arg(s) leak
From: devik at cdi dot cz Operating system: Linux PHP version: 5.1.0RC1 PHP Bug Type: Scripting Engine problem Bug description: func_get_arg(s) leak Description: There is missing INIT_PZVAL(return_value); at end of zif_func_get_arg thus it is leaking data. Reproduce code: --- Expected result: 2/copy/build/php-5.1.0RC1/Zend/zend_vm_execute.h(167) : Freeing 0x08466324 (16 bytes), script=tst.php === Total 1 memory leaks detected === Actual result: -- 2 -- Edit bug report at http://bugs.php.net/?id=34353&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34353&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34353&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34353&r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=34353&r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=34353&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=34353&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=34353&r=needscript Try newer version: http://bugs.php.net/fix.php?id=34353&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=34353&r=support Expected behavior: http://bugs.php.net/fix.php?id=34353&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=34353&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=34353&r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=34353&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34353&r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=34353&r=dst IIS Stability: http://bugs.php.net/fix.php?id=34353&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=34353&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=34353&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=34353&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=34353&r=mysqlcfg
php-bugs@lists.php.net
ID: 33282 User updated by: devik at cdi dot cz Reported By: devik at cdi dot cz -Status: Feedback +Status: Open Bug Type: Scripting Engine problem Operating System: Linux PHP Version: 5CVS-2005-06-13 New Comment: Sorry but I still see the problem. Regarding version, I used directory name as I found nothing like 5CVS-2005-06-13 in the downloaded package. Previous Comments: [2005-09-02 07:42:21] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip And DO NOT invent your own style for the PHP version field!! (Hint: PHP version string does NOT contain 'PHP' in it..) [2005-06-09 15:33:27] devik at cdi dot cz Description: This is variation on #15025. But I accept the bug is feature and I show other bug it triggers. Basic problem is that when you take ref of array item then the item will turn into reference (which will survive even array copy). I don't see it as too big problem as long as I can get rid of the reference. "unset" does the trick as expected: $r =& $A[0]; unset($r); - $A[0] is not reference any more But something like: $r =& $othervar; doesn't kill reference - you see zval with is_ref=1 and refcount=1. It prevents you from writing handy code: $c = &$c[$i] when traversing complex structures. Reproduce code: --- Expected result: I expect $a without references. Actual result: -- $a[0] is reference with refcount(1). -- Edit this bug report at http://bugs.php.net/?id=33282&edit=1
php-bugs@lists.php.net
ID: 33282 User updated by: devik at cdi dot cz Reported By: devik at cdi dot cz -Status: Feedback +Status: Open Bug Type: Zend Engine 2 problem Operating System: Linux -PHP Version: 5.0.4 +PHP Version: php5-STABLE-200506131036 New Comment: The same - still exhibits the behaviour. Previous Comments: [2005-06-13 10:49:48] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.0-win32-latest.zip [2005-06-09 15:33:27] devik at cdi dot cz Description: This is variation on #15025. But I accept the bug is feature and I show other bug it triggers. Basic problem is that when you take ref of array item then the item will turn into reference (which will survive even array copy). I don't see it as too big problem as long as I can get rid of the reference. "unset" does the trick as expected: $r =& $A[0]; unset($r); - $A[0] is not reference any more But something like: $r =& $othervar; doesn't kill reference - you see zval with is_ref=1 and refcount=1. It prevents you from writing handy code: $c = &$c[$i] when traversing complex structures. Reproduce code: --- Expected result: I expect $a without references. Actual result: -- $a[0] is reference with refcount(1). -- Edit this bug report at http://bugs.php.net/?id=33282&edit=1
php-bugs@lists.php.net
From: devik at cdi dot cz Operating system: Linux PHP version: 5.0.4 PHP Bug Type: Scripting Engine problem Bug description: Reference is killed by unset but not by other =& Description: This is variation on #15025. But I accept the bug is feature and I show other bug it triggers. Basic problem is that when you take ref of array item then the item will turn into reference (which will survive even array copy). I don't see it as too big problem as long as I can get rid of the reference. "unset" does the trick as expected: $r =& $A[0]; unset($r); - $A[0] is not reference any more But something like: $r =& $othervar; doesn't kill reference - you see zval with is_ref=1 and refcount=1. It prevents you from writing handy code: $c = &$c[$i] when traversing complex structures. Reproduce code: --- Expected result: I expect $a without references. Actual result: -- $a[0] is reference with refcount(1). -- Edit bug report at http://bugs.php.net/?id=33282&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33282&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33282&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33282&r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=33282&r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=33282&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=33282&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=33282&r=needscript Try newer version: http://bugs.php.net/fix.php?id=33282&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=33282&r=support Expected behavior: http://bugs.php.net/fix.php?id=33282&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=33282&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=33282&r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=33282&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33282&r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=33282&r=dst IIS Stability: http://bugs.php.net/fix.php?id=33282&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=33282&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=33282&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=33282&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=33282&r=mysqlcfg
#25429 [NEW]: copy() of stdin doesn't work any longer
From: devik at cdi dot cz Operating system: linux PHP version: 4.3.3 PHP Bug Type: Filesystem function related Bug description: copy() of stdin doesn't work any longer Description: copy("/dev/stdin","/tmp/xx"); was working in 4.0.6 but in 4.3.3 it results in empty file. When I ran strace then I see fstat64(2) used on handle 4 which is dup(2)ed from handle 0. It results to fs_size==0 and code in php_stream_copy_to_stream (IIRC) hapily creates zero-sized file (immeditely - no wait for EOF). With PHP fopen() it works as expected (it waits). Reproduce code: --- copy("/dev/stdin","/tmp/xx"); Expected result: to stop on copy() and wait to EOF and then have input in /tmp/xx Actual result: -- copy() passes and /tmp/xx is zero-length file -- Edit bug report at http://bugs.php.net/?id=25429&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25429&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25429&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=25429&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=25429&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=25429&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=25429&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=25429&r=support Expected behavior: http://bugs.php.net/fix.php?id=25429&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=25429&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=25429&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=25429&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25429&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=25429&r=dst IIS Stability: http://bugs.php.net/fix.php?id=25429&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=25429&r=gnused