Segfault with PHP 8.2.3
ellisonpatterson opened this issue · 3 comments
ellisonpatterson commented
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();
kelunik commented
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.
ellisonpatterson commented
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!
ellisonpatterson commented
PHP 8.2.4 was released, closing this issue.