revoltphp/event-loop-adapter-react

Segfault with PHP 8.2.3

ellisonpatterson opened this issue · 3 comments

I'm getting a segfault on the latest version of PHP 8.2 (8.2.3)

Packages:
react/promise: 2.9.0
react/async: 4.0.0
revolt/event-loop: 1.0.0

Code to reproduce:

<?php

\define('ABSPATH', \dirname(__FILE__));
require ABSPATH . '/vendor/autoload.php';

use React\Promise\Deferred;
use function React\Async\async;
use function React\Async\await;

class Test
{
    protected $promise;

    public function __construct()
    {
        $this->listen();
    }

    protected function listen()
    {
        return async(function() {
            await($this->deferred());
        })();
    }

    protected function deferred()
    {
        $deferred = new Deferred();

        return $this->promise = $deferred->promise();
    }
}

$test = new Test();

\Revolt\EventLoop::run();

Hi @ellisonpatterson, this example works fine for me on 8.2.3, but there are multiple issues on 8.2.3 related to fibers that can cause segfaults, which will be fixed in 8.2.4.

Yeah I'm getting sporadic segfaults with 8.2.3 that I never got before, so I will just wait for 8.2.4.

Thank you!

PHP 8.2.4 was released, closing this issue.