|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #66468 Class implementing Serializable is crashing PHP
Submitted: 2014-01-11 17:41 UTC Modified: 2014-01-11 20:27 UTC
From: post-christian at freenet dot de Assigned: krakjoe (profile)
Status: Closed Package: pthreads (PECL)
PHP Version: 5.5.8 OS: openSUSE 11.4
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: post-christian at freenet dot de
New email:
PHP Version: OS:


 [2014-01-11 17:41 UTC] post-christian at freenet dot de
Classes which implement the Serializable interface and were serialized and unserialized and than used inside a thread crashes PHP inside the run() function.

Test script:
class Test implements Serializable
	public function serialize()
		return serialize( array() );
	public function unserialize( $serialized )
		$cfg = unserialize( $serialized );
	public function foo()

$test = new Test();

// Does the magic:
$test = unserialize( serialize( $test ) );

class MyThread extends Thread
	private $test;
	public function __construct( $test )
		$this->test = $test;
	public function run()

$thread = new MyThread( $test );

Expected result:
Normal workflow

Actual result:
Memory access violation


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2014-01-11 20:27 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: krakjoe
 [2014-01-11 20:27 UTC]
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at

 For Windows:
Thank you for the report, and for helping us make PHP better.

Thanks for report, pull git master ...
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Jul 31 22:01:23 2021 UTC