Skip to content
This repository was archived by the owner on Sep 28, 2022. It is now read-only.
This repository was archived by the owner on Sep 28, 2022. It is now read-only.

Segmentation fault when run in distinct coroutine context #55

Open
@sergiotabanelli

Description

@sergiotabanelli

The following code produce a segmentation fault. The problem is that the registration of coroutine callbacks were done only in the connect method. I have a fork that fix this bug. I can do a pull request if needed.

<?php
$db;
\Co\run(function() use (&$db){
    $db = new \Swoole\Coroutine\PostgreSQL();
    $db->connect("host=127.0.0.1 port=5432 dbname=wireskel user=wireskel password=xxxxxx");
});
\Co\run(function () use ($db) {
    $res = $db->query('SELECT * from _cred_user'); // Segmentation Fault
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions