Edit report at http://bugs.php.net/bug.php?id=35369&edit=1

 ID:               35369
 Comment by:       DAVOGUEMALL at GMAIL dot COM
 Reported by:      bugreports at insign dot ch
 Summary:          Serialized objects referencing each other, memory
                   exhaustion when unserializing
 Status:           No Feedback
 Type:             Bug
 Package:          Class/Object related
 Operating System: Prolly irrelevant (Linux 2.6.4)
 PHP Version:      5CVS-2005-11-24 (CVS)

 New Comment:

Due to the poplarity and demand of counterfeit <a
href="http://www.superflatiron.com/";>chi flat iron</a> are getting more
and more popular in the europe and united states.The moreden beauty is
the sole distributor of CHI IRONS that are produced in Columbia.Along
with the farouk systems,we are not actively and aggressively working to
stop the sales of the none csa,counterfeight chi flat iron. These chi
flat iron are non compliant with federal safety standards and have no
warranty.Though they can be used for several months or even one year,two
years,but they are counterfeight products. In China,such <a
href="http://www.superflatiron.com/chi-turbo-ceramic-flat-iron-p-191.html";>GHD
Turbo Ceramic Flat Iron </a>are hot sellers.We meet one store called
davoguemall,they even make the chi hairstraightener comes with plug for
different countries. As the economy problem,not all people can afford
such expensive <strong>CHI FLAT IRON</strong> though they are marked
&quot;authentic&quot;. This is the most important reason for the replica
chi hair straightener can be sold so well. Now our question is turn to
how to choose a good quality replica chi hair straightener,right?


Previous Comments:
------------------------------------------------------------------------
[2009-09-25 08:47:08] DSHHH at HOTMAIL dot COM

http://www.hotuggsale.co.uk  ugg boots uk

http://www.hotuggsale.co.uk  ugg boots sale

http://www.hotuggsale.co.uk  ugg boots uk sale

------------------------------------------------------------------------
[2009-09-12 00:46:41] linlixiang123 at 126 dot com

A man is driving up a steep, narrow mountain road. <a
href="http://www.chihaironline.com";>chi hair tools</a> A woman is
driving down the same road. As they pass each other, the woman leans out
of the window and yells "PIG!!" <a
href="http://www.chihaironline.com";>chi flat irons</a> The man
immediately leans out of his window and replies, "WITCH!!"    They each
continue on their way, and as the man rounds the next corner, <a
href="http://www.chihaironline.com";>chi hair straighteners</a> he
crashes into a pig in the middle of the road. If only men would listen.

------------------------------------------------------------------------
[2005-12-02 01:00:03] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

------------------------------------------------------------------------
[2005-11-24 16:20:28] [email protected]

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.



------------------------------------------------------------------------
[2005-11-24 16:15:19] bugreports at insign dot ch

Description:
------------
Objects, referencing each other, are serialized. The reference seems to
be represented as R:1 in the serialized data.



When unserializing the string, it seems (begin of guess) that the
reference is not interpreted correctly and countless objects are
instantiated instead (end of guess) - the script takes remarkably long
and ends with the allowed memory size exhausted.



The problem doesn't seem to occur when the unserialized data is simply
echoed instead of assigned to a variable, but obviously that's not so
useful. The problem still occurs when var_dumping the unserialized
data.



The problem exists on PHP 5.1.0RC6, but not on PHP 5.0.5. Unfortunately,
we cannot install the CVS version just for checking if the problem still
exists. We hope you're still willing to at least quickly verify it.

Reproduce code:
---------------
class A {

  public $b;

}



class B {

  public $a;

}



$a = new A();

$b = new B();

$a->b = &$b;

$b->a = &$a;



$x = unserialize(serialize($a));

Expected result:
----------------
$x is a copy of $a, with $x->b being a copy of $b that holds a reference
to $x. print_r'd that would look like this:



A Object

(

    [b] => B Object

        (

            [a] => A Object

 *RECURSION*

        )



)

Actual result:
--------------
Memory exhaustion and sometimes a segmentation fault.


------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=35369&edit=1

Reply via email to