Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 244364 - dev-lang/php-5.2.6-r7 segfaults with recursive infinite loop
Summary: dev-lang/php-5.2.6-r7 segfaults with recursive infinite loop
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-25 18:51 UTC by Imre Péntek
Modified: 2008-10-26 11:20 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
the php code. (x.php,43 bytes, text/plain)
2008-10-25 18:52 UTC, Imre Péntek
Details
emerge --info (emergeinfo.txt,3.77 KB, text/plain)
2008-10-25 18:53 UTC, Imre Péntek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Imre Péntek 2008-10-25 18:51:57 UTC
My php segfaults if trying to run the attached code. It really should terimnate after consuming the maximum allowed memory size (defaults to 8MB).

[I] dev-lang/php
     Available versions:  (5)  5.2.5-r1 5.2.6-r6 5.2.6-r7
        {adabas apache2 bcmath berkdb birdstep bzip2 calendar cdb cgi cjk cli concurrentmodphp crypt ctype curl curlwrappers db2 dbase dbmaker debug discard-path doc empress empress-bcs esoob exif fastbuild fdftk filter firebird flatfile force-cgi-redirect frontbase ftp gd gd-external gdbm gmp hash iconv imap inifile interbase iodbc ipv6 java-external json kerberos kolab ldap ldap-sasl libedit mcve mhash msql mssql mysql mysqli ncurses nls oci8 oci8-instant-client odbc pcntl pcre pdo pic posix postgres qdbm readline recode reflection sapdb session sharedext sharedmem simplexml snmp soap sockets solid spell spl sqlite ssl suhosin sybase sybase-ct sysvipc threads tidy tokenizer truetype unicode wddx xml xmlreader xmlrpc xmlwriter xpm xsl yaz zip zip-external zlib}
     Installed versions:  5.2.6-r7(5)(16.54.16 2008-09-26)(bzip2 cgi cli crypt ctype gd gdbm iconv ipv6 mysql mysqli ncurses nls pcre posix readline reflection session spell spl sysvipc truetype unicode xml zlib -adabas -apache2 -bcmath -berkdb -birdstep -calendar -cdb -cjk -concurrentmodphp -curl -curlwrappers -db2 -dbase -dbmaker -debug -discard-path -doc -empress -empress-bcs -esoob -exif -fastbuild -fdftk -filter -firebird -flatfile -force-cgi-redirect -frontbase -ftp -gd-external -gmp -hash -imap -inifile -interbase -iodbc -java-external -json -kerberos -kolab -ldap -ldap-sasl -libedit -mcve -mhash -msql -mssql -oci8 -oci8-instant-client -odbc -pcntl -pdo -pic -postgres -qdbm -recode -sapdb -sharedext -sharedmem -simplexml -snmp -soap -sockets -solid -sqlite -ssl -suhosin -sybase -sybase-ct -threads -tidy -tokenizer -wddx -xmlreader -xmlrpc -xmlwriter -xpm -xsl -yaz -zip -zip-external)
     Homepage:            http://www.php.net/
     Description:         The PHP language runtime engine: CLI, CGI and Apache2 SAPIs.


Reproducible: Always
Comment 1 Imre Péntek 2008-10-25 18:52:27 UTC
Created attachment 169856 [details]
the php code.
Comment 2 Imre Péntek 2008-10-25 18:53:09 UTC
Created attachment 169858 [details]
emerge --info
Comment 3 Christian Hoffmann (RETIRED) gentoo-dev 2008-10-26 11:20:45 UTC
This has been known for ages. It's simply that the stack overflows at some time, after too many functions have been called. There is nothing we can do about, and while upstream could, they don't consider this an issue. So it's very unlikely that we'll ever see a fix for this.

There is a workaround though: Certain extensions like xdebug (might be suhosin as well?) do have a config option to limit the recursion depth.