From: saruman at northernhacking dot org
Operating system: Linux RH9
PHP version: 5.0.0b2 (beta2)
PHP Bug Type: Reproducible crash
Bug description: When using string as implicit array, segfault in PHP5.0.0b3
Description:
------------
The ONLY change I'd done is install php-5.0.0b3 with the same config as
the php-5.0.0b2 it replaced.
Config vars:
Configure Command './configure' '--with-pear' '--with-pgsql'
'--with-apxs=/usr/local/apache/bin/apxs' '--enable-mbstring'
'--prefix=/usr/local/php5' '--with-libxml-dir=/usr'
Using this with php-5.0.0b2 works as expected. This behavior of a string
is required by DB.php in PEAR, amongst others.
Reproduce code:
---------------
<?php
//$str = Array('a', 's', 'd', 'd', '/', '?');
$str = 'asdd/?';
$len = strlen($str);
for ($i = 0; $i < $len; $i++) {
switch ($str[$i]) {
case '?':
echo '?';
break;
}
}
?>
Did not crash.
Expected result:
----------------
?Did not crash.
Actual result:
--------------
>From error_log:
[Mon Dec 22 14:15:38 2003] [notice] child pid 30170 exit signal
Segmentation fault (11)
[Mon Dec 22 14:15:38 2003] [notice] child pid 30187 exit signal
Segmentation fault (11)
The two response are because MSIE seems to do a second query when the
first one unexpectedly close.
--
Edit bug report at http://bugs.php.net/?id=26696&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26696&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26696&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=26696&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=26696&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=26696&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=26696&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=26696&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=26696&r=support
Expected behavior: http://bugs.php.net/fix.php?id=26696&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=26696&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=26696&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=26696&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26696&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=26696&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=26696&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=26696&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26696&r=float