1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
|
--TEST--
Test for bug #241: Crash in xdebug_get_function_stack()
--INI--
xdebug.mode=develop
xdebug.auto_profile=0
xdebug.var_display_max_depth=3
xdebug.var_display_max_children=4
--FILE--
<?php
function error_handler($errno, $string, $file, $line)
{
$entry = Error_Class::newError();
}
class Error_Class
{
public static function newError($errno = false)
{
return new Error_Entry(false, $errno);
}
public static function getBT()
{
$tmp = xdebug_get_function_stack();
var_dump($tmp);
}
}
class Error_Entry
{
public function __construct($base, $errno)
{
Error_Class::getBT();
}
}
set_error_handler('error_handler');
$tmp = $_SERVER['FOO'];
echo "The End\n";
?>
--EXPECTF--
%sbug00241.php:17:
array(5) {
[0] =>
array(6) {
'time' =>
double(%f)
'memory' =>
int(%d)
'function' =>
string(6) "{main}"
'file' =>
string(%d) "%sbug00241.php"
(more elements)...
}
[1] =>
array(6) {
'time' =>
double(%f)
'memory' =>
int(%d)
'function' =>
string(13) "error_handler"
'file' =>
string(%d) "%sbug00241.php"
(more elements)...
}
[2] =>
array(8) {
'time' =>
double(%f)
'memory' =>
int(%d)
'function' =>
string(8) "newError"
'type' =>
string(6) "static"
(more elements)...
}
[3] =>
array(8) {
'time' =>
double(%f)
'memory' =>
int(%d)
'function' =>
string(11) "__construct"
'type' =>
string(7) "dynamic"
(more elements)...
}
(more elements)...
}
The End
|