Skip to content

Commit 7d584f8

Browse files
committed
changes from feedback
1 parent 5b6340b commit 7d584f8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Zend/tests/gh18519.phpt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ if (getenv('SKIP_ASAN')) die('skip as it fatally crash');
77
--FILE--
88
<?php
99

10-
error_reporting(E_ALL & ~E_DEPRECATED);
11-
10+
#[AllowDynamicProperties]
1211
class Node {
1312
public $next;
1413
// forcing dynamic property creation is key
@@ -37,4 +36,4 @@ try {
3736
}
3837
?>
3938
--EXPECTREGEX--
40-
(Object compare - stack limit reached|Fatal error: Nesting level too deep - recursive dependency?.+)
39+
(Maximum call stack size of \d+ bytes \(zend\.max_allowed_stack_size - zend\.reserved_stack_size\) reached during compilation\. Try splitting expression|Fatal error: Nesting level too deep - recursive dependency?.+)

Zend/zend_object_handlers.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1724,7 +1724,8 @@ ZEND_API int zend_std_compare_objects(zval *o1, zval *o2) /* {{{ */
17241724
zend_object *zobj1, *zobj2;
17251725

17261726
if (zend_objects_check_stack_limit()) {
1727-
zend_throw_error(NULL, "Object compare - stack limit reached");
1727+
zend_throw_error(NULL, "Maximum call stack size of %zu bytes (zend.max_allowed_stack_size - zend.reserved_stack_size) reached during compilation. Try splitting expression",
1728+
(size_t) ((uintptr_t) EG(stack_base) - (uintptr_t) EG(stack_limit)));
17281729
return ZEND_UNCOMPARABLE;
17291730
}
17301731

0 commit comments

Comments
 (0)