From:             kermodebear at kermodebear dot org
Operating system: Redhat Linux krnl 2.4.21-20ELsmp
PHP version:      4.3.10
PHP Bug Type:     Reproducible crash
Bug description:  php -r Segfault when assigning values in an array in an 
infinite loop.

Description:
------------
When using the -r option on the command line and the code below, PHP will
cause a segmentation fault after script time limit is reached. This is
reproducable in that it happens most of the time, but not all of the time.
Once, PHP simply hung when the time limit was reached; I let it sit for
about a minute after the 'time limit exceeded' message was displayed, and
was able to kill it with ^C.

System is running RedHat Linux Enterprise Edition, with kernel version
2.4.21-20.ELsmp.

Configure Command =>  './configure' '--prefix=/usr'
'--with-config-file-path=/etc' '--with-apxs=/usr/local/apache/bin/apxs'
'--with-iconv' '--with-openssl=/usr/local/ssl' '--with-zlib-dir=/usr/lib'
'--with-mysql=/usr/local/mysql' '--with-pgsql=shared' '--with-gd'
'--with-pdflib=/usr/local' '--with-png-dir=/usr/local/include'
'--with-jpeg-dir=/usr/lib' '--with-tiff-dir=/usr/local' '--with-curl=/usr'
'--with-expat-dir=/usr' '--with-dom=/usr' '--with-ldap' '--with-xmlrpc'
'--enable-sockets' '--enable-dbx' '--enable-dbase' '--enable-exif'
'--enable-wddx' '--enable-ftp' '--enable-mbstring' '--with-ncurses'
'--with-pspell' '--with-mssql'

Reproduce code:
---------------
php -r 'set_time_limit( 2 ); $a = 1; $b = array(); while( true ) { $b[] =
$a; }'

Expected result:
----------------
Fatal error: Maximum execution time of 2 seconds exceeded in Command line
code on line 1


Actual result:
--------------
Fatal error: Maximum execution time of 2 seconds exceeded in Command line
code on line 1
Segmentation fault


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

Reply via email to