#29735 [Opn]: Segfault (11) / Possible stack corruption
| From: | sparkeh at btinternet dot com | Date: | Wed, 18 Aug 2004 18:36:47 +0000 |
| Subject: | #29735 [Opn]: Segfault (11) / Possible stack corruption | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-64875@lists.php.net to get a copy of this message | ||
ID: 29735
User updated by: sparkeh at btinternet dot com
Reported By: sparkeh at btinternet dot com
Status: Open
Bug Type: Reproducible crash
Operating System: Linux 2.6.7-gentoo-r9
PHP Version: 5.0.1
New Comment:
N.B. Original code tested and works as expected with PHP 4.3.3
Previous Comments:
------------------------------------------------------------------------
[2004-08-18 19:44:13] sparkeh at btinternet dot com
There is no loop here. This is segfaulting because the function is
failing to return correctly (stack corruption). Remove the "global"
statement, and add an echo '' outside of the switch() braces to see
normal (expected) program flow.
------------------------------------------------------------------------
[2004-08-18 17:18:38] sparkeh at btinternet dot com
What loop??
Remove the "global $moo" and the $rar = 0 and it runs as expected:
<?
switch($t)
{
default:
function segfault()
{
echo 'About to segfault : ';
}
segfault();
}
echo 'Or not. Look no loop.';
?>
------------------------------------------------------------------------
[2004-08-18 17:05:03] derick@php.net
?
You call the function segfault() in a never ending loop.
------------------------------------------------------------------------
[2004-08-18 16:17:19] sparkeh at btinternet dot com
There is no recursion. This is a function being called from within a
switch block. Surely?
------------------------------------------------------------------------
[2004-08-18 15:47:59] derick@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
This is expected, PHP does not protect against infinite recursion.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/29735
--
Edit this bug report at http://bugs.php.net/?id=29735&edit=1