Bug #74345 [Opn->Csd]: Call trampoline leaked if callback not invoked
| From: | nikic@php.net | Date: | Wed, 20 Mar 2019 11:07:49 +0000 |
| Subject: | Bug #74345 [Opn->Csd]: Call trampoline leaked if callback not invoked | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-220096@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=74345&edit=1
ID: 74345
Updated by: nikic@php.net
Reported by: nikic@php.net
Summary: Call trampoline leaked if callback not invoked
-Status: Open
+Status: Closed
Type: Bug
Package: Scripting Engine problem
PHP Version: 7.0.17
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of nikita.ppv@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=abc457fe1ddba07b1574744593f81ce1005025cd
Log: Fixed bug #74345
Previous Comments:
------------------------------------------------------------------------
[2017-03-30 21:56:33] nikic@php.net
Description:
------------
If fci/fcc are acquired via zend_is_callable and the callback is subsequently not used, the call
trampoline is leaked. The script demonstrates this using array_map() and the method name -- of
course, this also affects other functions, and the trampoline itself may also be leaked.
Test script:
---------------
<?php
class Test {
public function __call($name, $args) {
echo "__call()\n";
}
}
$name = "foo" . ($x = "bar");
array_map([new Test, $name], []);
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=74345&edit=1