#36376 [Opn->Fbk]: Segfault when using clone '$this>test2' notation in __clone method
| From: | derick@php.net | Date: | Mon, 13 Feb 2006 10:11:25 +0000 |
| Subject: | #36376 [Opn->Fbk]: Segfault when using clone '$this>test2' notation in __clone method | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-93199@lists.php.net to get a copy of this message | ||
ID: 36376
Updated by: derick@php.net
Reported By: jaco at welnet dot nl
-Status: Open
+Status: Feedback
Bug Type: Reproducible crash
Operating System: CentOS 4.2
PHP Version: 5.1.2
New Comment:
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
for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php
for Win32
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.
Previous Comments:
------------------------------------------------------------------------
[2006-02-13 11:01:01] jaco at welnet dot nl
Description:
------------
PHP segfaults when there is code like '$this->object = clone
$this>object' in __clone method. note the '>' syntax which is faulty
ofcourse but produces the segfault.
tested with latest cvs:
PHP 5.1.3-dev (cli) (built: Feb 13 2006 10:52:02)
Reproduce code:
---------------
class test2 {}
class test {
public $test2;
public function __construct() {
$this->test2 = new test2();
}
public function __clone() {
$test2 = clone $this>test2;
}
}
$test = new test();
$test2 = clone $test;
Expected result:
----------------
Notice: Use of undefined constant test2 - assumed 'test2' in FILE on
line XX
Notice: Object of class test could not be converted to int in FILE on
line XX
Actual result:
--------------
[Mon Feb 13 10:38:40 2006] [notice] child pid 12798 exit signal
Segmentation fault (11)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=36376&edit=1