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

From: Date: Sat, 03 Oct 2015 22:56:06 +0000
Subject: Bug #70630 [Opn->Asn]: Closure::call/bind() crash with ReflectionFunction->getClosure()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-196374@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 Updated by: bwoebi@php.net Reported by: bwoebi@php.net Summary: Closure::call/bind() crash with ReflectionFunction->getClosure() -Status: Open +Status: Assigned Type: Bug Package: Reproducible crash Operating System: * PHP Version: master-Git-2015-10-03 (Git) -Assigned To: +Assigned To: bwoebi Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2015-10-03 22:55:52] bwoebi@php.net Description: ------------ Closure::call() and Closure::bind() on functions (userland or internal) crash, when the functions are raw functions without class/scope context. Test script: --------------- class a {} $x = (new ReflectionFunction("substr"))->getClosure(); $x->call(new a); // or Closure::bind($x, new a, "a"); Expected result: ---------------- Warning: Cannot bind closure of a function to an object Actual result: -------------- Segmentation Fault ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=70630&edit=1

« previous php.bugs (#196374) next »