ID: 24834 Updated by: [EMAIL PROTECTED] Reported By: vma1 at abv dot bg -Status: Closed +Status: Bogus Bug Type: Zend Engine 2 problem Operating System: Slackware Linux 9.0 PHP Version: 5CVS-2003-07-28 (dev) New Comment:
Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely to be the same. Because of this, we hope you add your comments to the existing bug instead. Thank you for your interest in PHP. second report opened by same user, making this bogus then. Previous Comments: ------------------------------------------------------------------------ [2003-07-28 05:06:59] [EMAIL PROTECTED] I can not reproduce this with latest CVS. ------------------------------------------------------------------------ [2003-07-28 00:18:29] vma1 at abv dot bg Description: ------------ The following script causes memory corruption when run from the command line like: php -f ./bug.php There are variants of the script that show the bug when run from the web browser, but these scripts are bigger. Even small changes in the sample script hide the bug. Notice that several bytes in the output string get overwritten. Reproduce code: --------------- <? class database { } $a = new database; $b = new database; class broken { public function __construct () { } public function __destruct () { $this->show (array ( "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "", "", "", "", "", "", "", "", "", "", "", "", "", "" )); } private function show ($values) { $values_string = ""; foreach ($values as $val) { $values_string .= $val; } printf ("%s\n", $values_string); } } $brk = new broken (); ?> Expected result: ---------------- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa Actual result: -------------- aaaaaaaaaaaaë˙żaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=24834&edit=1