Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation Fault when in a class that extends Thread #43

Open
tkoop opened this issue Feb 4, 2014 · 0 comments
Open

Segmentation Fault when in a class that extends Thread #43

tkoop opened this issue Feb 4, 2014 · 0 comments
Labels

Comments

@tkoop
Copy link

tkoop commented Feb 4, 2014

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]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants