#29893 [Com]: Yet another Segmentation fault

From: Date: Mon, 30 Aug 2004 08:50:08 +0000
Subject: #29893 [Com]: Yet another Segmentation fault
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-65448@lists.php.net to get a copy of this message
ID: 29893 Comment by: guth at fiifo dot u-psud dot fr Reported By: n dot favrefelix at free dot fr Status: Open Bug Type: Reproducible crash Operating System: Linux (Mandrake 10) PHP Version: 5.0.1 New Comment: Additionaly, the crash appears with the followings operators : -=, += ^=, |=, etc. <? $base = 50; $base[] += 0; die("ok"); ?> This code doesn't work properly either. Previous Comments: ------------------------------------------------------------------------ [2004-08-30 10:47:00] n dot favrefelix at free dot fr Description: ------------ It seems that the following code crashes PHP. I agree that it's not a good idea to do $table[$table] but I expect something else than a segmentation fault. Reproduce code: --------------- <? $base = 50; $base[$base] -= 0; // -= crashes PHP, = doesn't die("Ok"); ?> Expected result: ---------------- A warning or a fatal error, then "OK", but not a segmentation fault... Actual result: -------------- Two new lines in my Apache error_log : [Mon Aug 30 10:42:42 2004] [error] PHP Warning: Cannot use a scalar value as an array in /www/test.php on line 3 [Mon Aug 30 10:42:42 2004] [notice] child pid 21974 exit signal Segmentation fault (11) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=29893&edit=1

« previous php.bugs (#65448) next »