|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #63292 Accessing members from outside causes segfault
Submitted: 2012-10-16 19:06 UTC Modified: 2012-10-18 20:56 UTC
From: chibisuke at web dot de Assigned: krakjoe (profile)
Status: Closed Package: pthreads (PECL)
PHP Version: 5.4.7 OS: FreeBSD
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: chibisuke at web dot de
New email:
PHP Version: OS:


 [2012-10-16 19:06 UTC] chibisuke at web dot de
When trying to access a member of the threadclass from outside the thread after the thread was joined causes a segfault.

I used the latest git version of the code, since a part of the problem is fixed there already

Test script:
class Test3 extends Thread {
    var $x;
    public function run() {
        $this->x = 7;
        return 0;

$thread3 = new Test2();
$thread3->x = 5;
1echo $thread3->x; //works(5)
echo $thread3->x; //works(5 or 7 - racecondition)
echo $thread3->x; //works(7)
echo $thread3->x; //segfault


Expected result:

Actual result:
557Segmentation fault: 11 (core dumped)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-10-18 20:56 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: krakjoe
 [2012-10-18 20:56 UTC]
write access to thread members has been removed on account of it's instability.
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Fri Oct 30 23:01:24 2020 UTC