From 6abcbbfadecdf213ac8675defabce791867a3949 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Tue, 7 Jul 2026 08:01:23 -0400 Subject: [PATCH] Reduce nesting depth in gh22570 test to fix macOS ZTS timeout The 100000-node tree could exceed the run-tests timeout on the macOS ZTS runner. The 512K stack limit overflows well below 10000 nested nodes, so reduce the depth to keep the test fast while still tripping the serializer stack guard. --- ext/dom/tests/modern/xml/gh22570.phpt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/dom/tests/modern/xml/gh22570.phpt b/ext/dom/tests/modern/xml/gh22570.phpt index 3d648aac5e4d..11ce304b6b6a 100644 --- a/ext/dom/tests/modern/xml/gh22570.phpt +++ b/ext/dom/tests/modern/xml/gh22570.phpt @@ -18,7 +18,7 @@ zend.max_allowed_stack_size=512K // Build bottom-up so the insertion cycle-check stays O(1); top-down is O(n^2). $doc = Dom\XMLDocument::createEmpty(); $node = $doc->createElement('a'); -for ($i = 0; $i < 100000; $i++) { +for ($i = 0; $i < 10000; $i++) { $parent = $doc->createElement('a'); $parent->appendChild($node); $node = $parent;