Bug #70630 [Com]: Closure::call/bind() crash with ReflectionFunction->getClosure()

From: Date: Mon, 19 Oct 2015 08:43:23 +0000
Subject: Bug #70630 [Com]: Closure::call/bind() crash with ReflectionFunction->getClosure()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-196683@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70630&edit=1 ID: 70630 Comment by: lisachenko dot it at gmail dot com Reported by: bwoebi@php.net Summary: Closure::call/bind() crash with ReflectionFunction->getClosure() Status: Closed Type: Bug Package: Reproducible crash Operating System: * PHP Version: master-Git-2015-10-03 (Git) Assigned To: bwoebi Block user comment: N Private report: N New Comment: Hello, I think that described behaviour should be correct only for raw functions, applied to the objects. Currently, patch also disables rebinding of closures from methods between objects, which is not correct, see https://3v4l.org/cZtbI#v700rc5 I wrote about this case in internals too, please join discussion as it's introduces a BC break. Previous Comments: ------------------------------------------------------------------------ [2015-10-13 10:12:17] ab@php.net Automatic comment on behalf of bobwei9@hotmail.com Revision: http://git.php.net/?p=php-src.git;a=commit;h=517b5536259ecf7697f353f4bfbafde857fc1f81 Log: Fixed bug #70630 (Closure::call/bind() crash with ReflectionFunction->getClosure()) This additionally removes support for binding to an unknown (not in parent hierarchy) scope. Removing support for cross-scope is necessary for certain compile-time assumptions (like class constants) to prevent unexpected results ------------------------------------------------------------------------ [2015-10-13 10:12:12] ab@php.net Automatic comment on behalf of dmitry@zend.com Revision: http://git.php.net/?p=php-src.git;a=commit;h=e0b3b3c7524603d57dce62ae1cb1eae3b1bc3e42 Log: Revert "Fixed bug #70630 (Closure::call/bind() crash with ReflectionFunction->getClosure())" ------------------------------------------------------------------------ [2015-10-13 10:12:03] ab@php.net Automatic comment on behalf of dmitry@zend.com Revision: http://git.php.net/?p=php-src.git;a=commit;h=0847681b1ab40193815285a4e9736a058372bb8c Log: Fixed bug #70630 (Closure::call/bind() crash with ReflectionFunction->getClosure()) ------------------------------------------------------------------------ [2015-10-09 08:49:17] dmitry@php.net Automatic comment on behalf of dmitry@zend.com Revision: http://git.php.net/?p=php-src.git;a=commit;h=0847681b1ab40193815285a4e9736a058372bb8c Log: Fixed bug #70630 (Closure::call/bind() crash with ReflectionFunction->getClosure()) ------------------------------------------------------------------------ [2015-10-06 22:51:15] dmitry@php.net Automatic comment on behalf of dmitry@zend.com Revision: http://git.php.net/?p=php-src.git;a=commit;h=e0b3b3c7524603d57dce62ae1cb1eae3b1bc3e42 Log: Revert "Fixed bug #70630 (Closure::call/bind() crash with ReflectionFunction->getClosure())" ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=70630 -- Edit this bug report at https://bugs.php.net/bug.php?id=70630&edit=1

« previous php.bugs (#196683) next »