Bug #78908 [NoF->ReO]: error_get_last() has limited stack trace
Edit report at https://bugs.php.net/bug.php?id=78908&edit=1
ID: 78908
Updated by: nikic@php.net
Reported by: sailormax at inbox dot lv
Summary: error_get_last() has limited stack trace
-Status: No Feedback
+Status: Re-Opened
Type: Bug
Package: Unknown/Other Function
Operating System: Windows 10
PHP Version: 7.4.0
Block user comment: N
Private report: N
New Comment:
Per previous comment: https://3v4l.org/6QGXt
Previous Comments:
------------------------------------------------------------------------
[2019-12-15 04:22:08] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
------------------------------------------------------------------------
[2019-12-04 13:20:01] sailormax at inbox dot lv
Can I get ini-file from 3v4l.org ?
try to increase $limiter to 50 on 3v4l.org. You will see the same problem.
------------------------------------------------------------------------
[2019-12-04 13:03:40] sjon@php.net
there must be something else limiting the depth, because I cannot reproduce this. See https://3v4l.org/VhoFu - as you can see the exception backtrace is
just as deep as the debug-backtrace is (unless this is Windows specific)
------------------------------------------------------------------------
[2019-12-04 11:35:32] sailormax at inbox dot lv
Description:
------------
default Exception handler and error_get_last() return error message with not full stack trace. When
use large libraries like PHPSpreadsheet and got exception, message with stack trace contain only
PHPSpreadsheet internal calls but where you call it is offcut.
Test script:
---------------
<?
$limiter = 20;
$func = function() use (&$limiter, &$func)
{
$limiter--;
if (!$limiter)
{
print "<pre>";
debug_print_backtrace();
throw new Exception("test error");
}
if ($limiter <= 0)
return;
$func();
};
$func();
?>
Expected result:
----------------
0 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14]
#1 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14]
#2 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14]
#3 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14]
#4 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14]
#5 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14]
#6 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14]
#7 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14]
#8 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14]
#9 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14]
#10 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14]
#11 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14]
#12 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14]
#13 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14]
#14 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14]
#15 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14]
#16 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14]
#17 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14]
#18 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14]
#19 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14]
Fatal error: Uncaught Exception: test error in D:\max\Documents\GitHub\atom\test.php:9
Stack trace:
#0 D:\max\Documents\GitHub\atom\test.php(14): {closure}()
#1 D:\max\Documents\GitHub\atom\test.php(14): {closure}()
#2 D:\max\Documents\GitHub\atom\test.php(14): {closure}()
#3 D:\max\Documents\GitHub\atom\test.php(14): {closure}()
#4 D:\max\Documents\GitHub\atom\test.php(14): {closure}()
#5 D:\max\Documents\GitHub\atom\test.php(14): {closure}()
#6 D:\max\Documents\GitHub\atom\test.php(14): {closure}()
#7 D:\max\Documents\GitHub\atom\test.php(14): {closure}()
#8 D:\max\Documents\GitHub\atom\test.php(14): {closure}()
#9 D:\max\Documents\GitHub\atom\test.php(14): {closure}()
#10 D:\max\Documents\GitHub\atom\test.php(14): {closure}()
#11 D:\max\Documents\GitHub\atom\test.php(14): {closure}()
#12 D:\max\Documents\GitHub\atom\test.php(14): {closure}()
#13 D:\max\Documents\GitHub\atom\test.php(14): {closure}()
#14 D:\max\Documents\GitHub\atom\test.php(14): {closure}()
#15 D:\max\Documents\GitHub\atom\test.php(14): {closure}()
#16 D:\max\Documents\GitHub\atom\test.php(14): {closure}()
#17 D:\max\Documents\GitHub\atom\test.php(14): {closure}()
#18 D:\max\Documents\GitHub\atom\test.php(14): {closure}()
#19 D:\max\Documents\GitHub\atom\test.php(14): {closure}()
in D:\max\Documents\GitHub\atom\test.php on line 9
Actual result:
--------------
0 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14]
#1 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14]
#2 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14]
#3 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14]
#4 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14]
#5 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14]
#6 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14]
#7 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14]
#8 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14]
#9 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14]
#10 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14]
#11 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14]
#12 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14]
#13 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14]
#14 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14]
#15 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14]
#16 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14]
#17 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14]
#18 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14]
#19 {closure}() called at [D:\max\Documents\GitHub\atom\test.php:14]
Fatal error: Uncaught Exception: test error in D:\max\Documents\GitHub\atom\test.php:9
Stack trace:
#0 D:\max\Documents\GitHub\atom\test.php(14): {closure}()
#1 D:\max\Documents\GitHub\atom\test.php(14): {closure}()
#2 D:\max\Documents\GitHub\atom\test.php(14): {closure}()
#3 D:\max\Documents\GitHub\atom\test.php(14): {closure}()
#4 D:\max\Documents\GitHub\atom\test.php(14): {closure}()
#5 D:\max\Documents\GitHub\atom\test.php(14): {closure}()
#6 D:\max\Documents\GitHub\atom\test.php(14): {closure}()
#7 D:\max\Documents\GitHub\atom\test.php(14): {closure}()
#8 D:\max\Documents\GitHub\atom\test.php(14): {closure}()
#9 D:\max\Documents\GitHub\atom\test.php(14): {closure}()
#10 D:\max\Documents\GitHub\atom\test.php(14): {closure}()
#11 D:\max\Documents\GitHub\atom\test.php(14): {closure}()
#12 D:\max\Documents\GitHub\atom\test.php(14): {closure}()
#13 D:\max\Documents\GitHub\atom\test.php(14): {closure}()
#14 D:\max\Documents\GitHub\atom\test.php(14): {closure}()
#1 in D:\max\Documents\GitHub\atom\test.php on line 9
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=78908&edit=1
Thread (7 messages)