|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2014-01-11 20:27 UTC] krakjoe@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: krakjoe
[2014-01-11 20:27 UTC] krakjoe@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 20:00:01 2025 UTC |
Description: ------------ 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() { $this->test->foo(); } } $thread = new MyThread( $test ); $thread->start(); $thread->join(); Expected result: ---------------- Normal workflow Actual result: -------------- Memory access violation