|  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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
22 + 33 = ?
Subscribe to this entry?

 [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: Sat Nov 28 19:01:24 2020 UTC