Edit report at https://bugs.php.net/bug.php?id=63066&edit=1

 ID:                 63066
 Comment 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:

No APC or XDebug. 

Will recompile with debug and get a bt.


Previous Comments:
------------------------------------------------------------------------
[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

Reply via email to