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
Created attachment 169856 [details] the php code.
Created attachment 169858 [details] emerge --info
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.