Bug #62991 [Asn]: Segfault with generator and closure.

From: Date: Tue, 04 Sep 2012 07:09:26 +0000
Subject: Bug #62991 [Asn]: Segfault with generator and closure.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-173144@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=62991&edit=1 ID: 62991 Updated by: laruence@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: the static variable table should also be copied, and this func will be copied once / per closure called (create a new genartor). maybe add a new ACC flag is much more simple... which we have discussed before( I also discussed that with nikic :)) Previous Comments: ------------------------------------------------------------------------ [2012-09-04 06:57:58] dmitry@php.net I've added a much simpler patch. Please take a look. ------------------------------------------------------------------------ [2012-09-02 11:50:39] laruence@php.net The following patch has been added/updated: Patch Name: bug62991.phpt Revision: 1346586639 URL: https://bugs.php.net/patch-display.php?bug=62991&patch=bug62991.phpt&revision=1346586639 ------------------------------------------------------------------------ [2012-09-02 11:46:56] laruence@php.net a new patch has been attached, fixed the memleak issue, but the way is a little tricky, used the op_array->reserved fields. so I attached it here instead of ci it, wait for if we can find a better way ------------------------------------------------------------------------ [2012-09-02 11:45:06] laruence@php.net The following patch has been added/updated: Patch Name: bug62991.patch Revision: 1346586306 URL: https://bugs.php.net/patch-display.php?bug=62991&patch=bug62991.patch&revision=1346586306 ------------------------------------------------------------------------ [2012-09-02 11:24:00] laruence@php.net okey, but is there a way to find out that whether a generator has been run once? leaks reporting if the closure didn't run. ------------------------------------------------------------------------ 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

« previous php.bugs (#173144) next »