From:             mike dot greubel at pro-entertain dot de
Operating system: GNU/Linux (Kernel 2.6.7)
PHP version:      5.0.2
PHP Bug Type:     Reproducible crash
Bug description:  Apache Child Segmentation fault in specific PHP-Code

Description:
------------
A small peace of code didn't work (array_push), so I 
decided to write a different version with same result. 
Testing in Konqueror will produce a 
Lost-Connection-to-Server-Error. cli-version produces a 
segfault, too. 

Reproduce code:
---------------
$my_array = array();
for($x = 0; $x < 2; $x++)
{
      unset($foo);
      $foo = array();
      $foo->bar = "a string";
      $my_array[$x] = $foo;
}
var_dump($my_array);

Expected result:
----------------
A vardump of array $my_array. 

Actual result:
--------------
Apache: segmentation fault of httpd-child. 
 
Server version: Apache/2.0.52 
 
[client 192.168.100.209] PHP Warning:  Attempt to assign 
property of non-object in /data/www/viewsvn/test.phpon line 
7 
[client 192.168.100.xxx] PHP Warning:  Attempt to assign 
property of non-object in /data/www/test.php on line 7 
[client 192.168.100.xxx] PHP Warning:  Attempt to assign 
property of non-object in /data/www/test.php on line 7 
[client 192.168.100.xxx] PHP Warning:  Attempt to assign 
property of non-object in /data/www/test.php on line 7 
[Mon Oct 11 13:10:29 2004] [notice] child pid 28578 exit 
signal Segmentation fault (11) 
[Mon Oct 11 13:10:29 2004] [notice] child pid 28580 exit 
signal Segmentation fault (11) 
 
 
cli-Version: 
 
php -q -f test.php 
PHP Warning:  Attempt to assign property of non-object 
in /data/www/viewsvn/test.php on line 7 
PHP Warning:  Attempt to assign property of non-object 
in /data/www/viewsvn/test.php on line 7 
array(2) { 
  [0]=> 
  array(0) { 
  } 
  [1]=> 
  array(0) { 
  } 
} 
Segmentation fault 
 

-- 
Edit bug report at http://bugs.php.net/?id=30395&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=30395&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30395&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30395&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=30395&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=30395&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=30395&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=30395&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=30395&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=30395&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=30395&r=notwrong
Not enough info:             http://bugs.php.net/fix.php?id=30395&r=notenoughinfo
Submitted twice:             http://bugs.php.net/fix.php?id=30395&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=30395&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=30395&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=30395&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=30395&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=30395&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=30395&r=float
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=30395&r=mysqlcfg

Reply via email to