Bug #63066 [Com]: Calling an undefined method in a generator results in a seg fault

From: Date: Tue, 11 Sep 2012 12:59:13 +0000
Subject: Bug #63066 [Com]: Calling an undefined method in a generator results in a seg fault
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-173323@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=63066&edit=1 ID: 63066 Comment by: reeze dot xia at gmail dot com Reported by: Jared dot Williams1 at ntlworld dot com Summary: Calling an undefined method in a generator results in a seg fault Status: Open Type: Bug Package: Class/Object related Operating System: Linux ubuntu 3.5.0-14-generic #1 PHP Version: master-Git-2012-09-11 (Git) Block user comment: N Private report: N New Comment: I could not reproduce it in Mac OS X do you use any extension like apc, xdebug? Previous Comments: ------------------------------------------------------------------------ [2012-09-11 12:49:54] Jared dot Williams1 at ntlworld dot com Description: ------------ Calling an undefined method in a generator results in an expected fatal error, but then a segmentation fault occurs afterwards. Test script: --------------- function gen($o) { yield 'foo'; $o->fatalError(); } foreach(gen(new stdClass()) as $value) echo $value, "\n"; Expected result: ---------------- foo PHP Fatal error: Call to undefined method stdClass::fatalError() in /home/jared/fatalSegFault.php on line 6 Fatal error: Call to undefined method stdClass::fatalError() in /home/jared/fatalSegFault.php on line 6 Actual result: -------------- foo PHP Fatal error: Call to undefined method stdClass::fatalError() in /home/jared/fatalSegFault.php on line 6 Fatal error: Call to undefined method stdClass::fatalError() in /home/jared/fatalSegFault.php on line 6 Segmentation fault ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=63066&edit=1

« previous php.bugs (#173323) next »