Edit report at https://bugs.php.net/bug.php?id=63066&edit=1
ID: 63066 User updated by: Jared dot Williams1 at ntlworld 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: It appears that the seg fault doesn't appear in debug builds. Recompiled without debug again, and the seg fault is still present jared@ubuntu:~$ php -v PHP 5.5.0-dev (cli) (built: Sep 11 2012 14:25:38) (DEBUG) Copyright (c) 1997-2012 The PHP Group Zend Engine v2.5.0-dev, Copyright (c) 1998-2012 Zend Technologies jared@ubuntu:~$ php fatalSegFault.php 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 ---- jared@ubuntu:~$ ./Development/php-src/sapi/cli/php -v PHP 5.5.0-dev (cli) (built: Sep 11 2012 14:41:40) Copyright (c) 1997-2012 The PHP Group Zend Engine v2.5.0-dev, Copyright (c) 1998-2012 Zend Technologies jared@ubuntu:~$ ./Development/php-src/sapi/cli/php fatalSegFault.php 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 Previous Comments: ------------------------------------------------------------------------ [2012-09-11 13:17:14] jared dot williams1 at ntlworld dot com No APC or XDebug. Will recompile with debug and get a bt. ------------------------------------------------------------------------ [2012-09-11 13:13:41] reeze dot xia at gmail dot com Can't reproduce in Ubuntu too. parallels@ubuntu:~/php-src$ uname -a Linux ubuntu 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux if your are testing the lastest version, Could please provide backtraceï¼ https://bugs.php.net/bugs-generating-backtrace.php ------------------------------------------------------------------------ [2012-09-11 12:59:13] reeze dot xia at gmail dot com I could not reproduce it in Mac OS X do you use any extension like apc, xdebug? ------------------------------------------------------------------------ [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