Skip to content
This repository has been archived by the owner on Dec 16, 2019. It is now read-only.

Segfault on Anonymous Class with a (not yet started) Worker #658

Closed
tpunt opened this issue Jan 15, 2017 · 2 comments
Closed

Segfault on Anonymous Class with a (not yet started) Worker #658

tpunt opened this issue Jan 15, 2017 · 2 comments
Labels

Comments

@tpunt
Copy link
Collaborator

tpunt commented Jan 15, 2017

Environment

  • PHP: PHP 7.1.0 (cli) ( ZTS DEBUG )
  • pthreads: 3.1.7dev
  • OS: Mac

Reproducing Code

$worker = new Worker();
$task = new class extends Threaded {
    public static $a;
};
$task::$a = new class extends Threaded {};
$worker->start();
$worker->stack($task);
$worker->shutdown();

The worker must not be started before the static property assignment. Pools are also affected:

$task = new class extends Threaded {
    public static $a;
};
$task::$a = new class extends Threaded {};
$pool = new Pool(2);
$pool->submit($task);
$pool->shutdown();
@krakjoe krakjoe added the bug label Jan 15, 2017
krakjoe added a commit that referenced this issue Jan 23, 2017
This reverts commit bd1ddc4.
@krakjoe krakjoe reopened this Jan 23, 2017
@krakjoe
Copy link
Owner

krakjoe commented Jan 23, 2017

I had a go at #658 and #659 this morning ... but failed ... I'll have to come back to it ...

sirsnyder added a commit to sirsnyder/pthreads that referenced this issue Mar 5, 2017
sirsnyder added a commit to sirsnyder/pthreads that referenced this issue Mar 5, 2017
sirsnyder added a commit to sirsnyder/pthreads that referenced this issue Mar 5, 2017
sirsnyder added a commit to sirsnyder/pthreads that referenced this issue Mar 8, 2017
sirsnyder added a commit to sirsnyder/pthreads that referenced this issue Jun 11, 2017
sirsnyder added a commit to sirsnyder/pthreads that referenced this issue Jun 11, 2017
sirsnyder added a commit to sirsnyder/pthreads that referenced this issue Jun 11, 2017
@tpunt
Copy link
Collaborator Author

tpunt commented Aug 15, 2017

Resolved by #686.

@tpunt tpunt closed this as completed Aug 15, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants