diff --git a/Zend/tests/stack_limit/stack_limit_001.phpt b/Zend/tests/stack_limit/stack_limit_001.phpt index ca185635c39..f06770ea0c6 100644 --- a/Zend/tests/stack_limit/stack_limit_001.phpt +++ b/Zend/tests/stack_limit/stack_limit_001.phpt @@ -76,7 +76,7 @@ array(4) { ["EG(stack_limit)"]=> string(%d) "0x%x" } -Maximum call stack size of %d bytes reached. Infinite recursion? -Maximum call stack size of %d bytes reached. Infinite recursion? -Maximum call stack size of %d bytes reached. Infinite recursion? -Maximum call stack size of %d bytes reached. Infinite recursion? +Maximum call stack size of %d bytes (zend.max_allowed_stack_size-zend.reserved_stack_size) reached. Infinite recursion? +Maximum call stack size of %d bytes (zend.max_allowed_stack_size-zend.reserved_stack_size) reached. Infinite recursion? +Maximum call stack size of %d bytes (zend.max_allowed_stack_size-zend.reserved_stack_size) reached. Infinite recursion? +Maximum call stack size of %d bytes (zend.max_allowed_stack_size-zend.reserved_stack_size) reached. Infinite recursion? diff --git a/Zend/tests/stack_limit/stack_limit_002.phpt b/Zend/tests/stack_limit/stack_limit_002.phpt index 309de9bf6a2..dde87cd50d0 100644 --- a/Zend/tests/stack_limit/stack_limit_002.phpt +++ b/Zend/tests/stack_limit/stack_limit_002.phpt @@ -79,7 +79,7 @@ array(4) { ["EG(stack_limit)"]=> string(%d) "0x%x" } -Maximum call stack size of %d bytes reached. Infinite recursion? -Maximum call stack size of %d bytes reached. Infinite recursion? -Maximum call stack size of %d bytes reached. Infinite recursion? -Maximum call stack size of %d bytes reached. Infinite recursion? +Maximum call stack size of %d bytes (zend.max_allowed_stack_size-zend.reserved_stack_size) reached. Infinite recursion? +Maximum call stack size of %d bytes (zend.max_allowed_stack_size-zend.reserved_stack_size) reached. Infinite recursion? +Maximum call stack size of %d bytes (zend.max_allowed_stack_size-zend.reserved_stack_size) reached. Infinite recursion? +Maximum call stack size of %d bytes (zend.max_allowed_stack_size-zend.reserved_stack_size) reached. Infinite recursion? diff --git a/Zend/tests/stack_limit/stack_limit_003.phpt b/Zend/tests/stack_limit/stack_limit_003.phpt index 6cf41a2bb14..256544410c3 100644 --- a/Zend/tests/stack_limit/stack_limit_003.phpt +++ b/Zend/tests/stack_limit/stack_limit_003.phpt @@ -61,6 +61,6 @@ array(4) { ["EG(stack_limit)"]=> string(%d) "0x%x" } -Maximum call stack size of %d bytes reached. Infinite recursion? -Maximum call stack size of %d bytes reached. Infinite recursion? -Maximum call stack size of %d bytes reached. Infinite recursion? +Maximum call stack size of %d bytes (zend.max_allowed_stack_size-zend.reserved_stack_size) reached. Infinite recursion? +Maximum call stack size of %d bytes (zend.max_allowed_stack_size-zend.reserved_stack_size) reached. Infinite recursion? +Maximum call stack size of %d bytes (zend.max_allowed_stack_size-zend.reserved_stack_size) reached. Infinite recursion? diff --git a/Zend/tests/stack_limit/stack_limit_005.phpt b/Zend/tests/stack_limit/stack_limit_005.phpt index 3fcd5d57282..29495f60d86 100644 --- a/Zend/tests/stack_limit/stack_limit_005.phpt +++ b/Zend/tests/stack_limit/stack_limit_005.phpt @@ -65,4 +65,4 @@ $test ; --EXPECTF-- -Fatal error: Maximum call stack size of %d bytes reached during compilation. Try splitting expression in %s on line %d +Fatal error: Maximum call stack size of %d bytes (zend.max_allowed_stack_size-zend.reserved_stack_size) reached during compilation. Try splitting expression in %s on line %d diff --git a/Zend/tests/stack_limit/stack_limit_006.phpt b/Zend/tests/stack_limit/stack_limit_006.phpt index 0b51fabb4ba..a0548220290 100644 --- a/Zend/tests/stack_limit/stack_limit_006.phpt +++ b/Zend/tests/stack_limit/stack_limit_006.phpt @@ -320,6 +320,6 @@ array(4) { ["EG(stack_limit)"]=> string(%d) "0x%x" } -Maximum call stack size of %d bytes reached. Infinite recursion? -Maximum call stack size of %d bytes reached. Infinite recursion? -Maximum call stack size of %d bytes reached. Infinite recursion? +Maximum call stack size of %d bytes (zend.max_allowed_stack_size-zend.reserved_stack_size) reached. Infinite recursion? +Maximum call stack size of %d bytes (zend.max_allowed_stack_size-zend.reserved_stack_size) reached. Infinite recursion? +Maximum call stack size of %d bytes (zend.max_allowed_stack_size-zend.reserved_stack_size) reached. Infinite recursion? diff --git a/Zend/tests/stack_limit/stack_limit_007.phpt b/Zend/tests/stack_limit/stack_limit_007.phpt index ea917600075..e269ad72b17 100644 --- a/Zend/tests/stack_limit/stack_limit_007.phpt +++ b/Zend/tests/stack_limit/stack_limit_007.phpt @@ -41,5 +41,5 @@ array(4) { ["EG(stack_limit)"]=> string(%d) "0x%x" } -Maximum call stack size of %d bytes reached. Infinite recursion? +Maximum call stack size of %d bytes (zend.max_allowed_stack_size-zend.reserved_stack_size) reached. Infinite recursion? Try executed: 1 diff --git a/Zend/tests/stack_limit/stack_limit_008.phpt b/Zend/tests/stack_limit/stack_limit_008.phpt index 237dd748f2c..4dab044e84c 100644 --- a/Zend/tests/stack_limit/stack_limit_008.phpt +++ b/Zend/tests/stack_limit/stack_limit_008.phpt @@ -55,4 +55,4 @@ array(4) { string(%d) "0x%x" } Will throw: -Maximum call stack size of %d bytes reached. Infinite recursion? +Maximum call stack size of %d bytes (zend.max_allowed_stack_size-zend.reserved_stack_size) reached. Infinite recursion? diff --git a/Zend/tests/stack_limit/stack_limit_011.phpt b/Zend/tests/stack_limit/stack_limit_011.phpt index 1994fde7f7a..67fc92f8030 100644 --- a/Zend/tests/stack_limit/stack_limit_011.phpt +++ b/Zend/tests/stack_limit/stack_limit_011.phpt @@ -48,5 +48,5 @@ array(4) { ["EG(stack_limit)"]=> string(%d) "0x%x" } -Maximum call stack size of %d bytes reached. Infinite recursion? -Previous: Maximum call stack size of %d bytes reached. Infinite recursion? +Maximum call stack size of %d bytes (zend.max_allowed_stack_size-zend.reserved_stack_size) reached. Infinite recursion? +Previous: Maximum call stack size of %d bytes (zend.max_allowed_stack_size-zend.reserved_stack_size) reached. Infinite recursion? diff --git a/Zend/tests/stack_limit/stack_limit_012.phpt b/Zend/tests/stack_limit/stack_limit_012.phpt index 6cff18626be..8c8fc6c6333 100644 --- a/Zend/tests/stack_limit/stack_limit_012.phpt +++ b/Zend/tests/stack_limit/stack_limit_012.phpt @@ -38,4 +38,4 @@ array(4) { string(%d) "0x%x" } -Fatal error: Maximum call stack size of %d bytes reached during compilation. Try splitting expression in %s on line %d +Fatal error: Maximum call stack size of %d bytes (zend.max_allowed_stack_size-zend.reserved_stack_size) reached during compilation. Try splitting expression in %s on line %d diff --git a/Zend/tests/stack_limit/stack_limit_013.phpt b/Zend/tests/stack_limit/stack_limit_013.phpt index c323fe4c31d..7acf8b035ca 100644 --- a/Zend/tests/stack_limit/stack_limit_013.phpt +++ b/Zend/tests/stack_limit/stack_limit_013.phpt @@ -117,4 +117,4 @@ $test = [ ]; --EXPECTF-- -Fatal error: Maximum call stack size of %d bytes reached during compilation. Try splitting expression in %s on line %d +Fatal error: Maximum call stack size of %d bytes (zend.max_allowed_stack_size-zend.reserved_stack_size) reached during compilation. Try splitting expression in %s on line %d diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 87bfd0b1e94..a731970547e 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -103,7 +103,7 @@ static void zend_compile_assign(znode *result, zend_ast *ast); zend_never_inline static void zend_stack_limit_error(void) { zend_error_noreturn(E_COMPILE_ERROR, - "Maximum call stack size of %zu bytes reached during compilation. Try splitting expression", + "Maximum call stack size of %zu bytes (zend.max_allowed_stack_size-zend.reserved_stack_size) reached during compilation. Try splitting expression", (size_t) ((uintptr_t) EG(stack_base) - (uintptr_t) EG(stack_limit))); } diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 2544351824b..bd090777653 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -2311,7 +2311,7 @@ static zend_never_inline ZEND_COLD void ZEND_FASTCALL zend_use_new_element_for_s #ifdef ZEND_CHECK_STACK_LIMIT static zend_never_inline ZEND_COLD void ZEND_FASTCALL zend_call_stack_size_error(void) { - zend_throw_error(NULL, "Maximum call stack size of %zu bytes reached. Infinite recursion?", + zend_throw_error(NULL, "Maximum call stack size of %zu bytes (zend.max_allowed_stack_size-zend.reserved_stack_size) reached. Infinite recursion?", (size_t) ((uintptr_t) EG(stack_base) - (uintptr_t) EG(stack_limit))); } #endif /* ZEND_CHECK_STACK_LIMIT */