Re: PHP 4.0 Bug #3347: string.c leaks memory

From: Date: Sun, 30 Jan 2000 20:30:17 +0000
Subject: Re: PHP 4.0 Bug #3347: string.c leaks memory
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-15058@lists.php.net to get a copy of this message
Andrei Zmievski wrote: > > Are you sure? I just did cvs update and compiled the latest version and > it doesn't leak. > Reasonably sure : current cvs (both zend & php4) : <?php $a = "abc def ghi"; $b = ucwords($a); echo "ucwords:\n"; echo $a . "\n"; echo $b . "\n"; $a = "abc def ghi"; $b = ucfirst($a); echo "ucfirst:\n"; echo $a . "\n"; echo $b . "\n"; $a = "abc def ghi"; $b = strtoupper($a); echo "strtoupper:\n"; echo $a . "\n"; echo $b . "\n"; $a = "ABC DEF GHI"; $b = strtolower($a); echo "strtolower:\n"; echo $a . "\n"; echo $b . "\n"; echo "chop:\n"; $a= "abc "; $b= chop($a); echo $a . "|\n"; echo $b . "|\n"; ?> X-Powered-By: PHP/4.0b4-dev Content-Type: text/html ucwords: abc def ghi Abc Def Ghi ucfirst: abc def ghi Abc def ghi strtoupper: abc def ghi ABC DEF GHI strtolower: ABC DEF GHI abc def ghi chop: abc | abc| /home/web/php/php4/ext/standard/string.c(153) : Freeing 0x08245064 (4 bytes), script=uc.php ../../php4/Zend/zend_execute.c(1537) : Freeing 0x0824502C (12 bytes), script=uc.php Last leak repeated 4 times /home/web/php/php4/ext/standard/string.c(455) : Freeing 0x08244FF4 (12 bytes), script=uc.php ../../php4/Zend/zend_variables.c(126) : Actual location (location was relayed) /home/web/php/php4/ext/standard/string.c(422) : Freeing 0x08244F84 (12 bytes), script=uc.php ../../php4/Zend/zend_variables.c(126) : Actual location (location was relayed) /home/web/php/php4/ext/standard/string.c(1087) : Freeing 0x08244F14 (12 bytes), script=uc.php ../../php4/Zend/zend_variables.c(126) : Actual location (location was relayed) /home/web/php/php4/ext/standard/string.c(1109) : Freeing 0x0824AA74 (12 bytes), script=uc.php ../../php4/Zend/zend_variables.c(126) : Actual location (location was relayed) Danny ---

« previous php.dev (#15058) next »