Segmentation Fault when in a class that extends Thread
tkoop opened this issue · 0 comments
tkoop commented
It seems that JAXL doesn't work well with threads. The following code seg-faults, and we're not even spawning a new thread.
I'm running PHP 5.4.24 (cli) on Red Hat 4.4.6-4.
I compiled PHP with the -enable-maintainer-zts option and then I installed pthreads using pecl.
<?
require("jaxl.php");
class SegFault extends Thread {
private $client = null;
public function connect($jid, $password) {
$this->client = new JAXL(array(
'jid' => $jid,
'pass' => $password
));
$this->client->require_xep(array(
'0199' // XMPP Ping
));
}
public function run() {
}
}
$segFault = new SegFault();
$segFault->connect($argv[1], $argv[2]);