xref: /PHP-8.1/Zend/tests/bug61273.phpt (revision 7aacc705)
1--TEST--
2Bug #61273 (call_user_func_array with more than 16333 arguments leaks / crashes)
3--FILE--
4<?php
5/**
6 * for 5.3 #define ZEND_VM_STACK_PAGE_SIZE ((64 * 1024) - 64)
7 * for 5.4 #define ZEND_VM_STACK_PAGE_SIZE ((16 * 1024) - 16)
8 * we should trick EG(argument_stack) into growing
9 */
10$args = array_fill(0, 64 * 1024 - 64, 0);
11call_user_func_array(function(&$a) {}, $args);
12echo strval("okey");
13?>
14--EXPECTF--
15Warning: {closure}(): Argument #1 ($a) must be passed by reference, value given in %s on line %d
16okey
17