forked from php/php-src
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed bug #61273 (call_user_func_array with more than 16333 arguments…
… leaks / crashes)
- Loading branch information
Showing
3 changed files
with
18 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--TEST-- | ||
Bug #61273 (call_user_func_array with more than 16333 arguments leaks / crashes) | ||
--FILE-- | ||
<?php | ||
/** | ||
* for 5.3 #define ZEND_VM_STACK_PAGE_SIZE ((64 * 1024) - 64) | ||
* for 5.4 #define ZEND_VM_STACK_PAGE_SIZE ((16 * 1024) - 16) | ||
* we should trick EG(argument_stack) into growing | ||
*/ | ||
$args = array_fill(0, 64 * 1024 - 64, "*"); | ||
call_user_func_array(function(&$a) {}, $args); | ||
echo strval("okey"); | ||
--EXPECTF-- | ||
Warning: Parameter 1 to {closure}() expected to be a reference, value given in %sbug61273.php on line %d | ||
okey |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters