#29893 [NEW]: Yet another Segmentation fault
| From: | n dot favrefelix at free dot fr | Date: | Mon, 30 Aug 2004 08:47:01 +0000 |
| Subject: | #29893 [NEW]: Yet another Segmentation fault | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-65447@lists.php.net to get a copy of this message | ||
From: n dot favrefelix at free dot fr
Operating system: Linux (Mandrake 10)
PHP version: 5.0.1
PHP Bug Type: Reproducible crash
Bug description: Yet another Segmentation fault
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 bug report at http://bugs.php.net/?id=29893&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29893&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=29893&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=29893&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=29893&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=29893&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=29893&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=29893&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=29893&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=29893&r=support
Expected behavior: http://bugs.php.net/fix.php?id=29893&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=29893&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=29893&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=29893&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29893&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=29893&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=29893&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=29893&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29893&r=float