Bug #63984 [Asn->Dup]: Generators segfault
Edit report at https://bugs.php.net/bug.php?id=63984&edit=1
ID: 63984
Updated by: arpad@php.net
Reported by: arpad@php.net
Summary: Generators segfault
-Status: Assigned
+Status: Duplicate
Type: Bug
Package: Reproducible crash
Operating System: Linux
PHP Version: 5.5.0alpha2
Assigned To: nikic
Block user comment: N
Private report: N
New Comment:
Duplicate of #63830
Previous Comments:
------------------------------------------------------------------------
[2013-01-14 23:53:12] arpad@php.net
Yes indeed, cheers Nikita.
------------------------------------------------------------------------
[2013-01-14 15:53:20] nikic@php.net
@arpad: If it happens when exit; is called then it's basically the same issue, just a different
cause. I'll try to fix this issue sometime soon.
------------------------------------------------------------------------
[2013-01-14 15:28:14] arpad@php.net
I think it's when "exit" is called during the execution of the generator, wasn't
getting any errors though. I'll put together a repro script later.
------------------------------------------------------------------------
[2013-01-14 15:21:47] nikic@php.net
Do you know whether this segfault happens in conjunction with a fatal error? It's probably the
same as https://bugs.php.net/bug.php?id=63830.
------------------------------------------------------------------------
[2013-01-14 11:43:00] arpad@php.net
Also the generators are all closures, the following is one of the simpler ones:
$exp = new Ruler_Expression_Anonymous;
$exp->provides = array('friend');
$self = $this;
$friends = $this->friends;
$exp->func = function() use ($self, $friends) {
foreach ($friends as $id => $name) {
yield [
'friend' => new Resource_User($id, $self),
];
}
};
Bit more information from GDB (frame 1 in the above backtrace):
(gdb) p stack_frame
$1 = (void **) 0x7ffff8e08f38
(gdb) p *stack_frame
$2 = (void *) 0x0
------------------------------------------------------------------------
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=63984
--
Edit this bug report at https://bugs.php.net/bug.php?id=63984&edit=1
Thread (7 messages)