Edit report at https://bugs.php.net/bug.php?id=62991&edit=1
ID: 62991 Comment by: ni...@php.net Reported by: softwareelves at gmail dot com Summary: Segfault with generator and closure. Status: Assigned Type: Bug Package: Reproducible crash Operating System: Mac OSx 10.8.1 PHP Version: master-Git-2012-09-02 (Git) Assigned To: nikic Block user comment: N Private report: N New Comment: @laruence: The patch looks fine for me. The only thing that looks strange are these whitespace changes: -ZEND_BEGIN_ARG_INFO_EX(arginfo_closure_bindto, 0, 0, 1) + ZEND_BEGIN_ARG_INFO_EX(arginfo_closure_bindto, 0, 0, 1) ZEND_ARG_INFO(0, newthis) ZEND_ARG_INFO(0, newscope) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_closure_bind, 0, 0, 2) + ZEND_BEGIN_ARG_INFO_EX(arginfo_closure_bind, 0, 0, 2) ZEND_ARG_INFO(0, closure) ZEND_ARG_INFO(0, newthis) ZEND_ARG_INFO(0, newscope) ZEND_END_ARG_INFO() -static const zend_function_entry closure_functions[] = { - ZEND_ME(Closure, __construct, NULL, ZEND_ACC_PRIVATE) - ZEND_ME(Closure, bind, arginfo_closure_bind, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) - ZEND_MALIAS(Closure, bindTo, bind, arginfo_closure_bindto, ZEND_ACC_PUBLIC) - {NULL, NULL, NULL} -}; + static const zend_function_entry closure_functions[] = { + ZEND_ME(Closure, __construct, NULL, ZEND_ACC_PRIVATE) + ZEND_ME(Closure, bind, arginfo_closure_bind, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_MALIAS(Closure, bindTo, bind, arginfo_closure_bindto, ZEND_ACC_PUBLIC) + {NULL, NULL, NULL} + }; Looks like the indentation is slightly off there :) Previous Comments: ------------------------------------------------------------------------ [2012-09-02 09:58:39] larue...@php.net update patch, fix tabs ------------------------------------------------------------------------ [2012-09-02 09:58:16] larue...@php.net The following patch has been added/updated: Patch Name: bug62991.patch Revision: 1346579896 URL: https://bugs.php.net/patch-display.php?bug=62991&patch=bug62991.patch&revision=1346579896 ------------------------------------------------------------------------ [2012-09-02 09:55:35] larue...@php.net I got a fix for this. nikic, could you please review this? thanks ------------------------------------------------------------------------ [2012-09-02 09:54:55] larue...@php.net The following patch has been added/updated: Patch Name: bug62991.patch Revision: 1346579695 URL: https://bugs.php.net/patch-display.php?bug=62991&patch=bug62991.patch&revision=1346579695 ------------------------------------------------------------------------ [2012-09-02 08:25:57] larue...@php.net seems the closure has been released after it was executed while destruct the outter scope.. ------------------------------------------------------------------------ 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=62991 -- Edit this bug report at https://bugs.php.net/bug.php?id=62991&edit=1