#35017 [NEW]: PHP crashes Apache
From: assen dot todorov at onvista dot de
Operating system: Linux
PHP version: 5.0.5
PHP Bug Type: Scripting Engine problem
Bug description: PHP crashes Apache
Description:
------------
The code below was tested on WindowsXP + PHP(5.0.5) + Apache(1.3.33) AND
Linux + PHP(5.0.5) + Apache(Apache/2.0.53).In both cases this code leads
to crash in Apache.The message is "Segmentation fault ......."
Reproduce code:
---------------
set_error_handler('errorHandler');
$crashApache = new crashApache;
try {
$a = array('test'); $result = array();
foreach($a as $b) {
$result[] = $b; $nullValue = null;
foreach($nullValue as $c) {
$result[] = $c;
}
}
$crashApache->start($result);
}
catch(Exception $e) { echo 'This Exception should be catched'; }
class crashApache {
public $someVar = array();
public function start(&$crashParam) {
$this->someVar = $crashParam;
}
}
function errorHandler($errno, $errstr, $errfile, $errline, $vars) {
throw new Exception('Some Exception');
}
Expected result:
----------------
I expect to see the the message "This Exception should be catched"
Actual result:
--------------
Apache crashes with "segmentation fault" message.
--
Edit bug report at http://bugs.php.net/?id=35017&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=35017&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=35017&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=35017&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=35017&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=35017&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=35017&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=35017&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=35017&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=35017&r=support
Expected behavior: http://bugs.php.net/fix.php?id=35017&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=35017&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=35017&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=35017&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35017&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=35017&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=35017&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=35017&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=35017&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=35017&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=35017&r=mysqlcfg
Thread (4 messages)
- assen dot todorov at onvista dot de