cperl icon indicating copy to clipboard operation
cperl copied to clipboard

Coro: segfault (perl-5.24+)

Open constantined opened this issue 7 years ago • 5 comments

Testcase:

use Coro;

sub _sleep {
    my $c = Coro::rouse_cb();
    Coro::rouse_wait();
}

my $child = async {
    my ($a, $a2, $a3
# remove following line to omit segfault
        , $a4, $a5, $a6, $a7, $a8, $a9
    );

    _sleep();
};

cede;
warn "canceling";
$child->cancel();

Segfault occurs in scope.c: Perl_leave_scope. It seems like this bug also affects p5p. First bad commit is e8a84ef.

constantined avatar May 30 '18 14:05 constantined

This is a Coro bug (EV actually), not cperl/perl5. See https://github.com/rurban/Coro/issues/1 Thanks for bisecting. Work was done on my 5.22 branch, but it is not done yet.

rurban avatar May 31 '18 08:05 rurban

This code doesn't use EV. Bug is not related to #103

constantined avatar May 31 '18 09:05 constantined

Can you check my latest Coro code, branch 5.22. This tests fine for me.

rurban avatar May 31 '18 14:05 rurban

https://github.com/rurban/Coro/tree/5.22 also segfaults on cperl/perl-5.24+

constantined avatar Jun 01 '18 09:06 constantined

Ok, thanks. I'll check the changed scope stuff then.

rurban avatar Jun 01 '18 13:06 rurban